[PATCH 2/8] powerpc/64s: stop using bit in HSPRG0 to test winkle

Gautham R Shenoy ego at linux.vnet.ibm.com
Thu Mar 16 22:14:38 AEDT 2017


Hi Nick,

On Tue, Mar 14, 2017 at 07:23:43PM +1000, Nicholas Piggin wrote:
> 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, and
> avoiding the expensive full restore if not.
> 
> However this messes with our r13 PACA pointer, and requires HSPRG0 to
> be written to throughout the exception handlers and idle wakeup, rather
> than just once on kernel entry.
> 
> Remove this complexity and assume winkle sleeps always require a state
> restore. This speedup is later re-introduced by counting per-core winkles
> and setting a bitmap of threads with state loss when all are in winkle.
>

Looks good to me.

> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>

Reviewed-by: Gautham R. Shenoy <ego at linux.vnet.ibm.com>


--
Thanks and Regards
gautham.



More information about the Linuxppc-dev mailing list