]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Move idle_loop_prolog()/epilog() functions to header file
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Tue, 7 Apr 2020 08:47:39 +0000 (14:17 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 30 Apr 2020 02:35:26 +0000 (12:35 +1000)
commitfae74abffbc3a4f370dc47585d6591801e2f1d80
tree18184ec620d162c329688b73403a2dd2e8b9e046
parentb461446657562e341b128930d7d71ba46e6a693c
powerpc: Move idle_loop_prolog()/epilog() functions to header file

Currently prior to entering an idle state on a Linux Guest, the
pseries cpuidle driver implement an idle_loop_prolog() and
idle_loop_epilog() functions which ensure that idle_purr is correctly
computed, and the hypervisor is informed that the CPU cycles have been
donated.

These prolog and epilog functions are also required in the default
idle call, i.e pseries_lpar_idle(). Hence move these accessor
functions to a common header file and call them from
pseries_lpar_idle(). Since the existing header files such as
asm/processor.h have enough clutter, create a new header file
asm/idle.h. Finally rename idle_loop_prolog() and idle_loop_epilog()
to pseries_idle_prolog() and pseries_idle_epilog() as they are only
relavent for on pseries guests.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1586249263-14048-2-git-send-email-ego@linux.vnet.ibm.com
arch/powerpc/include/asm/idle.h [new file with mode: 0644]
arch/powerpc/platforms/pseries/setup.c
drivers/cpuidle/cpuidle-pseries.c