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

parisc: Increase initial kernel mapping to 32MB on 64bit kernel

For the 64bit kernel the initially 16 MB kernel memory might become too
small if you build a kernel with many modules built-in and with kernel
text and data areas mapped on huge pages.

This patch increases the initial mapping to 32MB for 64bit kernels and
keeps 16MB for 32bit kernels.

Signed-off-by: Helge Deller <deller@gmx.de>

+7 -3
+5 -1
arch/parisc/include/asm/pgtable.h
··· 83 83 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) 84 84 85 85 /* This is the size of the initially mapped kernel memory */ 86 - #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ 86 + #ifdef CONFIG_64BIT 87 + #define KERNEL_INITIAL_ORDER 25 /* 1<<25 = 32MB */ 88 + #else 89 + #define KERNEL_INITIAL_ORDER 24 /* 1<<24 = 16MB */ 90 + #endif 87 91 #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) 88 92 89 93 #if CONFIG_PGTABLE_LEVELS == 3
+2 -2
arch/parisc/kernel/head.S
··· 69 69 stw,ma %arg2,4(%r1) 70 70 stw,ma %arg3,4(%r1) 71 71 72 - /* Initialize startup VM. Just map first 8/16 MB of memory */ 72 + /* Initialize startup VM. Just map first 16/32 MB of memory */ 73 73 load32 PA(swapper_pg_dir),%r4 74 74 mtctl %r4,%cr24 /* Initialize kernel root pointer */ 75 75 mtctl %r4,%cr25 /* Initialize user root pointer */ ··· 107 107 /* Now initialize the PTEs themselves. We use RWX for 108 108 * everything ... it will get remapped correctly later */ 109 109 ldo 0+_PAGE_KERNEL_RWX(%r0),%r3 /* Hardwired 0 phys addr start */ 110 - ldi (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */ 110 + load32 (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */ 111 111 load32 PA(pg0),%r1 112 112 113 113 $pgt_fill_loop: