linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, vaibhav@linux.ibm.com,
	felix@linux.ibm.com, clombard@linux.ibm.com
Subject: Re: [PATCH] powerpc/64s/radix: Fix missing global invalidations when removing copro
Date: Wed, 1 Aug 2018 11:43:19 +1000	[thread overview]
Message-ID: <20180801114319.62301bb9@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20180731132452.15994-1-fbarrat@linux.ibm.com>

On Tue, 31 Jul 2018 15:24:52 +0200
Frederic Barrat <fbarrat@linux.ibm.com> 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@linux.ibm.com>

Thanks for catching this, looks good to me.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

  reply	other threads:[~2018-08-01  1:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31 13:24 [PATCH] powerpc/64s/radix: Fix missing global invalidations when removing copro Frederic Barrat
2018-08-01  1:43 ` Nicholas Piggin [this message]
2018-08-01  9:28 ` Vaibhav Jain
2018-08-02 13:01 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180801114319.62301bb9@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=clombard@linux.ibm.com \
    --cc=fbarrat@linux.ibm.com \
    --cc=felix@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=vaibhav@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).