Re: [PATCH 2.6][resend] Add DEVPATH env variable to hotplug helper call

Andrew Morton
2004-10-03T23:22:35Z

"Josef 'Jeff' Sipek" <jeffpc@optonline.net> wrote:
>
> Add $DEVPATH to the environmental variables during /sbin/hotplug call.
>
> Josef 'Jeff' Sipek.
>
> Signed-off-by: Josef 'Jeff' Sipek <jeffpc@optonline.net>
>
>
> diff -Nru a/kernel/cpu.c b/kernel/cpu.c
> --- a/kernel/cpu.c 2004-09-24 13:08:57 -04:00
> +++ b/kernel/cpu.c 2004-09-24 13:08:57 -04:00
> @@ -61,13 +61,13 @@
> * cpu' with certain environment variables set. */
> static int cpu_run_sbin_hotplug(unsigned int cpu, const char *action)

I don't think this function should exist at all. We already have kobjects
which represent the CPUs so it should be possible to find that kobject and
use kobject_hotplug() on it. That gives you your $DEVPATH.

Does CPU hotplug behave correctly wrt /sys/devices/system/cpu? Given that
register_cpu() is still marked __init, I assume not.