]> www.infradead.org Git - users/dwmw2/linux.git/commit
powerpc/pseries/dlpar: Add device tree nodes for DLPAR IO add
authorHaren Myneni <haren@linux.ibm.com>
Thu, 22 Aug 2024 02:50:28 +0000 (19:50 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Aug 2024 11:31:25 +0000 (21:31 +1000)
commit02b98ff44a57c1376c5a92a8518fda5c82bb5a91
tree89fd7050abcf3ddd288a846c8b391d98dc3e8c0c
parent17a51171c20d590d3d3c632bcdd946f5fc3c0061
powerpc/pseries/dlpar: Add device tree nodes for DLPAR IO add

In the powerpc-pseries specific implementation, the IO hotplug
event is handled in the user space (drmgr tool). For the DLPAR
IO ADD, the corresponding device tree nodes and properties will
be added to the device tree after the device enable. The user
space (drmgr tool) uses configure_connector RTAS call with the
DRC index to retrieve the device nodes and updates the device
tree by writing to /proc/ppc64/ofdt. Under system lockdown,
/dev/mem access to allocate buffers for configure_connector RTAS
call is restricted which means the user space can not issue this
RTAS call and also can not access to /proc/ppc64/ofdt. The
pseries implementation need user interaction to power-on and add
device to the slot during the ADD event handling. So adds
complexity if the complete hotplug ADD event handling moved to
the kernel.

To overcome /dev/mem access restriction, this patch extends the
/sys/kernel/dlpar interface and provides ‘dt add index <drc_index>’
to the user space. The drmgr tool uses this interface to update
the device tree whenever the device is added. This interface
retrieves device tree nodes for the corresponding DRC index using
the configure_connector RTAS call and adds new device nodes /
properties to the device tree.

Signed-off-by: Scott Cheloha <cheloha@linux.ibm.com>
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240822025028.938332-3-haren@linux.ibm.com
arch/powerpc/platforms/pseries/dlpar.c