linux-stable/arch/powerpc/platforms
Nathan Fontenot 999e2dadb6 powerpc/pseries: Create new device hotplug entry point
The current hotplug (or dlpar) of devices (the process is generally the
same for memory, cpu, and pci) on PowerVM systems is initiated
from the HMC, which communicates the request to the partitions through
the RSCT framework. The RSCT framework then invokes the drmgr command.
The drmgr command performs the hotplug operation by doing some pieces,
such as most of the rtas calls and device tree parsing, in userspace
and make requests to the kernel to online/offline the device, update the
device tree and add/remove the device.

For PowerKVM the approach for device hotplug is to follow what is currently
being done for pci hotplug. A hotplug request is initiated from the host.
QEMU then generates an EPOW interrupt to the guest which causes the guest
to make the rtas,check-exception call. In QEMU, the rtas,check-exception call
returns a rtas hotplug event to the guest.

Please note that the current pci hotplug path for PowerKVM involves the
kernel receiving the rtas hotplug event, passing it to rtas_errd in
userspace, and having rtas_errd invoke drmgr. The drmgr command then
handles the request as described above for PowerVM systems.

There is no need for this circuitous route, we should just handle the entire
hotplug of devices in the kernel. What I am planning is to enable this
by moving the code to handle hotplug from drmgr into the kernel to
provide a single path for handling device hotplug for both PowerVM and
PowerKVM systems. This patch provides the common iframework and entry point.
For PowerKVM a future update to the kernel rtas code will recognize rtas
hotplug events returned from rtas,check-exception calls and use the common
entry point to handle hotplug of the device.

For PowerVM systems, This patch creates /sys/kernel/dlpar that can be
used by the drmgr command to initiate hotplug requests. In order to do
this a string of the format "<resource> <action> <id_type> <id>" is
written to this file. The string consists of a resource (cpu, memory, pci,
phb), an action (add or remove), an id_type (count, drc index, drc name),
and the corresponding id. The kernel will parse the string and create a
rtas hotplug section that can be passed to the common entry point for
handling hotplug requests.

It should be noted that there is no chance of updating how we receive
hotplug (dlpar) requests from the HMC on PowerVM systems.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2015-03-17 11:02:58 +11:00
..
8xx powerpc/8xx: Remove Kconfig symbol FADS 2014-11-07 18:10:46 -06:00
40x powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
44x powerpc/44x/Akebono: Remove select of IBM_EMAC_RGMII_WOL 2014-12-29 15:45:44 +11:00
52xx Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
82xx powerpc: platforms: 82xx: drop owner assignment from platform_drivers 2014-10-20 16:20:11 +02:00
83xx PowerPC-83xx: Deletion of an unnecessary check before the function call "of_node_put" 2015-01-29 23:16:19 -06:00
85xx powerpc/85xx: Add support for Emerson/Artesyn MVME2500. 2015-01-29 22:57:42 -06:00
86xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
512x powerpc: call of_clk_init() from time_init() 2015-01-20 10:09:02 -08:00
amigaone lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig 2014-08-08 15:57:26 -07:00
cell powerpc updates for 3.20 2015-02-11 18:15:38 -08:00
chrp powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
embedded6xx powerpc: Remove some unused functions 2015-01-28 15:00:24 +11:00
maple powerpc: Remove superfluous bootmem includes 2014-11-10 09:59:26 +11:00
pasemi powerpc: platforms: pasemi: drop owner assignment from platform_drivers 2014-10-20 16:20:12 +02:00
powermac powerpc/powermac: Convert PCI to use generic config accessors 2015-01-30 16:14:43 -06:00
powernv powerpc/iommu: Remove IOMMU device references via bus notifier 2015-03-04 13:19:33 +11:00
ps3 powerpc/ps3: Write highmem info to repository 2015-01-22 17:31:21 +11:00
pseries powerpc/pseries: Create new device hotplug entry point 2015-03-17 11:02:58 +11:00
fsl_uli1575.c of/irq: Refactor interrupt-map parsing 2013-10-24 11:43:04 +01:00
Kconfig powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00
Kconfig.cputype Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-10-11 20:34:00 -04:00
Makefile powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00