powerpc/64s/radix: Fix missing global invalidations when removing copro

Michael Ellerman patch-notifications at ellerman.id.au
Thu Aug 2 23:01:58 AEST 2018


On Tue, 2018-07-31 at 13:24:52 UTC, Frederic Barrat wrote:
> With the optimizations for TLB invalidation from commit 0cef77c7798a
> ("powerpc/64s/radix: flush remote CPUs out of single-threaded
> mm_cpumask"), the scope of a TLBI (global vs. local) can now be
> influenced by the value of the 'copros' counter of the memory context.
> 
> When calling mm_context_remove_copro(), the 'copros' counter is
> decremented first before flushing. It may have the unintended side
> effect of sending local TLBIs when we explicitly need global
> invalidations in this case. Thus breaking any nMMU user in a bad and
> unpredictable way.
> 
> Fix it by flushing first, before updating the 'copros' counter, so
> that invalidations will be global.
> 
> Fixes: 0cef77c7798a ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask")
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>
> Reviewed-by: Nicholas Piggin <npiggin at gmail.com>
> Tested-by: Vaibhav Jain <vaibhav at linux.ibm.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/cca19f0b684f4ed6aabf6ad07ae3e1

cheers


More information about the Linuxppc-dev mailing list