From: mingo@kernel.org (Ingo Molnar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -v7 11/11] Move arch/x86 reboot= handling to generic kernel.
Date: Thu, 2 May 2013 09:34:00 +0200 [thread overview]
Message-ID: <20130502073400.GD26361@gmail.com> (raw)
In-Reply-To: <1367428011-17123-12-git-send-email-holt@sgi.com>
* Robin Holt <holt@sgi.com> wrote:
> Merge together the unicore32, arm, and x86 reboot= command line
> parameter handling.
Nice!
> + switch (*str) {
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> + case 'w':
> + reboot_mode = REBOOT_WARM;
> + break;
> +
> + case 'c':
> + reboot_mode = REBOOT_COLD;
> + break;
> +
> +#ifdef CONFIG_SMP
> + case 's':
> + if (isdigit(*(str+1))) {
> + reboot_cpu = (int) (*(str+1) - '0');
> + if (isdigit(*(str+2)))
> + reboot_cpu = reboot_cpu*10 + (int)(*(str+2) - '0');
> + }
> + /*
> + * We will leave sorting out the final value
> + * when we are ready to reboot, since we might not
> + * have detected BSP APIC ID or smp_num_cpu
> + */
> + break;
> +#endif /* CONFIG_SMP */
> +
> +#else
> + case 's':
> + reboot_mode = REBOOT_WARM;
> + case 'h':
> + reboot_mode = REBOOT_COLD;
> +#endif
This architecture dependent bit is not so nice.
I doubt the 's' parameter is used widely at all on x86 [it's more like a
debug/hack parameter], so might as well just pick up a new character (for
example capital 'S'?) and have the same parameters on every architecture.
Thanks,
Ingo
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Robin Holt <holt@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Russell King <linux@arm.linux.org.uk>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
Miguel Boton <mboton.lkml@gmail.com>, 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 -v7 11/11] Move arch/x86 reboot= handling to generic kernel.
Date: Thu, 2 May 2013 09:34:00 +0200 [thread overview]
Message-ID: <20130502073400.GD26361@gmail.com> (raw)
In-Reply-To: <1367428011-17123-12-git-send-email-holt@sgi.com>
* Robin Holt <holt@sgi.com> wrote:
> Merge together the unicore32, arm, and x86 reboot= command line
> parameter handling.
Nice!
> + switch (*str) {
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> + case 'w':
> + reboot_mode = REBOOT_WARM;
> + break;
> +
> + case 'c':
> + reboot_mode = REBOOT_COLD;
> + break;
> +
> +#ifdef CONFIG_SMP
> + case 's':
> + if (isdigit(*(str+1))) {
> + reboot_cpu = (int) (*(str+1) - '0');
> + if (isdigit(*(str+2)))
> + reboot_cpu = reboot_cpu*10 + (int)(*(str+2) - '0');
> + }
> + /*
> + * We will leave sorting out the final value
> + * when we are ready to reboot, since we might not
> + * have detected BSP APIC ID or smp_num_cpu
> + */
> + break;
> +#endif /* CONFIG_SMP */
> +
> +#else
> + case 's':
> + reboot_mode = REBOOT_WARM;
> + case 'h':
> + reboot_mode = REBOOT_COLD;
> +#endif
This architecture dependent bit is not so nice.
I doubt the 's' parameter is used widely at all on x86 [it's more like a
debug/hack parameter], so might as well just pick up a new character (for
example capital 'S'?) and have the same parameters on every architecture.
Thanks,
Ingo
next prev parent reply other threads:[~2013-05-02 7:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 17:06 [PATCH -v7 0/11] Shutdown from reboot_cpuid without stopping other cpus Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 01/11] CPU hotplug: Provide a generic helper to disable/enable CPU hotplug Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 02/11] Migrate shutdown/reboot to boot cpu Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 03/11] Remove -stable friendly PF_THREAD_BOUND define Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 04/11] Move shutdown/reboot related functions to kernel/reboot.c Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 05/11] checkpatch.pl the new kernel/reboot.c file Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 06/11] x86, prepare reboot_mode for moving to generic kernel code Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 07/11] unicore32, " Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 08/11] arm, Remove unused restart_mode fields from some arm subarchs Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 23:09 ` Russell King - ARM Linux
2013-05-01 23:09 ` Russell King - ARM Linux
2013-05-01 17:06 ` [PATCH -v7 09/11] arm, prepare reboot_mode for moving to generic kernel code Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 10/11] arm, change reboot_mode to use enum reboot_mode Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-02 7:30 ` Ingo Molnar
2013-05-02 7:30 ` Ingo Molnar
2013-05-02 12:49 ` Robin Holt
2013-05-02 12:49 ` Robin Holt
2013-05-01 17:06 ` [PATCH -v7 11/11] Move arch/x86 reboot= handling to generic kernel Robin Holt
2013-05-01 17:06 ` Robin Holt
2013-05-02 7:34 ` Ingo Molnar [this message]
2013-05-02 7:34 ` Ingo Molnar
2013-05-01 23:13 ` [PATCH -v7 0/11] Shutdown from reboot_cpuid without stopping other cpus Russell King - ARM Linux
2013-05-01 23:13 ` Russell King - ARM Linux
2013-05-02 2:19 ` Robin Holt
2013-05-02 2:19 ` Robin Holt
2013-05-02 3:39 ` Robin Holt
2013-05-02 3:39 ` Robin Holt
2013-05-02 18:05 ` Russell King - ARM Linux
2013-05-02 18:05 ` Russell King - ARM Linux
2013-05-03 19:05 ` Robin Holt
2013-05-03 19:05 ` 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=20130502073400.GD26361@gmail.com \
--to=mingo@kernel.org \
--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.