Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: Fix initial page table creation for boot

The KERNEL_INITIAL_ORDER value defines the initial size (usually 32 or
64 MB) of the page table during bootup. Up until now the whole area was
initialized with PTE entries, but there was no check if we filled too
many entries. Change the code to fill up with so many entries that the
"_end" symbol can be reached by the kernel, but not more entries than
actually fit into the initial PTE tables.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v6.0+

+6 -1
+6 -1
arch/parisc/kernel/head.S
··· 56 56 57 57 .import __bss_start,data 58 58 .import __bss_stop,data 59 + .import __end,data 59 60 60 61 load32 PA(__bss_start),%r3 61 62 load32 PA(__bss_stop),%r4 ··· 150 149 * everything ... it will get remapped correctly later */ 151 150 ldo 0+_PAGE_KERNEL_RWX(%r0),%r3 /* Hardwired 0 phys addr start */ 152 151 load32 (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */ 153 - load32 PA(pg0),%r1 152 + load32 PA(_end),%r1 153 + SHRREG %r1,PAGE_SHIFT,%r1 /* %r1 is PFN count for _end symbol */ 154 + cmpb,<<,n %r11,%r1,1f 155 + copy %r1,%r11 /* %r1 PFN count smaller than %r11 */ 156 + 1: load32 PA(pg0),%r1 154 157 155 158 $pgt_fill_loop: 156 159 STREGM %r3,ASM_PTE_ENTRY_SIZE(%r1)