android_kernel_xiaomi_sm8350/arch/powerpc
Gautham R Shenoy 3aa565f53c powerpc/pseries: Add hooks to put the CPU into an appropriate offline state
When a CPU is offlined on POWER currently, we call rtas_stop_self() and hand
the CPU back to the resource pool. This path is used for DLPAR which will
cause a change in the LPAR configuration which will be visible outside.

This patch changes the default state a CPU is put into when it is offlined.
On platforms which support ceding the processor to the hypervisor with
latency hint specifier value, during a cpu offline operation,
instead of calling rtas_stop_self(), we cede the vCPU to the hypervisor
while passing a latency hint specifier value. The Hypervisor can use this hint
to provide better energy savings. Also, during the offline
operation, the control of the vCPU remains with the LPAR as oppposed to
returning it to the resource pool.

The patch achieves this by creating an infrastructure to set the
preferred_offline_state() which can be either
- CPU_STATE_OFFLINE: which is the current behaviour of calling
  rtas_stop_self()

- CPU_STATE_INACTIVE: which cedes the vCPU to the hypervisor with the latency
  hint specifier.

The codepath which wants to perform a DLPAR operation can set the
preferred_offline_state() of a CPU to CPU_STATE_OFFLINE before invoking
cpu_down().

The patch also provides a boot-time command line argument to disable/enable
CPU_STATE_INACTIVE.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-11-24 14:33:04 +11:00
..
boot Merge commit 'jwb/next' into next 2009-11-24 10:02:16 +11:00
configs powerpc/86xx: Support for NVRAM on GE Fanuc's PPC9A 2009-11-20 16:45:37 -06:00
include/asm powerpc/pseries: Add extended_cede_processor() helper function. 2009-11-24 14:33:03 +11:00
kernel powerpc: Fixup last users of irq_chip->typename 2009-11-24 14:32:45 +11:00
kvm powerpc/kvm: Fix non-modular build 2009-11-05 17:17:12 +11:00
lib powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc/fsl-booke: Rework TLB CAM code 2009-11-20 16:45:33 -06:00
oprofile powerpc: Remove unnecessary semicolons 2009-07-08 13:50:21 +10:00
platforms powerpc/pseries: Add hooks to put the CPU into an appropriate offline state 2009-11-24 14:33:04 +11:00
sysdev powerpc: Fixup last users of irq_chip->typename 2009-11-24 14:32:45 +11:00
xmon powerpc/pseries: Add extended_cede_processor() helper function. 2009-11-24 14:33:03 +11:00
Kconfig powerpc/85xx/86xx: Add suspend/resume support 2009-11-11 21:43:28 -06:00
Kconfig.debug powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
Makefile powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00