Skip to contentSkip to conversation

parisc/pgtable: Do not drop upper 5 address bits of physical address

PATCH Superseded Helge Deller 1 participant 1 message Nov 7, 2023 PA-RISC architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc/pgtable: Do not drop upper 5 address bits of physical address

When calculating the pfn for the iitlbt/idtlbt instruction, do not drop the upper 5 address bits. This doesn't seem to have an effect on physical hardware which uses less physical address bits, but in qemu the missing bits are visible.

arch/parisc/kernel/entry.S +2 -2
index cab1ec23e0d7..bef64678d370 100644
@@ -481,7 +481,7 @@
 #ifdef CONFIG_HUGETLB_PAGE
 	copy		\pte,\tmp
 	extrd,u		\tmp,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
-				64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
+				64-PAGE_SHIFT-PAGE_ADD_SHIFT+(63-58),\pte
 
 	depdi		_PAGE_SIZE_ENCODING_DEFAULT,63,\
 				(63-58)+PAGE_ADD_SHIFT,\pte
@@ -490,7 +490,7 @@
 				(63-58)+PAGE_ADD_HUGE_SHIFT,\pte
 #else /* Huge pages disabled */
 	extrd,u		\pte,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
-				64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
+				64-PAGE_SHIFT-PAGE_ADD_SHIFT+(63-58),\pte
 	depdi		_PAGE_SIZE_ENCODING_DEFAULT,63,\
 				(63-58)+PAGE_ADD_SHIFT,\pte
 #endif