Re: [PATCH-WIP] convert CPU sysdev class to a real subsytem (neededfor CPU modaliases)

From: Greg KH
Date: Thu Dec 08 2011 - 19:11:59 EST


On Thu, Dec 08, 2011 at 02:58:37AM +0100, Kay Sievers wrote:
> This patch is work-in-progress and just posted to coordinate with Andi
> Kleen's current export of CPU modaliases. It boots my x86_64 workstation
> fine, nothing else is tested.
>
> The CPU subsystem from a sysdev_class to a plain driver-core subsystem
> (currently called 'bus').
>
> With the CPUs as normal devices, userspace will pick the events up
> properly and udev is able to coldplug the devices during bootup, which
> will allow proper module autoloading based on MODALIAS.
>
> $ tree /sys/bus/cpu/
> /sys/bus/cpu/
> âââ devices
> â âââ cpu0 -> ../../../devices/system/cpu/cpu0
> â âââ cpu1 -> ../../../devices/system/cpu/cpu1
> â âââ cpu2 -> ../../../devices/system/cpu/cpu2
> â âââ cpu3 -> ../../../devices/system/cpu/cpu3
> ...
> âââ uevent
>
> The needed bits to easily convert the remaining sysdev class users to a
> plain subsystem and plain devices have been added to the driver core.
> Sysdev drivers have never been 'drivers' in the driver-core sense, and
> they can be now ported-over to subsys_interfaces. The end goal is to
> finally remove all of the ugly sysdev hack from the system.
>
> Greg, I guess we need a bit of your time, to make a plan and get the
> remaining things sorted out. We are planning and fiddling for years
> already here, and we should finally get the stuff out. :)

I agree, I want this to get done finally.

> Greg, I think with the subsys_interfaces we do not need the
> 'multi-driver-binding' anymore, seems we can get away with the
> interfaces only. Classes which need to convert to buses because the
> class interface is not extensible can be easily converted now. The only
> missing piece is the 'glue directory'. We should be able to unify
> classes and buses internally with all that stuff.

Ah, good, I was stalled on this because of the multi-driver-binding
stuff. If that's not needed, I'll gladly take any patches for this.

So, what do I need to do here? Your patch looks good at first glance,
the interface logic looks sane, is that all that we really need to do to
the core?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/