From: "Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>,
linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v2 1/4] powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes
Date: Thu, 20 Jul 2017 08:21:20 +0530 [thread overview]
Message-ID: <87o9sfrfbr.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <20170719044907.21703-1-benh@kernel.crashing.org>
Benjamin Herrenschmidt <benh@kernel•crashing.org> writes:
> The PWC flush only needs a single set call, just like the
> full (RIC=2) flush.
>
> This will allow us to get rid of the dedicated _tlbiel_pwc()
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux•vnet.ibm.com>
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel•crashing.org>
> ---
> arch/powerpc/mm/tlb-radix.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
> index 744e0164ecf5..2f2967a2db93 100644
> --- a/arch/powerpc/mm/tlb-radix.c
> +++ b/arch/powerpc/mm/tlb-radix.c
> @@ -54,12 +54,15 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
> */
> __tlbiel_pid(pid, 0, ric);
>
> - if (ric == RIC_FLUSH_ALL)
> - /* For the remaining sets, just flush the TLB */
> - ric = RIC_FLUSH_TLB;
> + /* For PWC, only one flush is needed */
> + if (ric == RIC_FLUSH_PWC) {
> + asm volatile("ptesync": : :"memory");
> + return;
> + }
>
> + /* For the remaining sets, just flush the TLB */
> for (set = 1; set < POWER9_TLB_SETS_RADIX ; set++)
> - __tlbiel_pid(pid, set, ric);
> + __tlbiel_pid(pid, set, RIC_FLUSH_TLB);
>
> asm volatile("ptesync": : :"memory");
> asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory");
> --
> 2.13.3
next prev parent reply other threads:[~2017-07-20 2:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 4:49 [PATCH v2 1/4] powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes Benjamin Herrenschmidt
2017-07-19 4:49 ` [PATCH v2 2/4] powerpc/mm/radix: Improve TLB/PWC flushes Benjamin Herrenschmidt
2017-07-20 2:52 ` Aneesh Kumar K.V
2017-07-19 4:49 ` [PATCH v2 3/4] powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range Benjamin Herrenschmidt
2017-07-20 2:52 ` Aneesh Kumar K.V
2017-07-19 4:49 ` [PATCH v2 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM Benjamin Herrenschmidt
2017-07-20 2:51 ` Aneesh Kumar K.V [this message]
2017-08-07 10:41 ` [v2, 1/4] powerpc/mm/radix: Improve _tlbiel_pid to be usable for PWC flushes 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=87o9sfrfbr.fsf@skywalker.in.ibm.com \
--to=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=benh@kernel$(echo .)crashing.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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