]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
parisc: Increase initial kernel mapping to 32MB on 64bit kernel
authorHelge Deller <deller@gmx.de>
Fri, 20 Nov 2015 10:17:27 +0000 (11:17 +0100)
committerHelge Deller <deller@gmx.de>
Sun, 22 Nov 2015 11:22:53 +0000 (12:22 +0100)
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>
arch/parisc/include/asm/pgtable.h
arch/parisc/kernel/head.S

index 638317ae276e1d650a767962faefb7784323597d..d8534f95915a3754c233fd14466aef6cbfba40dc 100644 (file)
@@ -83,7 +83,11 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
        printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e))
 
 /* This is the size of the initially mapped kernel memory */
-#define KERNEL_INITIAL_ORDER   24      /* 0 to 1<<24 = 16MB */
+#ifdef CONFIG_64BIT
+#define KERNEL_INITIAL_ORDER   25      /* 1<<25 = 32MB */
+#else
+#define KERNEL_INITIAL_ORDER   24      /* 1<<24 = 16MB */
+#endif
 #define KERNEL_INITIAL_SIZE    (1 << KERNEL_INITIAL_ORDER)
 
 #if CONFIG_PGTABLE_LEVELS == 3
index e7d64527aff94f69b019f7bde3aad63da47420ec..75aa0db9f69efe2fb3fa00d10d6fc66bd3f2b923 100644 (file)
@@ -69,7 +69,7 @@ $bss_loop:
        stw,ma          %arg2,4(%r1)
        stw,ma          %arg3,4(%r1)
 
-       /* Initialize startup VM. Just map first 8/16 MB of memory */
+       /* Initialize startup VM. Just map first 16/32 MB of memory */
        load32          PA(swapper_pg_dir),%r4
        mtctl           %r4,%cr24       /* Initialize kernel root pointer */
        mtctl           %r4,%cr25       /* Initialize user root pointer */
@@ -107,7 +107,7 @@ $bss_loop:
        /* Now initialize the PTEs themselves.  We use RWX for
         * everything ... it will get remapped correctly later */
        ldo             0+_PAGE_KERNEL_RWX(%r0),%r3 /* Hardwired 0 phys addr start */
-       ldi             (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */
+       load32          (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */
        load32          PA(pg0),%r1
 
 $pgt_fill_loop: