A recent change in mc146818_get_time() resulted in WARN splats when
booting a Xen PV guest.
The main reason is that there is a code path resulting in accessing a
RTC device which is not present, which has been made obvious by a
call of WARN() in this case.
This small series is fixing this issue by:
- avoiding the RTC device access from drivers/base/power/trace.c in
cast there is no legacy RTC device available
- resetting the availability flag of a legacy RTC device for Xen PV
guests
Juergen Gross (2):
PM: base: power: don't try to use non-existing RTC for storing data
xen: reset legacy rtc flag for PV domU
arch/x86/xen/enlighten_pv.c | 7 +++++++
drivers/base/power/trace.c | 10 ++++++++++
2 files changed, 17 insertions(+)
--
2.26.2
In there is no legacy RTC device, don't try to use it for storing trace
data across suspend/resume.
Cc: <redacted>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/base/power/trace.c | 10 ++++++++++
1 file changed, 10 insertions(+)
On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote:
quoted hunk
In there is no legacy RTC device, don't try to use it for storing trace
data across suspend/resume.
Cc: <redacted>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/base/power/trace.c | 10 ++++++++++
1 file changed, 10 insertions(+)
On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote:
quoted
In there is no legacy RTC device, don't try to use it for storing trace
data across suspend/resume.
Cc: <redacted>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/base/power/trace.c | 10 ++++++++++
1 file changed, 10 insertions(+)
On Fri, Sep 03, 2021 at 11:01:58AM +0200, Juergen Gross wrote:
On 03.09.21 10:56, Greg Kroah-Hartman wrote:
quoted
On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote:
quoted
In there is no legacy RTC device, don't try to use it for storing trace
data across suspend/resume.
Cc: <redacted>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/base/power/trace.c | 10 ++++++++++
1 file changed, 10 insertions(+)
From: "Rafael J. Wysocki" <rafael@kernel.org> Date: 2021-09-06 17:07:53
On Fri, Sep 3, 2021 at 11:02 AM Juergen Gross [off-list ref] wrote:
On 03.09.21 10:56, Greg Kroah-Hartman wrote:
quoted
On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote:
quoted
In there is no legacy RTC device, don't try to use it for storing trace
data across suspend/resume.
Cc: <redacted>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/base/power/trace.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Why does the driver core code here care about a platform/arch-specific
thing at all? Did you just break all other arches?
This file is only compiled for x86. It depends on CONFIG_PM_TRACE_RTC,
which has a "depends on X86" attribute.
This feature uses the CMOS RTC memory to store data, so if that memory
is not present, it's better to avoid using it.
Please feel free to add
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
to this patch or let me know if you want me to take it.
On Fri, Sep 3, 2021 at 11:02 AM Juergen Gross [off-list ref] wrote:
quoted
On 03.09.21 10:56, Greg Kroah-Hartman wrote:
quoted
On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote:
quoted
In there is no legacy RTC device, don't try to use it for storing trace
data across suspend/resume.
Cc: <redacted>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/base/power/trace.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Why does the driver core code here care about a platform/arch-specific
thing at all? Did you just break all other arches?
This file is only compiled for x86. It depends on CONFIG_PM_TRACE_RTC,
which has a "depends on X86" attribute.
This feature uses the CMOS RTC memory to store data, so if that memory
is not present, it's better to avoid using it.
Please feel free to add
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Thanks!
to this patch or let me know if you want me to take it.
No, I can take it with the other patch of this small series, thanks.
Juergen