[PATCH 2/3] sysfs cpu probe/release files

Paul Mackerras paulus at samba.org
Wed Nov 25 14:20:03 EST 2009


Nathan Fontenot writes:

> Create new probe and release sysfs files to facilitate adding and removing
> cpus from the system.  This also creates the powerpc specific stubs to handle
> the arch callouts from writes to the sysfs files.
> 
> The creation and use of these files is regulated by the 
> CONFIG_ARCH_CPU_PROBE_RELEASE option so that only architectures that need the
> capability will have the files created.
> 
> Signed-off-by: Nathan Fontenot <nfont at austin.ibm.com>
> ---
>  arch/powerpc/Kconfig               |    4 ++++
>  arch/powerpc/include/asm/machdep.h |    5 +++++
>  arch/powerpc/kernel/sysfs.c        |   19 +++++++++++++++++++
>  drivers/base/cpu.c                 |   32 ++++++++++++++++++++++++++++++++

Since this touches drivers/base/cpu.c, you should cc Greg KH on this
patch and get an ack from him, assuming these patches are going in
through the powerpc tree.

> --- powerpc.orig/include/linux/cpu.h	2009-11-23 18:19:23.000000000 -0600
> +++ powerpc/include/linux/cpu.h	2009-11-24 14:30:07.000000000 -0600
> @@ -43,6 +43,10 @@
>  
>  #ifdef CONFIG_HOTPLUG_CPU
>  extern void unregister_cpu(struct cpu *cpu);
> +#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
> +extern ssize_t arch_cpu_probe(const char *, size_t);
> +extern ssize_t arch_cpu_release(const char *, size_t);
> +#endif

Since these are just declarations, they don't need the #ifdef around
them.

Paul.


More information about the Linuxppc-dev mailing list