]> git.hungrycats.org Git - linux/commitdiff
[ARM] Move common definitions to asm/memory.h
authorRussell King <rmk@flint.arm.linux.org.uk>
Sat, 29 May 2004 11:53:46 +0000 (12:53 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sat, 29 May 2004 11:53:46 +0000 (12:53 +0100)
Virtually all the architecture specific memory.h files were defining
the same constants and v<->p translations the same way.  Move them to
asm/memory.h

21 files changed:
include/asm-arm/arch-adifcc/memory.h
include/asm-arm/arch-cl7500/memory.h
include/asm-arm/arch-clps711x/memory.h
include/asm-arm/arch-ebsa110/memory.h
include/asm-arm/arch-ebsa285/memory.h
include/asm-arm/arch-epxa10db/memory.h
include/asm-arm/arch-integrator/memory.h
include/asm-arm/arch-iop3xx/memory.h
include/asm-arm/arch-ixp4xx/memory.h
include/asm-arm/arch-l7200/memory.h
include/asm-arm/arch-lh7a40x/memory.h
include/asm-arm/arch-nexuspci/memory.h
include/asm-arm/arch-omap/memory.h
include/asm-arm/arch-pxa/memory.h
include/asm-arm/arch-rpc/memory.h
include/asm-arm/arch-s3c2410/memory.h
include/asm-arm/arch-sa1100/memory.h
include/asm-arm/arch-shark/memory.h
include/asm-arm/arch-tbox/memory.h
include/asm-arm/arch-versatile/memory.h
include/asm-arm/memory.h

index b2a4b1e4417f623211463f2069653ba6a96d8316..b76187d8d42be9f8fa5624d4c714c70445af0b6e 100644 (file)
@@ -7,35 +7,11 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
-
 /*
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    (0xC0000000UL)
 
-/*
- * physical vs virtual ram conversion
- */
-#define __virt_to_phys(x)      ((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index 60429d0e3a9fe1d802f0fe81f13b9d22a41e37d4..9776bba8e585054907f12046d51b751b4566598a 100644 (file)
  *  21-Mar-1999        RMK     Renamed to memory.h
  *             RMK     Added TASK_SIZE and PAGE_OFFSET
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x10000000UL)
 
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * These are exactly the same on the RiscPC as the
  * physical memory view.
index 18110aa0e27e0ad2e1f38b8309a475d2e34e8ce9..bd978947db42f291aa215139e030cda12d1e3ecc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/include/asm-arm/arch-clps711x/mmu.h
+ *  linux/include/asm-arm/arch-clps711x/memory.h
  *
  *  Copyright (C) 1999 ARM Limited
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 #include <linux/config.h>
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0xc0000000UL)
 
-/*
- * On integrator, the dram is contiguous
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index f1f633f497e3eab185cbd36a58b3a3542b1d27eb..5a9493e12275aa1aa7c4bfb91ddd5346594d737a 100644 (file)
 #define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x00000000UL)
 
-#define __virt_to_phys(vpage)  ((vpage) - PAGE_OFFSET)
-#define __phys_to_virt(ppage)  ((ppage) + PAGE_OFFSET)
-
 /*
  * We keep this 1:1 so that we don't interfere
  * with the PCMCIA memory regions
index 9a3444ae45a777578ed9ffd85199a10a984592c6..d0466f9987d3af1acb96065531ef8eef6a927975 100644 (file)
@@ -16,8 +16,8 @@
  *                     Renamed to memory.h
  *                     Moved PAGE_OFFSET and TASK_SIZE here
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 #include <linux/config.h>
 
@@ -61,7 +61,9 @@ extern unsigned long __bus_to_virt(unsigned long);
 
 #endif
 
-#define TASK_SIZE_26           (0x04000000UL)
+/*
+ * Physical DRAM offset.
+ */
 #define PHYS_OFFSET            (0x00000000UL)
 
 /*
@@ -70,10 +72,4 @@ extern unsigned long __bus_to_virt(unsigned long);
  */
 #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
 
-/*
- * The DRAM is always contiguous.
- */
-#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET)
-#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET)
-
 #endif
index 6efabdbdae119458c6233acb7834bc0617cf917f..3f86bf7f67f0173c8850b5fa1c987d2e6d533c09 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x00000000UL)
 
-/*
- * On epxa10, the dram is contiguous
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index 03bf9d0112fa14a72a3a1348ca9a1368cbe1fc5f..2087ea7d28a9e1293c98afc230feefdd6b9a73a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/include/asm-arm/arch-integrator/mmu.h
+ *  linux/include/asm-arm/arch-integrator/memory.h
  *
  *  Copyright (C) 1999 ARM Limited
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x00000000UL)
-
-/*
- * On integrator, the dram is contiguous
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
-
 #define BUS_OFFSET     (0x80000000UL)
 
 /*
index 1593436cc8de63c97a69680e9889358f26504aba..a2d077a3b3b5f204e90a8476e8daf568f24a49de 100644 (file)
@@ -9,34 +9,11 @@
 #include <asm/arch/iop310.h>
 #include <asm/arch/iop321.h>
 
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
-
 /*
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    (0xa0000000UL)
 
-/*
- * physical vs virtual ram conversion
- */
-#define __virt_to_phys(x)      ((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index 75318d0b7997abfea8771a4abb9627a774644f78..3f6da112712e364d730da729468faf461f9f5d01 100644 (file)
@@ -7,29 +7,11 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-
-#define PAGE_OFFSET    (0xc0000000UL)
-
 /*
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    (0x00000000UL)
 
-/*
- * physical vs virtual ram conversion
- */
-#define __virt_to_phys(x)      ((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index f9e4123845908b59334d3f42e21722d5b653d8d4..c5b9608cb1370540ae0d7883b623eaa08d258ce2 100644 (file)
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE       (0xbf000000UL)
-#define TASK_SIZE_26    (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET     (0xc0000000UL)
-
 /*
  * Physical DRAM offset on the L7200 SDB.
  */
 #define PHYS_OFFSET     (0xf0000000UL)
 
-/*
- * The DRAM is contiguous.
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 #define __virt_to_bus(x) __virt_to_phys(x)
 #define __bus_to_virt(x) __phys_to_virt(x)
 
index a73926dcaca2e590b9fa29a2b88b95d82b714ada..1a1b1a3d5f96a62b3dac3f9a72e35d849c7e8916 100644 (file)
 
 #define BANKS_PER_NODE 1       /* Define as either 1 or 2 */
 
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE      (0xbf000000UL) /* 0xc0000000? */
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
-
 /*
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    (0xc0000000UL)
 
-/*
- * physical vs virtual ram conversion
- */
-#define __virt_to_phys(x)      ((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index 973fceb9d8fdd23787d89f1e36a3ac0a673d4317..85d7c45055f73d453f71b5bd01483116b25272ef 100644 (file)
@@ -5,34 +5,15 @@
  * Copyright (c) 1999 Russell King
  *
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x40000000UL)
 #define BUS_OFFSET     (0xe0000000UL)
 
-/*
- * DRAM is contiguous
- */
-#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * On the PCI bus the DRAM appears at address 0xe0000000
  */
index fcd1445433fd430c74e10b85d5d5829ca521f62a..106af75558131f7e812ea8865fb2c980df21ddd6 100644 (file)
  * 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE              (0xbf000000UL)
-#define TASK_SIZE_26           (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE     (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET            (0xC0000000UL)
 #define PHYS_OFFSET            (0x10000000UL)
 
 /*
  */
 #define OMAP1510_LB_OFFSET     (0x30000000UL)
 
-/*
- * The DRAM is contiguous.
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * Conversion between SDRAM and fake PCI bus, used by USB
  * NOTE: Physical address must be converted to Local Bus address
index 5b650b22aa13b3d24cf5afb7de46bcb965dd9d83..427e6ff5c79f2fae0f2316148d8fb0bb0374aa7b 100644 (file)
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
-
 /*
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    (0xa0000000UL)
 
-/*
- * physical vs virtual ram conversion
- */
-#define __virt_to_phys(x)      ((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index ae7eea67afbfc04076ef46469f932bc579dc3e7a..33fc75cdead02719921e0fd0bc7e7c8f1cee96a5 100644 (file)
  *   21-Mar-1999 RMK   Renamed to memory.h
  *              RMK    Added TASK_SIZE and PAGE_OFFSET
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x10000000UL)
 
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * These are exactly the same on the RiscPC as the
  * physical memory view.
index c36b533196bb3478a4790dacf41df4b19b4e5903..5321b97468f8550148fe5650f465fe9b51866942 100644 (file)
 #define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
- */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- *
  * DRAM starts at 0x30000000
-*/
-
-#define PAGE_OFFSET    (0xc0000000UL)
+ */
 #define PHYS_OFFSET    (0x30000000UL)
 
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * These are exactly the same on the S3C2410 as the
  * physical memory view.
index 59cdbe962f2893121506a8785b41806d908bc003..38794846b3a3de02c1b6e2da3be81c9dec2efa6d 100644 (file)
@@ -9,36 +9,11 @@
 
 #include <linux/config.h>
 
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
-
 /*
  * Physical DRAM offset is 0xc0000000 on the SA1100
  */
 #define PHYS_OFFSET    (0xc0000000UL)
 
-/*
- * We take advantage of the fact that physical and virtual address can be the
- * same.  The NUMA code is handling the large holes that might exist between
- * all memory banks.
- */
-#define __virt_to_phys(x)      (x)
-#define __phys_to_virt(x)      (x)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index 4716f4b99ce3438000cef5bdc4c8e47c40713663..7a06f07f641863ba34b554de373310fe4c83fd83 100644 (file)
 #define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: = 3GB
- */
-#define PAGE_OFFSET    (0xC0000000UL)
 #define PHYS_OFFSET     (0x08000000UL)
 
-#define __virt_to_phys(vpage) (vpage - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) (ppage - PHYS_OFFSET + PAGE_OFFSET)
-
 #define __virt_to_bus(x)       __virt_to_phys(x)
 #define __bus_to_virt(x)       __phys_to_virt(x)
 
index 330cff0532de0d2e40de046e2ee75d160ca5c1b6..a20479487c9da670e27cd92c74017a8a5927767f 100644 (file)
@@ -8,29 +8,10 @@
 #define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET            (0xc0000000UL)
 #define PHYS_OFFSET            (0x80000000UL)
 
-/*
- * DRAM is contiguous
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
-
 /*
  * Bus view is the same as physical view
  */
index 91717843278ab06b692f8ef43ee6d93f95799026..7b8b7cc422fa7b028efc45371abbd4f1d159df40 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#ifndef __ASM_ARCH_MMU_H
-#define __ASM_ARCH_MMU_H
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
 
 /*
- * Task size: 3GB
+ * Physical DRAM offset.
  */
-#define TASK_SIZE      (0xbf000000UL)
-#define TASK_SIZE_26   (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (0x40000000)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET    (0xc0000000UL)
 #define PHYS_OFFSET    (0x00000000UL)
 
-/*
- * On Versatile PB, the dram is contiguous
- */
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
-
 /*
  * Virtual view <-> DMA view memory address translations
  * virt_to_bus: Used to translate the virtual address to an
index 2cd87b3c24a44a0bdd94d2d19f6b2504cbb21e8c..75da0b9c4960f41c60d88826b3b2a8b66928f39b 100644 (file)
 #include <linux/config.h>
 #include <asm/arch/memory.h>
 
+#ifndef TASK_SIZE
+/*
+ * TASK_SIZE - the maximum size of a user space task.
+ * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
+ */
+#define TASK_SIZE              (0xbf000000UL)
+#define TASK_UNMAPPED_BASE     (0x40000000UL)
+#endif
+
+/*
+ * The maximum size of a 26-bit user space task.
+ */
+#define TASK_SIZE_26           (0x04000000UL)
+
+/*
+ * Page offset: 3GB
+ */
+#ifndef PAGE_OFFSET
+#define PAGE_OFFSET            (0xc0000000UL)
+#endif
+
+/*
+ * Physical vs virtual RAM address space conversion.  These are
+ * private definitions which should NOT be used outside memory.h
+ * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
+ */
+#ifndef __virt_to_phys
+#define __virt_to_phys(x)      ((x) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
+#endif
+
 /*
  * The module space lives between the addresses given by TASK_SIZE
  * and PAGE_OFFSET - it must be within 32MB of the kernel text.