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

From: Gautham R Shenoy <[email-masked]>
Date: Thu, 16 Mar 2017 16:44:38 +0530

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 <[email-masked]>

Reviewed-by: Gautham R. Shenoy <[email-masked]>

--
Thanks and Regards
gautham.