summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /arch/arm/mm
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/fault-armo.c2
-rw-r--r--arch/arm/mm/fault-armv.c2
-rw-r--r--arch/arm/mm/init.c9
-rw-r--r--arch/arm/mm/mm-ebsa285.c62
-rw-r--r--arch/arm/mm/mm-rpc.c3
-rw-r--r--arch/arm/mm/mm-vnc.c19
-rw-r--r--arch/arm/mm/proc-sa110.S16
7 files changed, 44 insertions, 69 deletions
diff --git a/arch/arm/mm/fault-armo.c b/arch/arm/mm/fault-armo.c
index 4e244a297..6fe1f30ff 100644
--- a/arch/arm/mm/fault-armo.c
+++ b/arch/arm/mm/fault-armo.c
@@ -174,7 +174,7 @@ bad_area:
}
/* Are we prepared to handle this kernel fault? */
- if ((fixup = search_exception_table(regs->ARM_pc)) != 0) {
+ if ((fixup = search_exception_table(instruction_pointer(regs))) != 0) {
printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n",
tsk->comm, regs->ARM_pc, addr, fixup);
regs->ARM_pc = fixup;
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index 98134abac..f090c5f2c 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -208,7 +208,7 @@ bad_area:
}
/* Are we prepared to handle this kernel fault? */
- if ((fixup = search_exception_table(regs->ARM_pc)) != 0) {
+ if ((fixup = search_exception_table(instruction_pointer(regs))) != 0) {
printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n",
tsk->comm, regs->ARM_pc, addr, fixup);
regs->ARM_pc = fixup;
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 613fefce1..b3b0ecf56 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -192,6 +192,15 @@ __initfunc(void mem_init(unsigned long start_mem, unsigned long end_mem))
reservedpages << (PAGE_SHIFT-10),
datapages << (PAGE_SHIFT-10),
initpages << (PAGE_SHIFT-10));
+
+#ifdef CONFIG_CPU_26
+ if (max_mapnr <= 128) {
+ extern int sysctl_overcommit_memory;
+ /* On a machine this small we won't get anywhere without
+ overcommit, so turn it on by default. */
+ sysctl_overcommit_memory = 1;
+ }
+#endif
}
void free_initmem (void)
diff --git a/arch/arm/mm/mm-ebsa285.c b/arch/arm/mm/mm-ebsa285.c
index 82bbce899..a5b17c6b9 100644
--- a/arch/arm/mm/mm-ebsa285.c
+++ b/arch/arm/mm/mm-ebsa285.c
@@ -5,7 +5,6 @@
*
* Copyright (C) 1998 Russell King, Dave Gilbert.
*/
-#include <linux/config.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/init.h>
@@ -14,46 +13,7 @@
#include <asm/page.h>
#include <asm/io.h>
#include <asm/proc/mm-init.h>
-
-/*
- * These two functions convert PCI bus addresses to virtual addresses
- * and back again.
- */
-unsigned long __virt_to_bus(unsigned long res)
-{
- if (res < PAGE_OFFSET || res >= 0xD0000000) {
- printk("__virt_to_bus: invalid address 0x%08lx\n", res);
-#ifdef CONFIG_DEBUG_ERRORS
- __backtrace();
-#endif
- } else
- res = (res - PAGE_OFFSET) + 0x10000000;
-
- return res;
-}
-
-unsigned long __bus_to_virt(unsigned long res)
-{
- if (res < 0x10000000 || res >= 0x20000000) {
- printk("__bus_to_virt: invalid address 0x%08lx\n", res);
-#ifdef CONFIG_DEBUG_ERRORS
- __backtrace();
-#endif
- } else
- res = (res - 0x10000000) + PAGE_OFFSET;
-
- return res;
-}
-
-/* Logical Physical
- * 0xfff00000 0x40000000 X-Bus
- * 0xffe00000 0x7c000000 PCI I/O space
- * 0xfe000000 0x42000000 CSR
- * 0xfd000000 0x78000000 Outbound write flush
- * 0xfc000000 0x79000000 PCI IACK/special space
- * 0xf9000000 0x7a000000 PCI Config type 1
- * 0xf8000000 0x7b000000 PCI Config type 0
- */
+#include <asm/dec21285.h>
/*
* This is to allow us to fiddle with the EEPROM
@@ -65,15 +25,15 @@ unsigned long __bus_to_virt(unsigned long res)
* until we're happy with them...
*/
#define MAPPING \
- { 0xd8000000, 0x41000000, 0x00400000, DOMAIN_USER, 1, 1 }, /* EEPROM */ \
- { 0xdc000000, 0x7c000000, 0x00100000, DOMAIN_USER, 1, 1 }, /* VGA */ \
- { 0xe0000000, 0x80000000, 0x10000000, DOMAIN_USER, 1, 1 }, /* VGA */ \
- { 0xf8000000, 0x7b000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 0 Config */ \
- { 0xf9000000, 0x7a000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 1 Config */ \
- { 0xfc000000, 0x79000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* PCI IACK */ \
- { 0xfd000000, 0x78000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* Outbound wflsh*/ \
- { 0xfe000000, 0x42000000, 0x01000000, DOMAIN_IO , 0, 1 }, /* CSR */ \
- { 0xffe00000, 0x7c000000, 0x00100000, DOMAIN_IO , 0, 1 }, /* PCI I/O */ \
- { 0xfff00000, 0x40000000, 0x00100000, DOMAIN_IO , 0, 1 }, /* X-Bus */
+ { 0xd8000000, DC21285_FLASH, 0x00400000, DOMAIN_USER, 1, 1 }, /* EEPROM */ \
+ { 0xdc000000, 0x7c000000, 0x00100000, DOMAIN_USER, 1, 1 }, /* VGA */ \
+ { 0xe0000000, DC21285_PCI_MEM, 0x18000000, DOMAIN_USER, 1, 1 }, /* VGA */ \
+ { 0xf8000000, DC21285_PCI_TYPE_0_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 0 Config */ \
+ { 0xf9000000, DC21285_PCI_TYPE_1_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 1 Config */ \
+ { PCI_IACK, DC21285_PCI_IACK, 0x01000000, DOMAIN_IO , 0, 1 }, /* PCI IACK */ \
+ { 0xfd000000, DC21285_OUTBOUND_WRITE_FLUSH, 0x01000000, DOMAIN_IO , 0, 1 }, /* Out wrflsh */ \
+ { 0xfe000000, DC21285_ARMCSR_BASE, 0x01000000, DOMAIN_IO , 0, 1 }, /* CSR */ \
+ { 0xffe00000, DC21285_PCI_IO, 0x00100000, DOMAIN_IO , 0, 1 }, /* PCI I/O */ \
+ { 0xfff00000, 0x40000000, 0x00100000, DOMAIN_IO , 0, 1 }, /* X-Bus */
#include "mm-armv.c"
diff --git a/arch/arm/mm/mm-rpc.c b/arch/arm/mm/mm-rpc.c
index 18ebe4a47..1c755faaf 100644
--- a/arch/arm/mm/mm-rpc.c
+++ b/arch/arm/mm/mm-rpc.c
@@ -91,7 +91,8 @@ init_dram_banks(struct param_struct *params))
#define MAPPING \
{ SCREEN2_BASE, SCREEN_START, 2*1048576, DOMAIN_IO, 0, 1 }, /* VRAM */ \
- { IO_BASE, IO_START, IO_SIZE , DOMAIN_IO, 0, 1 } /* IO space */
+ { IO_BASE, IO_START, IO_SIZE , DOMAIN_IO, 0, 1 }, /* IO space */ \
+ { EASI_BASE, EASI_START, EASI_SIZE, DOMAIN_IO, 0, 1 } /* EASI space */
/*
* Include common routine to set up page tables
*/
diff --git a/arch/arm/mm/mm-vnc.c b/arch/arm/mm/mm-vnc.c
index eed49eb29..94e037485 100644
--- a/arch/arm/mm/mm-vnc.c
+++ b/arch/arm/mm/mm-vnc.c
@@ -13,20 +13,19 @@
#include <asm/page.h>
#include <asm/io.h>
#include <asm/proc/mm-init.h>
+#include <asm/dec21285.h>
/* Table describing the MMU translation mapping
* mainly used to set up the I/O mappings.
*/
#define MAPPING \
- { 0xe0000000, DC21285_PCI_IO, 0x00100000, DOMAIN_IO, 0, 1 }, /* PCI I/O */ \
- { 0xe0100000, DC21285_PCI_TYPE_0_CONFIG, 0x00f00000, DOMAIN_IO, 0, 1 }, /* Type 0 Config */ \
- { 0xe1000000, DC21285_ARMCSR_BASE, 0x00100000, DOMAIN_IO, 0, 1 }, /* ARM CSR */ \
- { 0xe1100000, DC21285_PCI_IACK, 0x00100000, DOMAIN_IO, 0, 1 }, /* PCI IACK */ \
- { 0xe1300000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \
- { 0xe1400000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \
- { 0xe1500000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \
- { 0xe1600000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \
- { 0xe1700000, DC21285_OUTBOUND_WRITE_FLUSH, 0x00100000, DOMAIN_IO, 0, 1 }, /* Out wrflsh */ \
- { 0xe1800000, DC21285_FLASH, 0x00800000, DOMAIN_IO, 0, 1 } /* Flash */
+ { 0xd0000000, DC21285_FLASH, 0x00800000, DOMAIN_IO , 0, 1 }, /* Flash */ \
+ { 0xe0000000, DC21285_PCI_MEM, 0x18000000, DOMAIN_IO , 0, 1 }, /* PCI Mem */ \
+ { 0xf8000000, DC21285_PCI_TYPE_0_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 0 Config */ \
+ { 0xf9000000, DC21285_PCI_TYPE_1_CONFIG, 0x01000000, DOMAIN_IO , 0, 1 }, /* Type 1 Config */ \
+ { PCI_IACK, DC21285_PCI_IACK, 0x01000000, DOMAIN_IO , 0, 1 }, /* PCI IACK */ \
+ { 0xfd000000, DC21285_OUTBOUND_WRITE_FLUSH, 0x01000000, DOMAIN_IO , 0, 1 }, /* Out wrflsh */ \
+ { 0xfe000000, DC21285_ARMCSR_BASE, 0x01000000, DOMAIN_IO , 0, 1 }, /* CSR */ \
+ { 0xffe00000, DC21285_PCI_IO, 0x00100000, DOMAIN_IO , 0, 1 }, /* PCI I/O */ \
#include "mm-armv.c"
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index d077ab1d2..221797862 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -10,6 +10,11 @@
#include <asm/assembler.h>
#include "../lib/constants.h"
+/* This is the maximum size of an area which will be flushed. If the area
+ * is larger than this, then we flush the whole cache
+ */
+#define MAX_AREA_SIZE 32768
+
.data
Lclean_switch: .long 0
.text
@@ -52,7 +57,7 @@ _sa110_flush_cache_all_r2:
.align 5
_sa110_flush_cache_area:
sub r3, r1, r0
- cmp r3, #32768
+ cmp r3, #MAX_AREA_SIZE
bgt _sa110_flush_cache_all_r2
1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
mcr p15, 0, r0, c7, c6, 1 @ flush D entry
@@ -79,16 +84,17 @@ _sa110_flush_cache_area:
.align 5
_sa110_cache_wback_area:
sub r3, r1, r0
- cmp r3, #32768
- movgt r2, #0
- bgt _sa110_flush_cache_all
+ cmp r3, #MAX_AREA_SIZE
+ mov r2, #0
+ bgt _sa110_flush_cache_all_r2
+ bic r0, r0, #31
1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
add r0, r0, #32
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
add r0, r0, #32
cmp r0, r1
blt 1b
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
+ mcr p15, 0, r2, c7, c10, 4 @ drain WB
mov pc, lr
/*