From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC] powerpc/mm: Enable TLB flush during native_register_proc_table()
Date: Mon, 15 Jan 2018 11:43:49 +0530 [thread overview]
Message-ID: <87r2qrejj6.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180110045333.10550-1-khandual@linux.vnet.ibm.com>
Anshuman Khandual <khandual@linux.vnet.ibm.com> writes:
> From: Anshuman Khandual <Khandual@linux.vnet.ibm.com>
>
> Any changes to the partition table must be followed by appropriate TLB
> flush which is not happening at present in native_register_proc_table()
> path. Fix this by calling mmu_partition_table_set_entry() which does
> take care of TLB flushing after the partition table update.
>
> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
> ---
> - From code inspection
> - Compile, boot tested without CONFIG_PPC_RADIX_MMU
> - Though it seems to be not getting called from any where
For hash the patb1 is zero and hence it is not called. This is left over
from the segment table implementation. I guess we can remove
native_register_proc_table.
>
> arch/powerpc/mm/hash_native_64.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
> index 640cf56..89be5a6 100644
> --- a/arch/powerpc/mm/hash_native_64.c
> +++ b/arch/powerpc/mm/hash_native_64.c
> @@ -758,12 +758,14 @@ static void native_flush_hash_range(unsigned long number, int local)
> static int native_register_proc_table(unsigned long base, unsigned long page_size,
> unsigned long table_size)
> {
> - unsigned long patb1 = base << 25; /* VSID */
> + unsigned long patb0, patb1;
>
> + patb1 = base << 25; /* VSID */
> patb1 |= (page_size << 5); /* sllp */
> patb1 |= table_size;
>
> - partition_tb->patb1 = cpu_to_be64(patb1);
> + patb0 = be64_to_cpu(partition_tb[0].patb0);
> + mmu_partition_table_set_entry(0, patb0, patb1);
> return 0;
> }
>
> --
> 1.8.3.1
prev parent reply other threads:[~2018-01-15 6:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 4:53 [RFC] powerpc/mm: Enable TLB flush during native_register_proc_table() Anshuman Khandual
2018-01-15 6:13 ` Aneesh Kumar K.V [this message]
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=87r2qrejj6.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).