From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: James Morse <james.morse@arm.com>
Cc: Chen Yu <yu.c.chen@intel.com>,
linux-pm@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Pavel Machek <pavel@ucw.cz>,
Borislav Petkov <bp@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Len Brown <lenb@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC v3] x86, hotplug: Use hlt instead of mwait if invoked from disable_nonboot_cpus
Date: Thu, 07 Jul 2016 14:25:22 +0200 [thread overview]
Message-ID: <14265008.RukW38MkjF@vostro.rjw.lan> (raw)
In-Reply-To: <577E14F6.6060706@arm.com>
On Thursday, July 07, 2016 09:38:14 AM James Morse wrote:
> Hi Rafael,
>
> On 07/07/16 01:33, Rafael J. Wysocki wrote:
> > Below is my sort of version of this (untested) and I did it this way, because
> > the issue is specific to resume from hibernation (the workaround need not be
> > applied anywhere else) and the hibernate_resume_nonboot_cpu_disable() thing may
> > be useful to arm64 too if I'm not mistaken (James?).
>
> Yes, we will always need to do something extra (based on data in the
> arch_hibernation_header) to resume if CPU0 was offline, or kexec meant we no
> longer know which CPU the firmware will boot us on.
>
>
> > Actually, if arm64 uses it too, the __weak implementation can be dropped,
> > because it will be possible to make it depend on ARCH_HIBERNATION_HEADER
> > (x86 and arm64 are the only users of that).
>
> Heh, I avoided that as it felt too much like a hack!
OK, let's do as follows, then.
I'll queue up this patch for 4.8 if people don't object.
Then you can implement hibernate_resume_nonboot_cpu_disable() as needed on arm64
and we'll drop the __weak thing next.
Since both users of ARCH_HIBERNATION_HEADER will have their own implementations
of hibernate_resume_nonboot_cpu_disable(), we can just make it a static inline
wrapper around disable_nonboot_cpus() if ARCH_HIBERNATION_HEADER is unset.
That actually makes sense, because when ARCH_HIBERNATION_HEADER is unset, then
(a) the layout of the kernel text and static data during image restoration must
be the same as before hibernation (in which case issues like the MWAIT/MONITOR one
on x86 simply cannot happen) and (b) the restore kernel is unable to handle any
differences between the current (ie. image restoration time) and pre-hibernation
configurations of the system.
Thanks,
Rafael
next prev parent reply other threads:[~2016-07-07 12:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 9:16 Chen Yu
2016-07-07 0:33 ` Rafael J. Wysocki
2016-07-07 2:50 ` Chen, Yu C
2016-07-07 16:03 ` James Morse
2016-07-07 8:38 ` James Morse
2016-07-07 12:25 ` Rafael J. Wysocki [this message]
2016-07-10 1:49 ` [PATCH] x86 / hibernate: Use hlt_play_dead() when resuming from hibernation Rafael J. Wysocki
2016-07-13 9:56 ` Pavel Machek
2016-07-13 10:29 ` Chen Yu
2016-07-13 12:01 ` Rafael J. Wysocki
2016-07-13 12:41 ` Rafael J. Wysocki
2016-07-28 19:33 ` Pavel Machek
2016-07-14 1:55 ` [PATCH v2] " Rafael J. Wysocki
2016-07-14 8:57 ` Ingo Molnar
2016-07-28 19:34 ` Pavel Machek
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=14265008.RukW38MkjF@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®