]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: Get LPID bit width from device tree
authorNicholas Piggin <npiggin@gmail.com>
Mon, 29 Nov 2021 03:09:15 +0000 (13:09 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 Nov 2021 11:27:07 +0000 (22:27 +1100)
commit9b58836da451ce818d345507f67b228e6cc4f0bc
tree0baed78e911ab2e3ecad64e0034dce5dfb9b1f6f
parentda9049cf010991bbd0c65ea7535e2f31a5626bff
powerpc/64s: Get LPID bit width from device tree

Allow the LPID bit width and partition table size to be set at runtime
from the device tree.

Move the PID bit width detection into the same place.

KVM does not support using the extra bits yet, this is mainly required
to get the PTCR register values correct (so KVM will run but it will
not allocate > 4096 LPIDs).

OPAL firmware provides this property for POWER10 CPUs since skiboot
commit 9b85f7d961f2 ("hdata: add mmu-pid-bits and mmu-lpid-bits for
POWER10 CPUs").

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211129030915.1888332-1-npiggin@gmail.com
arch/powerpc/include/asm/book3s/64/mmu.h
arch/powerpc/mm/book3s64/pgtable.c
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/init_64.c