linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Will Deacon <will.deacon@arm.com>
Cc: James Morse <james.morse@arm.com>,
	linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	linux-pm@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Ingo Molnar <mingo@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 1/3] cpu/hotplug: Allow suspend/resume CPU to be specified
Date: Fri, 26 Aug 2016 12:09:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1608261207510.5714@nanos> (raw)
In-Reply-To: <20160826093241.GC13554@arm.com>

On Fri, 26 Aug 2016, Will Deacon wrote:
> On Wed, Aug 17, 2016 at 01:50:25PM +0100, James Morse wrote:
> > disable_nonboot_cpus() assumes that the lowest numbered online CPU is
> > the boot CPU, and that this is the correct CPU to run any power
> > management code on.
> > 
> > On x86 this is always correct, as CPU0 cannot (easily) by taken offline.
> > 
> > On arm64 CPU0 can be taken offline. For hibernate/resume this means we
> > may hibernate on a CPU other than CPU0. If the system is rebooted with
> > kexec 'CPU0' will be assigned to a different physical CPU. This
> > complicates hibernate/resume as now we can't trust the CPU numbers.
> > Arch code can find the correct physical CPU, and ensure it is online
> > before resume from hibernate begins, but also needs to influence
> > disable_nonboot_cpus()s choice of CPU.
> > 
> > Rename disable_nonboot_cpus() as freeze_secondary_cpus() and add an
> > argument indicating which CPU should be left standing. Follow the logic
> > in migrate_to_reboot_cpu() to use the lowest numbered online CPU if the
> > requested CPU is not online.
> > Add disable_nonboot_cpus() as an inline function that has the existing
> > behaviour.
> > 
> > Signed-off-by: James Morse <james.morse@arm.com>
> > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> > ---
> > An alternative is to provide two functions calling a common function,
> > but this would mean spilling the cpu_maps_update_begin() into these two.
> > 
> >  include/linux/cpu.h | 6 +++++-
> >  kernel/cpu.c        | 9 +++++----
> >  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> Thomas, does this look ok to you? If so, would you prefer to merge this
> series via -tip, or have us take this one via the arm64 tree?

You can take it via ARM64. It's not conflicting with the stuff I have in the
pipeline.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

  reply	other threads:[~2016-08-26 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 12:50 [PATCH v5 0/3] arm64: hibernate: Resume when hibernate image created on non-boot CPU James Morse
2016-08-17 12:50 ` [PATCH v5 1/3] cpu/hotplug: Allow suspend/resume CPU to be specified James Morse
2016-08-26  9:32   ` Will Deacon
2016-08-26 10:09     ` Thomas Gleixner [this message]
2016-08-26 10:19       ` Will Deacon
2016-08-17 12:50 ` [PATCH v5 2/3] arm64: hibernate: Resume when hibernate image created on non-boot CPU James Morse
2016-08-17 12:50 ` [PATCH v5 3/3] Revert "arm64: hibernate: Refuse to hibernate if the boot cpu is offline" James Morse
2016-09-14  1:07 ` [PATCH v5 0/3] arm64: hibernate: Resume when hibernate image created on non-boot CPU Rafael J. Wysocki
2016-09-14  8:09   ` James Morse
2016-09-14 16:52     ` Rafael J. Wysocki

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=alpine.DEB.2.20.1608261207510.5714@nanos \
    --to=tglx@linutronix.de \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=will.deacon@arm.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;
as well as URLs for NNTP newsgroup(s).