[PATCH 3/5 v4] Export memory_sysdev_class

Nathan Fontenot nfont at austin.ibm.com
Fri Oct 23 02:31:03 EST 2009

Dave Hansen wrote:
> On Wed, 2009-10-21 at 09:44 -0500, Nathan Fontenot wrote:
>> Export the memory_sysdev_class structure.  This is needed so we can create
>> a 'release' file in sysfs in addition to the existing 'probe' file in
>> order to support DLPAR removal of memory on the powerpc/pseries platform.
>> The new 'release' file will be powerpc/pseries only.
> Please do it in generic code.  You may only need it on ppc today, but
> somebody else is going to want the same thing tomorrow on another arch.

I thought about this but wasn't sure if having the probe/release sysfs files
for memory and cpu be in generic code would be accepted.

Would it be acceptable to put the new release file for memory under the
ARCH_MEMORY_PROBE config option?  This would reduce the number of arch'es
that would require stubs as it appears only powerpc and x86 define this.

I could do the same thing for the cpu probe/release files and a new
ARCH_CPU_PROBE config option which would eliminate the required stubs
in arch'es other than powerpc right now.

-Nathan Fontenot
> It's also nice to keep all of the stuff doing the actual sysfs munging
> in one place.  I know it'll cost a few stubs for calling in and out of
> arch code, but it should save some work down the road for somebody else.
> -- Dave

More information about the Linuxppc-dev mailing list