]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Correct process and partition table max size
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Wed, 9 Nov 2016 05:36:33 +0000 (16:36 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 17 Nov 2016 06:11:53 +0000 (17:11 +1100)
commitc48c041750a166419ba3b4c1000e601ce9f0fd63
tree57d160a2d6c3feace23fda6b890bc4032ad81f77
parentd26a9c023b41c042c0cf2c63ed30c886f376ee41
powerpc/mm: Correct process and partition table max size

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: 0fe690ad9db874bf201410055b504ff2c9c577a1
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/pgtable-radix.c