From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
paulus@samba.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V2 2/5] powerpc/mm: Add radix flush all with IS=3
Date: Mon, 22 Aug 2016 11:41:13 +0530 [thread overview]
Message-ID: <87shtxib9a.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1471823733.19495.88.camel@kernel.crashing.org>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Fri, 2016-08-19 at 14:22 +0530, Aneesh Kumar K.V wrote:
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>> =C2=A0arch/powerpc/include/asm/book3s/64/tlbflush-radix.h |=C2=A0=C2=A01=
+
>> =C2=A0arch/powerpc/mm/tlb-radix.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 15
>> +++++++++++++++
>> =C2=A02 files changed, 16 insertions(+)
>
> Don't we need two ? One for partition scoped and one for process scoped
> ?
With invalid selector value 3 (IS =3D 3), we will invalidate all entries
when executed with MSR[HV] =3D 1. I guess that should take out all the
translation cache, including implementation dependent one ?
Also note thar PRS =3D 0. ie, we are partition scoped. ie, we are doing
invalidate with
PRS =3D0, IS =3D 3 HV =3D 1 RIC =3D 2
>
>> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
>> b/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
>> index 65037762b120..a9e19cb2f7c5 100644
>> --- a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
>> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
>> @@ -41,4 +41,5 @@ extern void radix__flush_tlb_page_psize(struct
>> mm_struct *mm, unsigned long vmad
>> =C2=A0extern void radix__flush_tlb_lpid_va(unsigned long lpid, unsigned
>> long gpa,
>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0unsigned long page_size);
>> =C2=A0extern void radix__flush_tlb_lpid(unsigned long lpid);
>> +extern void radix__flush_tlb_all(void);
>> =C2=A0#endif
>> diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-
>> radix.c
>> index 48df05ef5231..517feb47ebe4 100644
>> --- a/arch/powerpc/mm/tlb-radix.c
>> +++ b/arch/powerpc/mm/tlb-radix.c
>> @@ -400,3 +400,18 @@ void radix__flush_pmd_tlb_range(struct
>> vm_area_struct *vma,
>> =C2=A0 radix__flush_tlb_range_psize(vma->vm_mm, start, end,
>> MMU_PAGE_2M);
>> =C2=A0}
>> =C2=A0EXPORT_SYMBOL(radix__flush_pmd_tlb_range);
>> +
>> +void radix__flush_tlb_all(void)
>> +{
>> + unsigned long rb,prs,r;
>> + unsigned long ric =3D RIC_FLUSH_ALL;
>> +
>> + rb =3D 0x3 << PPC_BITLSHIFT(53); /* IS =3D 3 */
>> + prs =3D 0; /* partition scoped */
>> + r =3D 1;=C2=A0=C2=A0=C2=A0/* raidx format */
>> +
>> + asm volatile("ptesync": : :"memory");
>> + asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1)
>> + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0: : "r"(rb), "i"(r), "i"(prs), "i"(ric)=
, "r"(0)
>> : "memory");
>> + asm volatile("eieio; tlbsync; ptesync": : :"memory");
>> +}
next prev parent reply other threads:[~2016-08-22 6:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 8:52 [PATCH V2 0/5] kexec changes for Power ISA 3.0 Aneesh Kumar K.V
2016-08-19 8:52 ` [PATCH V2 1/5] powerpc/64/kexec: NULL check "clear_all" in kexec_sequence Aneesh Kumar K.V
2016-08-22 8:56 ` Balbir Singh
2016-09-25 3:00 ` [V2, " Michael Ellerman
2016-08-19 8:52 ` [PATCH V2 2/5] powerpc/mm: Add radix flush all with IS=3 Aneesh Kumar K.V
2016-08-21 23:55 ` Benjamin Herrenschmidt
2016-08-22 6:11 ` Aneesh Kumar K.V [this message]
2016-08-22 18:22 ` Balbir Singh
2016-08-23 10:57 ` [PATCH V3] " Aneesh Kumar K.V
2016-08-24 5:19 ` Balbir Singh
2016-09-25 3:00 ` [V3] " Michael Ellerman
2016-08-19 8:52 ` [PATCH V2 3/5] powerpc/64/kexec: Fix MMU cleanup on radix Aneesh Kumar K.V
2016-08-23 0:02 ` Balbir Singh
2016-08-19 8:52 ` [PATCH V2 4/5] powerpc/64/kexec: Copy image with MMU off when possible Aneesh Kumar K.V
2016-08-23 0:21 ` Balbir Singh
2016-08-19 8:52 ` [PATCH V2 5/5] powerpc/64/kexec: Remove BookE special default_machine_kexec_prepare() Aneesh Kumar K.V
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=87shtxib9a.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.