]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm/64s: Drop p4d_leaf()
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 3 Sep 2022 12:36:40 +0000 (22:36 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Sep 2022 10:58:18 +0000 (20:58 +1000)
commitdff5e774ca7fdaaea70b1331fd6f1e8505e44024
tree7b16839c51ebaf47ebe0ef8399a3e002975e5e54
parent2d563fec9fc486b2b68088335b893999c6afc9f4
powerpc/mm/64s: Drop p4d_leaf()

Because 64-bit Book3S uses pgtable-nop4d.h, the P4D is folded into the
PGD. So P4D entries are actually PGD entries, or vice versa.

The other way to think of it is that the P4D is a single entry page
table below the PGD. Zero bits of the address are needed to index into
the P4D, therefore a P4D entry maps the same size address space as a PGD
entry.

As explained in the previous commit, there are no huge page sizes
supported directly at the PGD level on 64-bit Book3S, so there are also
no huge page sizes supported at the P4D level.

Therefore p4d_is_leaf() can never be true, so drop the definition and
fallback to the default implementation that always returns false.

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220903123640.719846-2-mpe@ellerman.id.au
arch/powerpc/include/asm/book3s/64/pgtable.h