From: Andrew Morton <akpm@linux-foundation.org>
To: Robin Holt <holt@sgi.com>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
"H. Peter Anvin" <hpa@zytor.com>, Russ Anderson <rja@sgi.com>,
Russell King <linux@arm.linux.org.uk>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
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>,
<stable@vger.kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH -v8 01/11] CPU hotplug: Provide a generic helper to disable/enable CPU hotplug
Date: Thu, 9 May 2013 15:01:21 -0700 [thread overview]
Message-ID: <20130509150121.8c3ef60b2fc748ce542a1a52@linux-foundation.org> (raw)
In-Reply-To: <1367937595-32241-2-git-send-email-holt@sgi.com>
On Tue, 7 May 2013 09:39:45 -0500 Robin Holt <holt@sgi.com> wrote:
> From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
>
> There are instances in the kernel where we would like to disable
> CPU hotplug (from sysfs) during some important operation. Today
> the freezer code depends on this and the code to do it was kinda
> tailor-made for that.
>
> Restructure the code and make it generic enough to be useful for
> other usecases too.
>
> ...
>
> --- a/include/linux/cpu.h
> +++ b/include/linux/cpu.h
> @@ -141,6 +141,8 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb)
> }
> #endif
>
> +extern void cpu_hotplug_disable(void);
> +extern void cpu_hotplug_enable(void);
> int cpu_up(unsigned int cpu);
> void notify_cpu_starting(unsigned int cpu);
> extern void cpu_maps_update_begin(void);
> @@ -148,6 +150,7 @@ extern void cpu_maps_update_done(void);
>
> #else /* CONFIG_SMP */
>
> +#define cpu_hotplug_disable() do { } while (0)
> #define cpu_notifier(fn, pri) do { (void)(fn); } while (0)
>
Breaks alpha allmodconfig because cpu_hotplug_disable() is absent from
vmlinux.
cpu_hotplug_disable() doesn't get compiled unless we've defined
CONFIG_PM_SLEEP_SMP. I cannot begin to imagine what the logic is
behind that!
I'll stick this in there and see what happens.
--- a/include/linux/cpu.h~cpu-hotplug-provide-a-generic-helper-to-disable-enable-cpu-hotplug-fix
+++ a/include/linux/cpu.h
@@ -141,8 +141,6 @@ static inline void unregister_cpu_notifi
}
#endif
-extern void cpu_hotplug_disable(void);
-extern void cpu_hotplug_enable(void);
int cpu_up(unsigned int cpu);
void notify_cpu_starting(unsigned int cpu);
extern void cpu_maps_update_begin(void);
@@ -150,7 +148,6 @@ extern void cpu_maps_update_done(void);
#else /* CONFIG_SMP */
-#define cpu_hotplug_disable() do { } while (0)
#define cpu_notifier(fn, pri) do { (void)(fn); } while (0)
static inline int register_cpu_notifier(struct notifier_block *nb)
@@ -171,6 +168,15 @@ static inline void cpu_maps_update_done(
}
#endif /* CONFIG_SMP */
+
+#ifdef CONFIG_PM_SLEEP_SMP
+extern void cpu_hotplug_enable(void);
+extern void cpu_hotplug_disable(void);
+#else
+#define cpu_hotplug_enable() do { } while (0)
+#define cpu_hotplug_disable() do { } while (0)
+#endif
+
extern struct bus_type cpu_subsys;
#ifdef CONFIG_HOTPLUG_CPU
next prev parent reply other threads:[~2013-05-09 22:01 UTC|newest]
Thread overview: 29+ 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 ` [PATCH -v8 01/11] CPU hotplug: Provide a generic helper to disable/enable CPU hotplug Robin Holt
2013-05-09 22:01 ` Andrew Morton [this message]
2013-05-10 11:11 ` Rafael J. Wysocki
2013-05-10 17:03 ` Andrew Morton
2013-05-11 4:16 ` Robin Holt
2013-05-11 9:13 ` Srivatsa S. Bhat
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 ` [PATCH -v8 03/11] Remove -stable friendly PF_THREAD_BOUND define 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 ` [PATCH -v8 05/11] checkpatch.pl the new kernel/reboot.c file 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 ` [PATCH -v8 07/11] unicore32, " 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 ` [PATCH -v8 09/11] arm, prepare reboot_mode for moving to generic kernel code 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 ` [PATCH -v8 11/11] Move arch/x86 reboot= handling to generic kernel Robin Holt
2013-05-08 10:39 ` Ingo Molnar
2013-05-08 18:20 ` Russell King - ARM Linux
2013-05-08 18:33 ` H. Peter Anvin
2013-05-09 11:20 ` Robin Holt
2013-05-09 13:01 ` Robin Holt
2013-05-09 13:36 ` Russell King - ARM Linux
2013-05-09 15:59 ` Robin Holt
2013-05-08 18:23 ` Russell King - ARM Linux
2013-05-09 11:29 ` Robin Holt
2013-05-08 20:50 ` Andrew Morton
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=20130509150121.8c3ef60b2fc748ce542a1a52@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gxt@mprc.pku.edu.cn \
--cc=holt@sgi.com \
--cc=hpa@zytor.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=rja@sgi.com \
--cc=rjw@sisk.pl \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=stable@vger.kernel.org \
--cc=x86@kernel.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 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®