Make PPC40x large tlb mapping optional
PATCH 1/1 Make PPC40x large tlb mapping optional
This makes the PPC40x lowmem large tlb mapping selectable via a cmdline option. This allows use of the normal page-sized mapping so that kernel text can be read only if desired.
Signed-off-by Josh Boyer <[email protected]>
Signed-off-by Matt Porter <[email protected]>
arch/ppc/mm/4xx_mmu.c +5 -0
@@ -52,6 +52,7 @@#include <asm/setup.h> #include "mmu_decl.h" +extern int __map_without_ltlbs;/* * MMU_init_hw does the chip-specific initialization of the MMU hardware. */
@@ -102,6 +103,10 @@ p =PPC_MEMSTART ; s =0 ; +if (__map_without_ltlbs) { +return s; + } +while (s <= (total_lowmem -LARGE_PAGE_SIZE_16M )) {pmd_t *pmdp;unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
arch/ppc/mm/init.c +5 -0
@@ -104,6 +104,7 @@* -- Cort */ int __map_without_bats; +int __map_without_ltlbs;/* max amount of RAM to use */ unsigned long __max_memory;
@@ -204,6 +205,10 @@ __map_without_bats =1 ; } +if (strstr (cmd_line,"noltlbs" )) { + __map_without_ltlbs =1 ; + } +/* Look for mem= option on command line */ if (strstr (cmd_line,"mem=" )) {char *p, *q;
Quoted 3 lines · Matt Porter
This makes the PPC40x lowmem large tlb mapping selectable via
a cmdline option.
Please send a separate update to Documentation/kernel-parameters.txt.