Thread (5 messages) 5 messages, 4 authors, 2022-05-24

Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2022-05-20 00:06:57

Excerpts from Joel Stanley's message of May 19, 2022 10:57 pm:
In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device
tree") the kernel tried to determine the pid and lpid bits from the
device tree. If they are not found, there is a fallback, but Microwatt
wasn't covered as has the unusual configuration of being both !HV and bare
metal.

Set the values in the device tree to avoid having to add a special case.
The lpid value is the only one required, but add both for completeness.

Fixes: 5402e239d09f ("powerpc/64s: Get LPID bit width from device tree")
Signed-off-by: Joel Stanley <joel@jms.id.au>
LGTM... does Microwatt actually need 12 lpid bits, or does it just need 
the LPID 0 partition table entry? I wonder if you set it to 1. That's
a minor nit though.

Acked-by: Nicholas Piggin <npiggin@gmail.com>
quoted hunk ↗ jump to hunk
---
 arch/powerpc/boot/dts/microwatt.dts | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/boot/dts/microwatt.dts b/arch/powerpc/boot/dts/microwatt.dts
index 65b270a90f94..b69db1d275cd 100644
--- a/arch/powerpc/boot/dts/microwatt.dts
+++ b/arch/powerpc/boot/dts/microwatt.dts
@@ -90,6 +90,8 @@ PowerPC,Microwatt@0 {
 			64-bit;
 			d-cache-size = <0x1000>;
 			ibm,chip-id = <0>;
+			ibm,mmu-lpid-bits = <12>;
+			ibm,mmu-pid-bits = <20>;
 		};
 	};
 
-- 
2.35.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help