From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Cc: sjitindarsingh@gmail.com, benh@kernel.crashing.org,
paulus@samba.org, mpe@ellerman.id.au, bsingharora@gmail.com
Subject: Re: [PATCH] powerpc/mm: Correct process and partition table max size
Date: Thu, 10 Nov 2016 15:06:51 +0530 [thread overview]
Message-ID: <87eg2j1xsc.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1478669793-15074-1-git-send-email-sjitindarsingh@gmail.com>
Suraj Jitindar Singh <sjitindarsingh@gmail.com> writes:
> Version 3.00 of the ISA states that the PATS (partition table size) field
> of the PTCR (partition table control register) and the PRTS (process table
> size) field of the partition table entry must both be less than or equal
> to 24. However the actual size of the partition and process tables is equal
> to 2 to the power of 12 plus the PATS and PRTS fields, respectively. This
> means that the max allowable size of each of these tables is 2^36 or 64GB
> for both.
>
> Thus when checking the size shift for each we should be checking for values
> of greater than 36 instead of the current check for shifts larger than 24
> and 23.
>
> Fixes: 2bfd65e45e877fb5704730244da67c748d28a1b8
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/mm/pgtable-radix.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
> index ed7bddc..80f3479 100644
> --- a/arch/powerpc/mm/pgtable-radix.c
> +++ b/arch/powerpc/mm/pgtable-radix.c
> @@ -159,7 +159,7 @@ static void __init radix_init_pgtable(void)
> * Allocate Partition table and process table for the
> * host.
> */
> - BUILD_BUG_ON_MSG((PRTB_SIZE_SHIFT > 23), "Process table size too large.");
> + BUILD_BUG_ON_MSG((PRTB_SIZE_SHIFT > 36), "Process table size too large.");
> process_tb = early_alloc_pgtable(1UL << PRTB_SIZE_SHIFT);
> /*
> * Fill in the process table.
> @@ -181,7 +181,7 @@ static void __init radix_init_partition_table(void)
>
> rts_field = radix__get_tree_size();
>
> - BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 24), "Partition table size too large.");
> + BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 36), "Partition table size too large.");
> partition_tb = early_alloc_pgtable(1UL << PATB_SIZE_SHIFT);
> partition_tb->patb0 = cpu_to_be64(rts_field | __pa(init_mm.pgd) |
> RADIX_PGD_INDEX_SIZE | PATB_HR);
> --
> 2.5.5
next prev parent reply other threads:[~2016-11-10 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 5:36 [PATCH] powerpc/mm: Correct process and partition table max size Suraj Jitindar Singh
2016-11-10 0:30 ` Balbir Singh
2016-11-10 9:36 ` Aneesh Kumar K.V [this message]
2016-11-17 12:04 ` 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=87eg2j1xsc.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=sjitindarsingh@gmail.com \
/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.