Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 166b011

Browse files
committed
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. Signed-off-by: Helge Deller <[email protected]> Cc: <[email protected]>
1 parent be3ca57 commit 166b011

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arch/parisc/kernel/entry.S

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,22 +475,21 @@
475475
* to a CPU TLB 4k PFN (4k => 12 bits to shift) */
476476
#define PAGE_ADD_SHIFT (PAGE_SHIFT-12)
477477
#define PAGE_ADD_HUGE_SHIFT (REAL_HPAGE_SHIFT-12)
478+
#define PFN_START_BIT (63-ASM_PFN_PTE_SHIFT+(63-58)-PAGE_ADD_SHIFT)
478479

479480
/* Drop prot bits and convert to page addr for iitlbt and idtlbt */
480481
.macro convert_for_tlb_insert20 pte,tmp
481482
#ifdef CONFIG_HUGETLB_PAGE
482483
copy \pte,\tmp
483-
extrd,u \tmp,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
484-
64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
484+
extrd,u \tmp,PFN_START_BIT,PFN_START_BIT+1,\pte
485485

486486
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
487487
(63-58)+PAGE_ADD_SHIFT,\pte
488488
extrd,u,*= \tmp,_PAGE_HPAGE_BIT+32,1,%r0
489489
depdi _HUGE_PAGE_SIZE_ENCODING_DEFAULT,63,\
490490
(63-58)+PAGE_ADD_HUGE_SHIFT,\pte
491491
#else /* Huge pages disabled */
492-
extrd,u \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
493-
64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
492+
extrd,u \pte,PFN_START_BIT,PFN_START_BIT+1,\pte
494493
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
495494
(63-58)+PAGE_ADD_SHIFT,\pte
496495
#endif

0 commit comments

Comments
 (0)