diff options
Diffstat (limited to 'arch/powerpc')
| -rw-r--r-- | arch/powerpc/Kconfig | 4 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/machdep.h | 5 | ||||
| -rw-r--r-- | arch/powerpc/kernel/sysfs.c | 19 |
3 files changed, 28 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5dbd375a3f2a..0df57466e783 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -320,6 +320,10 @@ config HOTPLUG_CPU | |||
| 320 | 320 | ||
| 321 | Say N if you are unsure. | 321 | Say N if you are unsure. |
| 322 | 322 | ||
| 323 | config ARCH_CPU_PROBE_RELEASE | ||
| 324 | def_bool y | ||
| 325 | depends on HOTPLUG_CPU | ||
| 326 | |||
| 323 | config ARCH_ENABLE_MEMORY_HOTPLUG | 327 | config ARCH_ENABLE_MEMORY_HOTPLUG |
| 324 | def_bool y | 328 | def_bool y |
| 325 | 329 | ||
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 9efa2be78331..9f0fc9e6ce0d 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
| @@ -266,6 +266,11 @@ struct machdep_calls { | |||
| 266 | void (*suspend_disable_irqs)(void); | 266 | void (*suspend_disable_irqs)(void); |
| 267 | void (*suspend_enable_irqs)(void); | 267 | void (*suspend_enable_irqs)(void); |
| 268 | #endif | 268 | #endif |
| 269 | |||
| 270 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | ||
| 271 | ssize_t (*cpu_probe)(const char *, size_t); | ||
| 272 | ssize_t (*cpu_release)(const char *, size_t); | ||
| 273 | #endif | ||
| 269 | }; | 274 | }; |
| 270 | 275 | ||
| 271 | extern void e500_idle(void); | 276 | extern void e500_idle(void); |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 956ab33fd73f..e235e52dc4fe 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
| @@ -461,6 +461,25 @@ static void unregister_cpu_online(unsigned int cpu) | |||
| 461 | 461 | ||
| 462 | cacheinfo_cpu_offline(cpu); | 462 | cacheinfo_cpu_offline(cpu); |
| 463 | } | 463 | } |
| 464 | |||
| 465 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | ||
| 466 | ssize_t arch_cpu_probe(const char *buf, size_t count) | ||
| 467 | { | ||
| 468 | if (ppc_md.cpu_probe) | ||
| 469 | return ppc_md.cpu_probe(buf, count); | ||
| 470 | |||
| 471 | return -EINVAL; | ||
| 472 | } | ||
| 473 | |||
| 474 | ssize_t arch_cpu_release(const char *buf, size_t count) | ||
| 475 | { | ||
| 476 | if (ppc_md.cpu_release) | ||
| 477 | return ppc_md.cpu_release(buf, count); | ||
| 478 | |||
| 479 | return -EINVAL; | ||
| 480 | } | ||
| 481 | #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ | ||
| 482 | |||
| 464 | #endif /* CONFIG_HOTPLUG_CPU */ | 483 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 465 | 484 | ||
| 466 | static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, | 485 | static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, |
