android_kernel_xiaomi_sm8350/arch/powerpc/platforms/pseries
Gautham R Shenoy 51badebdcf powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
Currently the cpu-allocation/deallocation process comprises of two steps:
- Set the indicators and to update the device tree with DLPAR node
  information.

- Online/offline the allocated/deallocated CPU.

This is achieved by writing to the sysfs tunables "probe" during allocation
and "release" during deallocation.

At the sametime, the userspace can independently online/offline the CPUs of
the system using the sysfs tunable "online".

It is quite possible that when a userspace tool offlines a CPU
for the purpose of deallocation and is in the process of updating the device
tree, some other userspace tool could bring the CPU back online by writing to
the "online" sysfs tunable thereby causing the deallocate process to fail.

The solution to this is to serialize writes to the "probe/release" sysfs
tunable with the writes to the "online" sysfs tunable.

This patch employs a mutex to provide this serialization, which is a no-op on
all architectures except PPC_PSERIES

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-12-09 17:09:36 +11:00
..
cmm.c powerpc: Add kdump support to Collaborative Memory Manager 2009-10-30 17:20:56 +11:00
dlpar.c powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate 2009-12-09 17:09:36 +11:00
dtl.c const: constify remaining file_operations 2009-10-01 16:11:11 -07:00
eeh_cache.c
eeh_driver.c powerpc/pseries: Use irq_has_action() in eeh_disable_irq() 2009-10-30 17:20:54 +11:00
eeh_event.c
eeh_sysfs.c
eeh.c PCI/powerpc: support PCIe fundamental reset 2009-09-09 13:29:41 -07:00
firmware.c powerpc: Fix hypervisor TLB batching 2009-10-14 16:58:37 +11:00
hotplug-cpu.c powerpc/pseries: Add hooks to put the CPU into an appropriate offline state 2009-11-24 14:33:04 +11:00
hotplug-memory.c
hvCall_inst.c seq_file: constify seq_operations 2009-09-23 07:39:29 -07:00
hvCall.S
hvconsole.c
hvcserver.c
iommu.c powerpc: Change archdata dma_data to a union 2009-09-24 15:31:43 +10:00
Kconfig powerpc: Add kdump support to Collaborative Memory Manager 2009-10-30 17:20:56 +11:00
kexec.c
lpar.c powerpc/pseries: Use pr_devel() in pseries LPAR HPTE routines 2009-07-08 13:50:21 +10:00
Makefile powerpc/pseries: Kernel DLPAR Infrastructure 2009-12-09 17:09:32 +11:00
msi.c powerpc/pci: Fix regression in powerpc MSI-X 2009-11-05 17:06:27 +11:00
nvram.c
offline_states.h powerpc/pseries: Add hooks to put the CPU into an appropriate offline state 2009-11-24 14:33:04 +11:00
pci_dlpar.c powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan() 2009-09-02 15:45:53 +10:00
pci.c
phyp_dump.c
plpar_wrappers.h powerpc/pseries: Add extended_cede_processor() helper function. 2009-11-24 14:33:03 +11:00
power.c
pseries.h
ras.c
reconfig.c powerpc/pseries: Kernel DLPAR Infrastructure 2009-12-09 17:09:32 +11:00
scanlog.c powerpc: Move /proc/ppc64 to /proc/powerpc and add symlink 2009-10-30 17:20:53 +11:00
setup.c powerpc: Fix bug where perf_counters breaks oprofile 2009-09-11 11:27:58 +10:00
smp.c powerpc/pseries: Add hooks to put the CPU into an appropriate offline state 2009-11-24 14:33:04 +11:00
xics.c powerpc: Fixup last users of irq_chip->typename 2009-11-24 14:32:45 +11:00
xics.h