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

Keshavamurthy Anil S
2004-10-04T19:53:21Z

On Mon, Oct 04, 2004 at 12:37:25PM -0700, Andrew Morton wrote:
> Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com> wrote:
> >
> > On Sun, Oct 03, 2004 at 04:20:12PM -0700, Andrew Morton wrote:
> > > Does CPU hotplug behave correctly wrt /sys/devices/system/cpu? Given that
> > > register_cpu() is still marked __init, I assume not.
> >
> > Currently what we have in the kernel is logical cpu hotplug, i.e once the
> > cpu is registered via register_cpu() that cpu can only go offline and still
> > the entry for that cpu will be present in the /sys/devices/system/cpu/cpuX/online.
> >
> > So __init register_cpu() is fine untill we support unregister_cpu()
> > which is required for physical cpu hotplug case.
> >
> > I have submitted ACPI based physical cpu hotplug patches and waiting to here from
> > ACPI mainitainer Len Brown, there I have taken care to support unregister_cpu()
> > and register_cpu() is marked as __devinit in those patches.
>
> OK...
>
> But still, cpu_run_sbin_hotplug() should not exist. It is duplicating
> (indeed, emulating) kobject_hotplug() behaviour. To the extent that it now
> has a hardwired sysfs path embedded in it:
>
> sprintf(devpath_str, "DEVPATH=devices/system/cpu/cpu%d", cpu);
>
> which should have been obtained from kobject_get_path().
Yes, I agree to your point that cpu_run_sbin_hotplug() is duplication kobject_hotplug()
behaviour. I will send you a patch to fix this ASAP(hopefully before end of today).

thanks,
Anil