From: Matt Porter <mporter@kernel.crashing.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org
Subject: [PATCH][PPC32] Make PPC40x large tlb mapping optional
Date: Wed, 11 Aug 2004 10:52:17 -0700 [thread overview]
Message-ID: <20040811105217.B8378@home.com> (raw)
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 <jwboyer@charter.net>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
diff -Naur -x '*.swp' linux-2.6.orig/arch/ppc/mm/4xx_mmu.c linux-2.6/arch/ppc/mm/4xx_mmu.c
--- linux-2.6.orig/arch/ppc/mm/4xx_mmu.c 2004-06-16 00:18:37.000000000 -0500
+++ linux-2.6/arch/ppc/mm/4xx_mmu.c 2004-08-11 08:25:11.000000000 -0500
@@ -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;
diff -Naur -x '*.swp' linux-2.6.orig/arch/ppc/mm/init.c linux-2.6/arch/ppc/mm/init.c
--- linux-2.6.orig/arch/ppc/mm/init.c 2004-08-11 08:03:55.000000000 -0500
+++ linux-2.6/arch/ppc/mm/init.c 2004-08-11 08:11:24.000000000 -0500
@@ -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;
next reply other threads:[~2004-08-11 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-11 17:52 Matt Porter [this message]
2004-08-15 21:23 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040811105217.B8378@home.com \
--to=mporter@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome