All of lore.kernel.org
 help / color / mirror / Atom feed
From: holt@sgi.com (Robin Holt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -v8 11/11] Move arch/x86 reboot= handling to generic kernel.
Date: Thu, 9 May 2013 10:59:31 -0500	[thread overview]
Message-ID: <20130509155931.GY3672@sgi.com> (raw)
In-Reply-To: <20130509133643.GU18614@n2100.arm.linux.org.uk>

On Thu, May 09, 2013 at 02:36:43PM +0100, Russell King - ARM Linux wrote:
> On Thu, May 09, 2013 at 08:01:20AM -0500, Robin Holt wrote:
> > diff --git a/include/linux/reboot.h b/include/linux/reboot.h
> > index 26cf11b..bc77231 100644
> > --- a/include/linux/reboot.h
> > +++ b/include/linux/reboot.h
> > @@ -15,6 +15,23 @@ enum reboot_mode {
> > +extern enum reboot_type reboot_type;
> > +
> > +extern int reboot_default;
> > +extern int reboot_cpu;
> > +extern int reboot_force;
> 
> Okay, these are globals...
> 
> > diff --git a/kernel/reboot.c b/kernel/reboot.c
> > index 0a97794..ff08af2 100644
> > --- a/kernel/reboot.c
> > +++ b/kernel/reboot.c
> > @@ -87,7 +88,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier);
> >  static void migrate_to_reboot_cpu(void)
> >  {
> >  	/* The boot cpu is always logical cpu 0 */
> > -	int reboot_cpu = 0;
> > +	int reboot_cpu = reboot_cpu;
> 
> Hmm, are you sure about that?

Again, I am an idiot.  I will fix this.  Thank you.

> > @@ -343,3 +344,80 @@ int orderly_poweroff(bool force)
> >  	return 0;
> >  }
> >  EXPORT_SYMBOL_GPL(orderly_poweroff);
> > +
> > +int reboot_default;
> > +enum reboot_mode reboot_mode = REBOOT_COLD;
> > +int reboot_cpu;
> > +enum reboot_type reboot_type = BOOT_ACPI;
> > +int reboot_force;
> 
> As you seem to want to reference these above, wouldn't it make sense to
> move them higher in the file?
> 
> > +		case 'c':
> > +		case 'h':
> > +			reboot_mode = REBOOT_COLD;
> > +			break;
> 
> I'm still not entirely convinced by making "hard" and "cold" mean the
> same thing, likewise "soft" and "warm".  As I previously explained but
> everyone seems to have ignored, solely focusing on the 's' problem
> instead.

OK.  I took your earlier comments to mean you would tolerate this patch
as is.  I will make the -v9 introduce REBOOT_HARD, REBOOT_SOFT and make
their meaning consistent with what is there now.

Thanks,
Robin

WARNING: multiple messages have this Message-ID (diff)
From: Robin Holt <holt@sgi.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Robin Holt <holt@sgi.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>, Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Russ Anderson <rja@sgi.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	Arm Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH -v8 11/11] Move arch/x86 reboot= handling to generic kernel.
Date: Thu, 9 May 2013 10:59:31 -0500	[thread overview]
Message-ID: <20130509155931.GY3672@sgi.com> (raw)
In-Reply-To: <20130509133643.GU18614@n2100.arm.linux.org.uk>

On Thu, May 09, 2013 at 02:36:43PM +0100, Russell King - ARM Linux wrote:
> On Thu, May 09, 2013 at 08:01:20AM -0500, Robin Holt wrote:
> > diff --git a/include/linux/reboot.h b/include/linux/reboot.h
> > index 26cf11b..bc77231 100644
> > --- a/include/linux/reboot.h
> > +++ b/include/linux/reboot.h
> > @@ -15,6 +15,23 @@ enum reboot_mode {
> > +extern enum reboot_type reboot_type;
> > +
> > +extern int reboot_default;
> > +extern int reboot_cpu;
> > +extern int reboot_force;
> 
> Okay, these are globals...
> 
> > diff --git a/kernel/reboot.c b/kernel/reboot.c
> > index 0a97794..ff08af2 100644
> > --- a/kernel/reboot.c
> > +++ b/kernel/reboot.c
> > @@ -87,7 +88,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier);
> >  static void migrate_to_reboot_cpu(void)
> >  {
> >  	/* The boot cpu is always logical cpu 0 */
> > -	int reboot_cpu = 0;
> > +	int reboot_cpu = reboot_cpu;
> 
> Hmm, are you sure about that?

Again, I am an idiot.  I will fix this.  Thank you.

> > @@ -343,3 +344,80 @@ int orderly_poweroff(bool force)
> >  	return 0;
> >  }
> >  EXPORT_SYMBOL_GPL(orderly_poweroff);
> > +
> > +int reboot_default;
> > +enum reboot_mode reboot_mode = REBOOT_COLD;
> > +int reboot_cpu;
> > +enum reboot_type reboot_type = BOOT_ACPI;
> > +int reboot_force;
> 
> As you seem to want to reference these above, wouldn't it make sense to
> move them higher in the file?
> 
> > +		case 'c':
> > +		case 'h':
> > +			reboot_mode = REBOOT_COLD;
> > +			break;
> 
> I'm still not entirely convinced by making "hard" and "cold" mean the
> same thing, likewise "soft" and "warm".  As I previously explained but
> everyone seems to have ignored, solely focusing on the 's' problem
> instead.

OK.  I took your earlier comments to mean you would tolerate this patch
as is.  I will make the -v9 introduce REBOOT_HARD, REBOOT_SOFT and make
their meaning consistent with what is there now.

Thanks,
Robin

  reply	other threads:[~2013-05-09 15:59 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 14:39 [PATCH -v8 00/11] Shutdown from reboot_cpuid without stopping other cpus Robin Holt
2013-05-07 14:39 ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 01/11] CPU hotplug: Provide a generic helper to disable/enable CPU hotplug Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-09 22:01   ` Andrew Morton
2013-05-09 22:01     ` Andrew Morton
2013-05-10 11:11     ` Rafael J. Wysocki
2013-05-10 11:11       ` Rafael J. Wysocki
2013-05-10 17:03       ` Andrew Morton
2013-05-10 17:03         ` Andrew Morton
2013-05-11  4:16         ` Robin Holt
2013-05-11  4:16           ` Robin Holt
2013-05-11  9:13           ` Srivatsa S. Bhat
2013-05-11  9:13             ` Srivatsa S. Bhat
2013-05-11  9:49             ` Robin Holt
2013-05-11  9:49               ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 02/11] Migrate shutdown/reboot to boot cpu Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 03/11] Remove -stable friendly PF_THREAD_BOUND define Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 04/11] Move shutdown/reboot related functions to kernel/reboot.c Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 05/11] checkpatch.pl the new kernel/reboot.c file Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 06/11] x86, prepare reboot_mode for moving to generic kernel code Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 07/11] unicore32, " Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 08/11] arm, Remove unused restart_mode fields from some arm subarchs Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 09/11] arm, prepare reboot_mode for moving to generic kernel code Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 10/11] arm, change reboot_mode to use enum reboot_mode Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-07 14:39 ` [PATCH -v8 11/11] Move arch/x86 reboot= handling to generic kernel Robin Holt
2013-05-07 14:39   ` Robin Holt
2013-05-08 10:39   ` Ingo Molnar
2013-05-08 10:39     ` Ingo Molnar
2013-05-08 18:20     ` Russell King - ARM Linux
2013-05-08 18:20       ` Russell King - ARM Linux
2013-05-08 18:33       ` H. Peter Anvin
2013-05-08 18:33         ` H. Peter Anvin
2013-05-09 11:20         ` Robin Holt
2013-05-09 11:20           ` Robin Holt
2013-05-09 13:01           ` Robin Holt
2013-05-09 13:01             ` Robin Holt
2013-05-09 13:36             ` Russell King - ARM Linux
2013-05-09 13:36               ` Russell King - ARM Linux
2013-05-09 15:59               ` Robin Holt [this message]
2013-05-09 15:59                 ` Robin Holt
2013-05-08 18:23   ` Russell King - ARM Linux
2013-05-08 18:23     ` Russell King - ARM Linux
2013-05-09 11:29     ` Robin Holt
2013-05-09 11:29       ` Robin Holt
2013-05-08 20:50   ` Andrew Morton
2013-05-08 20:50     ` Andrew Morton
2013-05-09 11:29     ` Robin Holt
2013-05-09 11:29       ` Robin Holt

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=20130509155931.GY3672@sgi.com \
    --to=holt@sgi.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.