From 31139971b3dc9fbb2e8a8572fb81e6e8470f363a Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 10 Sep 2005 21:13:13 +1000 Subject: [PATCH] ppc32: support hotplug cpu on powermacs This allows cpus to be off-lined on 32-bit SMP powermacs. When a cpu is off-lined, it is put into sleep mode with interrupts disabled. It can be on-lined again by asserting its soft-reset pin, which is connected to a GPIO pin. With this I can off-line the second cpu in my dual G4 powermac, which means that I can then suspend the machine (the suspend/resume code refuses to suspend if more than one cpu is online, and making it cope with multiple cpus is surprisingly messy). Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds --- include/asm-ppc/smp.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/asm-ppc/smp.h') diff --git a/include/asm-ppc/smp.h b/include/asm-ppc/smp.h index 17530c232c7..829481c0a9d 100644 --- a/include/asm-ppc/smp.h +++ b/include/asm-ppc/smp.h @@ -41,6 +41,10 @@ extern void smp_send_xmon_break(int cpu); struct pt_regs; extern void smp_message_recv(int, struct pt_regs *); +extern int __cpu_disable(void); +extern void __cpu_die(unsigned int cpu); +extern void cpu_die(void) __attribute__((noreturn)); + #define NO_PROC_ID 0xFF /* No processor magic marker */ #define PROC_CHANGE_PENALTY 20 @@ -64,6 +68,8 @@ extern struct klock_info_struct klock_info; #else /* !(CONFIG_SMP) */ +static inline void cpu_die(void) { } + #endif /* !(CONFIG_SMP) */ #endif /* !(_PPC_SMP_H) */ -- cgit v1.2.3