From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
To: "christophe.leroy@c-s.fr" <christophe.leroy@c-s.fr>,
"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
"paulus@samba.org" <paulus@samba.org>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] powerpc/32s: Slenderize _tlbia() for powerpc 603/603e
Date: Mon, 3 Feb 2020 16:57:18 +0000 [thread overview]
Message-ID: <bfab6635148b83deed8ac9fcbb19dde8c32fb988.camel@infinera.com> (raw)
In-Reply-To: <12f4f4f0ff89aeab3b937fc96c84fb35e1b2517e.1580748445.git.christophe.leroy@c-s.fr>
On Mon, 2020-02-03 at 16:47 +0000, Christophe Leroy wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> _tlbia() is a function used only on 603/603e core, ie on CPUs which
> don't have a hash table.
>
> _tlbia() uses the tlbia macro which implements a loop of 1024 tlbie.
>
> On the 603/603e core, flushing the entire TLB requires no more than
> 32 tlbie.
>
> Replace tlbia by a loop of 32 tlbie.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/mm/book3s32/hash_low.S | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/mm/book3s32/hash_low.S b/arch/powerpc/mm/book3s32/hash_low.S
> index c11b0a005196..a5039ad10429 100644
> --- a/arch/powerpc/mm/book3s32/hash_low.S
> +++ b/arch/powerpc/mm/book3s32/hash_low.S
> @@ -696,18 +696,21 @@ _GLOBAL(_tlbia)
> bne- 10b
> stwcx. r8,0,r9
> bne- 10b
> +#endif /* CONFIG_SMP */
> + li r5, 32
> + lis r4, KERNELBASE@h
> + mtctr r5
> sync
> - tlbia
> +0: tlbie r4
> + addi r4, r4, 0x1000
Is page size always 4096 here or does it not matter ?
> + bdnz 0b
> sync
> +#ifdef CONFIG_SMP
> TLBSYNC
> li r0,0
> stw r0,0(r9) /* clear mmu_hash_lock */
> mtmsr r10
> SYNC_601
> isync
> -#else /* CONFIG_SMP */
> - sync
> - tlbia
> - sync
> #endif /* CONFIG_SMP */
> blr
> --
> 2.25.0
>
next prev parent reply other threads:[~2020-02-03 16:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-03 16:47 Christophe Leroy
2020-02-03 16:57 ` Joakim Tjernlund [this message]
2020-02-03 17:16 ` Christophe Leroy
2020-03-06 0:27 ` 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=bfab6635148b83deed8ac9fcbb19dde8c32fb988.camel@infinera.com \
--to=joakim.tjernlund@infinera.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/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
all inboxes | Powered by JetHome®