aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Weinberger <[email protected]>2016-07-13 17:17:01 +0000
committerIngo Molnar <[email protected]>2016-07-15 10:41:43 +0200
commit31487f8328f20fdb302430b020a5d6e8446c1971 (patch)
tree73d62b623424d059cd36633bcdf54de2e7d12240 /include/linux
parent6b2c28471de550308784560206c3365e5179d42f (diff)
smp/cfd: Convert core to hotplug state machine
Install the callbacks via the state machine. They are installed at runtime so smpcfd_prepare_cpu() needs to be invoked by the boot-CPU. Signed-off-by: Richard Weinberger <[email protected]> [ Added the dropped CPU dying case back in. ] Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: Anna-Maria Gleixner <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]> Cc: Davidlohr Bueso <dave@stgolabs> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpuhotplug.h2
-rw-r--r--include/linux/smp.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 78170827a776..b5cf01ace71b 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -18,6 +18,7 @@ enum cpuhp_state {
CPUHP_HRTIMERS_PREPARE,
CPUHP_PROFILE_PREPARE,
CPUHP_X2APIC_PREPARE,
+ CPUHP_SMPCFD_PREPARE,
CPUHP_TIMERS_DEAD,
CPUHP_NOTIFY_PREPARE,
CPUHP_BRINGUP_CPU,
@@ -57,6 +58,7 @@ enum cpuhp_state {
CPUHP_AP_ARM_CORESIGHT4_STARTING,
CPUHP_AP_ARM64_ISNDEP_STARTING,
CPUHP_AP_LEDTRIG_STARTING,
+ CPUHP_AP_SMPCFD_DYING,
CPUHP_AP_X86_TBOOT_DYING,
CPUHP_AP_NOTIFY_STARTING,
CPUHP_AP_ONLINE,
diff --git a/include/linux/smp.h b/include/linux/smp.h
index c4414074bd88..eccae4690f41 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -196,4 +196,9 @@ extern void arch_enable_nonboot_cpus_end(void);
void smp_setup_processor_id(void);
+/* SMP core functions */
+int smpcfd_prepare_cpu(unsigned int cpu);
+int smpcfd_dead_cpu(unsigned int cpu);
+int smpcfd_dying_cpu(unsigned int cpu);
+
#endif /* __LINUX_SMP_H */