Commit bc3152e4 authored by Matt Porter's avatar Matt Porter Committed by Linus Torvalds

[PATCH] ppc32: 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: default avatarJosh Boyer <jwboyer@charter.net>
Signed-off-by: default avatarMatt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 07a134d6
......@@ -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 @@ unsigned long __init mmu_mapin_ram(void)
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;
......
......@@ -104,6 +104,7 @@ extern unsigned long sysmap_size;
* -- Cort
*/
int __map_without_bats;
int __map_without_ltlbs;
/* max amount of RAM to use */
unsigned long __max_memory;
......@@ -204,6 +205,10 @@ void MMU_setup(void)
__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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment