New sysfs tree for hotplug
Quoted 18 lines · Greg KH
Quoted 8 lines · Keiichiro Tokunaga
I think it depends on a hotplug driver that is invoked when writing to a "eject" file. In the board case, a board hotplug driver (I'm making) handles those CPUs, memory, and PCI slots on the board. So my story for board hotplug is:
- user checks/knows what resources are on the board (dependency)
- user writes to the "eject" file of the board properly (invocation)Why not make a program that does all of this from userspace? It would turn off the proper CPUs, memory, and pci slots for a specific "board". Otherwise you are going to have to either:
- hook the current CPU, memory, and pci hotplug code to allow it to be called from within the kernel
- have your kernel code write to a the sysfs files from within kernelspace.
Quoted 1 line
Neither of which are acceptable things :(
Actually I'm expecting to use the first option (hook) in the current code of the board hotplug :)
The board hotplug is supposed to support "board attachment and detachment". That requires hardware manipulation. So, the hotplug code (at least, a part of the code) needs to live in the kernel space. Anyway, I would finish the first rough patches in a few days and post them. Please take a look at them to see what I'm trying to do.
Thank you,
Kei