LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
"Rafael J. Wysocki" <rafael@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] PM: base: power: don't try to use non-existing RTC for storing data
Date: Fri, 3 Sep 2021 11:08:58 +0200 [thread overview]
Message-ID: <YTHmKvYz5j8ZT9Jt@kroah.com> (raw)
In-Reply-To: <1b6a8f9c-2a5f-e97e-c89d-5983ceeb20e5@suse.com>
On Fri, Sep 03, 2021 at 11:01:58AM +0200, Juergen Gross wrote:
> On 03.09.21 10:56, Greg Kroah-Hartman wrote:
> > On Fri, Sep 03, 2021 at 10:49:36AM +0200, Juergen Gross wrote:
> > > In there is no legacy RTC device, don't try to use it for storing trace
> > > data across suspend/resume.
> > >
> > > Cc: <stable@vger.kernel.org>
> > > Signed-off-by: Juergen Gross <jgross@suse.com>
> > > ---
> > > drivers/base/power/trace.c | 10 ++++++++++
> > > 1 file changed, 10 insertions(+)
> > >
> > > diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
> > > index a97f33d0c59f..b7c80849455c 100644
> > > --- a/drivers/base/power/trace.c
> > > +++ b/drivers/base/power/trace.c
> > > @@ -13,6 +13,7 @@
> > > #include <linux/export.h>
> > > #include <linux/rtc.h>
> > > #include <linux/suspend.h>
> > > +#include <linux/init.h>
> > > #include <linux/mc146818rtc.h>
> > > @@ -165,6 +166,9 @@ void generate_pm_trace(const void *tracedata, unsigned int user)
> > > const char *file = *(const char **)(tracedata + 2);
> > > unsigned int user_hash_value, file_hash_value;
> > > + if (!x86_platform.legacy.rtc)
> > > + return 0;
> >
> > 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.
Odd, and not obvious at all :(
Ok, I'll let Rafael review this...
next prev parent reply other threads:[~2021-09-03 9:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 8:49 [PATCH 0/2] xen: fix illegal rtc device usage of pv guests Juergen Gross
2021-09-03 8:49 ` [PATCH 1/2] PM: base: power: don't try to use non-existing RTC for storing data Juergen Gross
2021-09-03 8:56 ` Greg Kroah-Hartman
2021-09-03 9:01 ` Juergen Gross
2021-09-03 9:08 ` Greg Kroah-Hartman [this message]
2021-09-06 17:07 ` Rafael J. Wysocki
2021-09-07 4:18 ` Juergen Gross
2021-09-03 8:49 ` [PATCH 2/2] xen: reset legacy rtc flag for PV domU Juergen Gross
2021-09-08 14:54 ` Boris Ostrovsky
2021-09-10 7:27 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YTHmKvYz5j8ZT9Jt@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jgross@suse.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stable@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
--subject='Re: [PATCH 1/2] PM: base: power: don'\''t try to use non-existing RTC for storing data' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).