All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qais Yousef <qais.yousef@arm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/12] ia64: Replace cpu_down with freeze_secondary_cpus
Date: Tue, 19 Nov 2019 22:32:35 +0000	[thread overview]
Message-ID: <20191119223234.ov323rcln4slj7br@e107158-lin.cambridge.arm.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1911192318400.6731@nanos.tec.linutronix.de>

On 11/19/19 23:21, Thomas Gleixner wrote:
> On Wed, 30 Oct 2019, Qais Yousef wrote:
> 
> > Use freeze_secondary_cpus() instead of open coding using cpu_down()
> > directly.
> > 
> > This also prepares to make cpu_up/down a private interface for anything
> > but the cpu subsystem.
> > 
> > Signed-off-by: Qais Yousef <qais.yousef@arm.com>
> > CC: Tony Luck <tony.luck@intel.com>
> > CC: Fenghua Yu <fenghua.yu@intel.com>
> > CC: linux-ia64@vger.kernel.org
> > CC: linux-kernel@vger.kernel.org
> > ---
> >  arch/ia64/kernel/process.c | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
> > index 968b5f33e725..70b433eafa5c 100644
> > --- a/arch/ia64/kernel/process.c
> > +++ b/arch/ia64/kernel/process.c
> > @@ -647,12 +647,8 @@ cpu_halt (void)
> >  void machine_shutdown(void)
> >  {
> >  #ifdef CONFIG_HOTPLUG_CPU
> > -	int cpu;
> > -
> > -	for_each_online_cpu(cpu) {
> > -		if (cpu != smp_processor_id())
> > -			cpu_down(cpu);
> > -	}
> > +	/* TODO: Can we use disable_nonboot_cpus()? */
> > +	freeze_secondary_cpus(smp_processor_id());
> 
> freeze_secondary_cpus() is only available for CONFIG_PM_SLEEP_SMP=y and
> disable_nonboot_cpus() is a NOOP for CONFIG_PM_SLEEP_SMP=n :)

I thought I replied to this :-(

My plan was to simply make freeze_secondary_cpus() available and protected by
CONFIG_SMP only instead.

Good plan?

I'll probably do it as a separate patch before this one.

Thanks

--
Qais Yousef

  reply	other threads:[~2019-11-19 22:32 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 15:38 [PATCH 00/12] Convert cpu_up/down to device_online/offline Qais Yousef
2019-10-30 15:38 ` [Xen-devel] " Qais Yousef
2019-10-30 15:38 ` [PATCH 01/12] arm64: hibernate.c: create a new function to handle cpu_up(sleep_cpu) Qais Yousef
2019-10-30 15:38   ` Qais Yousef
2019-11-19 22:31   ` Thomas Gleixner
2019-11-19 22:31     ` Thomas Gleixner
2019-11-19 22:51     ` Qais Yousef
2019-11-19 22:51       ` Qais Yousef
2019-11-19 23:01       ` Thomas Gleixner
2019-11-19 23:01         ` Thomas Gleixner
2019-11-19 23:21         ` Qais Yousef
2019-11-19 23:21           ` Qais Yousef
2019-10-30 15:38 ` [PATCH 02/12] x86: Replace cpu_up/down with devcie_online/offline Qais Yousef
2019-10-30 15:38 ` [PATCH 03/12] powerpc: Replace cpu_up/down with device_online/offline Qais Yousef
2019-10-30 15:38   ` Qais Yousef
2019-11-19  1:19   ` Michael Ellerman
2019-11-19  1:19     ` Michael Ellerman
2019-11-19  9:47     ` Qais Yousef
2019-11-19  9:47       ` Qais Yousef
2019-10-30 15:38 ` [PATCH 04/12] ia64: Replace cpu_down with freeze_secondary_cpus Qais Yousef
2019-11-02  4:59   ` kbuild test robot
2019-11-02  4:59     ` kbuild test robot
2019-11-02  4:59     ` kbuild test robot
2019-11-19 22:21   ` Thomas Gleixner
2019-11-19 22:21     ` Thomas Gleixner
2019-11-19 22:32     ` Qais Yousef [this message]
2019-11-19 22:59       ` Thomas Gleixner
2019-11-19 22:59         ` Thomas Gleixner
2019-11-19 23:19         ` Qais Yousef
2019-11-20  8:46           ` Thomas Gleixner
2019-11-20  8:46             ` Thomas Gleixner
2019-11-20 10:49             ` Qais Yousef
2019-10-30 15:38 ` [PATCH 05/12] sparc: Replace cpu_up/down with device_online/offline Qais Yousef
2019-10-30 19:33   ` David Miller
2019-10-30 19:33     ` David Miller
2019-10-30 15:38 ` [PATCH 06/12] parisc: " Qais Yousef
2019-11-20 11:09   ` Qais Yousef
2019-11-22 19:51     ` Helge Deller
2019-11-24 10:20       ` Qais Yousef
2019-10-30 15:38 ` [PATCH 07/12] driver: base: cpu: export device_online/offline Qais Yousef
2019-11-02 17:17   ` Greg Kroah-Hartman
2019-10-30 15:38 ` [PATCH 08/12] driver: xen: Replace cpu_up/down with device_online/offline Qais Yousef
2019-10-30 15:38   ` [Xen-devel] " Qais Yousef
2019-10-30 15:38 ` [PATCH 09/12] firmware: psci: " Qais Yousef
2019-10-30 15:38   ` Qais Yousef
2019-10-30 15:38 ` [PATCH 10/12] torture: " Qais Yousef
2019-10-30 15:38 ` [PATCH 11/12] smp: Create a new function to bringup nonboot cpus online Qais Yousef
2019-11-19 22:42   ` Thomas Gleixner
2019-10-30 15:38 ` [PATCH 12/12] cpu: Hide cpu_up/down Qais Yousef
2019-11-19 22:25   ` Thomas Gleixner
2019-11-19 22:36     ` Qais Yousef
2019-11-18 16:04 ` [PATCH 00/12] Convert cpu_up/down to device_online/offline Qais Yousef
2019-11-18 16:04   ` [Xen-devel] " Qais Yousef
2019-11-18 20:27   ` Thomas Gleixner
2019-11-18 20:27     ` [Xen-devel] " Thomas Gleixner

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=20191119223234.ov323rcln4slj7br@e107158-lin.cambridge.arm.com \
    --to=qais.yousef@arm.com \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.