]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: Stop using bit in HSPRG0 to test winkle
authorNicholas Piggin <npiggin@gmail.com>
Wed, 19 Apr 2017 13:05:45 +0000 (23:05 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 23 Apr 2017 10:31:39 +0000 (20:31 +1000)
commit1d20401ecee022b8c9fa4a3adc562a8ecf8e8dff
tree51eaa1f72ea0c6967e930ffcd3fe1d2562940bbe
parent50a4008da8b5752ebc798dd4d6d3ed5c21854098
powerpc/64s: Stop using bit in HSPRG0 to test winkle

The POWER8 idle code has a neat trick of programming the power on engine
to restore a low bit into HSPRG0, so idle wakeup code can test and see
if it has been programmed this way and therefore lost all state. Restore
time can be reduced if winkle has not been reached.

However this messes with our r13 PACA pointer, and requires HSPRG0 to be
written to. It also optimizes the slowest and most uncommon case at the
expense of another SPR write in the common nap state wakeup.

Remove this complexity and assume winkle sleeps always require a state
restore. This speedup could be made entirely contained within the winkle
idle code by counting per-core winkles and setting a thread bitmap when
all have gone to winkle.

Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/idle_book3s.S
arch/powerpc/platforms/powernv/idle.c