]> www.infradead.org Git - users/willy/xarray.git/commit
powerpc/pseries/dlpar: Remove device tree node for DLPAR IO remove
authorHaren Myneni <haren@linux.ibm.com>
Thu, 22 Aug 2024 02:50:27 +0000 (19:50 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Aug 2024 11:31:25 +0000 (21:31 +1000)
commit17a51171c20d590d3d3c632bcdd946f5fc3c0061
treeb0eb47fef76219dc09b2108ce084e00628610e21
parentb76e0d4215b6b622127ebcceaa7f603313ceaec4
powerpc/pseries/dlpar: Remove device tree node for DLPAR IO remove

In the powerpc-pseries specific implementation, the IO hotplug
event is handled in the user space (drmgr tool). But update the
device tree and /dev/mem access to allocate buffers for some
RTAS calls are restricted when the kernel lockdown feature is
enabled. For the DLPAR IO REMOVE, the corresponding device tree
nodes and properties have to be removed from the device tree
after the device disable. The user space removes the device tree
nodes by updating /proc/ppc64/ofdt which is not allowed  under
system lockdown is enabled. This restriction can be resolved
by moving the complete IO hotplug handling in the kernel. But
the pseries implementation need user interaction to power off
and to remove device from the slot during hotplug event handling.

To overcome the /proc/ppc64/ofdt restriction, this patch extends
the /sys/kernel/dlpar interface and provides
‘dt remove index <drc_index>’ to the user space so that drmgr
tool can remove the corresponding device tree nodes based on DRC
index from 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-2-haren@linux.ibm.com
arch/powerpc/include/asm/rtas.h
arch/powerpc/platforms/pseries/dlpar.c