From: Balbir Singh <bsingharora@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/mm/radix: Update Radix tree size as per ISA 3.0
Date: Thu, 16 Jun 2016 15:10:59 +1000 [thread overview]
Message-ID: <2cb66bb4-26aa-5e16-5cd4-9b171f8f4486@gmail.com> (raw)
In-Reply-To: <1466047309-8390-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On 16/06/16 13:21, Aneesh Kumar K.V wrote:
> ISA 3.0 updated it to be encoded as Radix tree size = 2^(RTS + 31). We
> have it encoded as 2^(RTS + 28). Add a helper with the correct encoding
> and use it instead of opencoding.
>
> Fixes commit 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for
> early init routine ")
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/include/asm/book3s/64/radix.h | 15 +++++++++++++++
> arch/powerpc/mm/mmu_context_book3s64.c | 2 +-
> arch/powerpc/mm/pgtable-radix.c | 9 +++------
> 3 files changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h
> index 0d980de55c40..cdf791af8ab2 100644
> --- a/arch/powerpc/include/asm/book3s/64/radix.h
> +++ b/arch/powerpc/include/asm/book3s/64/radix.h
> @@ -260,5 +260,20 @@ extern void radix__vmemmap_remove_mapping(unsigned long start,
>
> extern int radix__map_kernel_page(unsigned long ea, unsigned long pa,
> pgprot_t flags, unsigned int psz);
> +
> +static inline unsigned long radix__get_rts_value(void)
How about radix__get_tree_size()?
> +{
> + unsigned long rts_field;
> + /*
> + * we support 52 bits, hence 52-31 = 21, 0b10101
> + * RTS encoding details
> + * bits 0 - 3 of rts -> bits 6 - 8 unsigned long
> + * bits 4 - 5 of rts -> bits 62 - 63 of unsigned long
> + */
> + rts_field = (0x5UL << 5); /* 6 - 8 bits */
> + rts_field |= (0x2UL << 61);
> +
> + return rts_field;
> +}
Looks good otherwise
Reviewed-by: Balbir Singh <bsingharora@gmail.com>
prev parent reply other threads:[~2016-06-16 5:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 3:21 [PATCH] powerpc/mm/radix: Update Radix tree size as per ISA 3.0 Aneesh Kumar K.V
2016-06-16 5:10 ` Balbir Singh [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=2cb66bb4-26aa-5e16-5cd4-9b171f8f4486@gmail.com \
--to=bsingharora@gmail.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox