diff options
author | Mark Rutland <mark.rutland@arm.com> | 2013-09-02 19:49:07 +0800 |
---|---|---|
committer | Graeme Gregory <graeme.gregory@linaro.org> | 2013-09-25 14:03:20 +0100 |
commit | 7d8041d38cee83581300393316cc1c2f7f2623a5 (patch) | |
tree | 352a1e46d56b577ea7a419a760a051f0e7f2f61f /arch/arm64/include | |
parent | d0ce15b0d1dce6e7313f34739ad7caca9ea4dd68 (diff) |
arm64: add CPU_HOTPLUG infrastructure
This patch adds the basic infrastructure necessary to support
CPU_HOTPLUG on arm64, based on the arm implementation. Actual hotplug
support will depend on an implementation's smp_operations (e.g. PSCI).
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/irq.h | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/smp.h | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/irq.h b/arch/arm64/include/asm/irq.h index 0332fc077f6e..e1f7ecdde11f 100644 --- a/arch/arm64/include/asm/irq.h +++ b/arch/arm64/include/asm/irq.h @@ -4,6 +4,7 @@ #include <asm-generic/irq.h> extern void (*handle_arch_irq)(struct pt_regs *); +extern void migrate_irqs(void); extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); #endif diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index 831090ae6804..d2ef02e67f61 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -67,6 +67,11 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); struct device_node; +extern int __cpu_disable(void); + +extern void __cpu_die(unsigned int cpu); +extern void cpu_die(void); + /** * struct smp_operations - Callback operations for hotplugging CPUs. * @@ -80,6 +85,11 @@ struct device_node; * @cpu_boot: Boots a cpu into the kernel. * @cpu_postboot: Optionally, perform any post-boot cleanup or necesary * synchronisation. Called from the cpu being booted. + * @cpu_disable: Prepares a cpu to die. May fail for some mechanism-specific + * reason, which will cause the hot unplug to be aborted. Called + * from the cpu to be killed. + * @cpu_die: Makes the a leave the kernel. Must not fail. Called from the + * cpu being killed. */ struct smp_operations { const char *name; @@ -87,6 +97,10 @@ struct smp_operations { int (*cpu_prepare)(unsigned int); int (*cpu_boot)(unsigned int); void (*cpu_postboot)(void); +#ifdef CONFIG_HOTPLUG_CPU + int (*cpu_disable)(unsigned int cpu); + void (*cpu_die)(unsigned int cpu); +#endif }; extern const struct smp_operations smp_spin_table_ops; |