]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[ARM] nommu: Move hardware page table definitions to pgtable-hwdef.h
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 16 Mar 2006 14:44:36 +0000 (14:44 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 21 Mar 2006 22:03:25 +0000 (22:03 +0000)
Move the hardware PMD and PTE page table definitions from pgtable.h
into pgtable-hwdef.h, and include pgtable-hwdef.h as necessary.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 files changed:
arch/arm/mach-sa1100/assabet.c
arch/arm/mm/proc-arm1020.S
arch/arm/mm/proc-arm1020e.S
arch/arm/mm/proc-arm1022.S
arch/arm/mm/proc-arm1026.S
arch/arm/mm/proc-arm6_7.S
arch/arm/mm/proc-arm720.S
arch/arm/mm/proc-arm920.S
arch/arm/mm/proc-arm922.S
arch/arm/mm/proc-arm925.S
arch/arm/mm/proc-arm926.S
arch/arm/mm/proc-sa110.S
arch/arm/mm/proc-sa1100.S
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-xscale.S
include/asm-arm/pgalloc.h
include/asm-arm/pgtable-hwdef.h [new file with mode: 0644]
include/asm-arm/pgtable.h

index a599bb0d4ab81b3ea868d180e67922002e0d9fde..c58f12ba7a939d9a618f5bce32d800dc1cc9cac0 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/irq.h>
 #include <asm/setup.h>
 #include <asm/page.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 
index 82ec954e45b6b67951e4d0a8e4fe0a86ee314bba..5f460d7172536bec87ef668bad9e8038916e8555 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
index 7375fe930f7273520fe69c47f5141e6339e57f7d..3e5ea5508839311d89a46a8b2be80580b343a652 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
index 6ca639094d6fc9f59aa3493180453062e9bbadb3..f778545d57a2d9825805417a8677cb8a41c5eed2 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
index 10317e4f55d2ae6101896d382c73dbc3bd25d412..148c111fde732b4b41b83bfe513949a0647cf77a 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
index 8e7e1e70ab05ce0329c5c09237925b4b2b888ef6..540359b475d07d0a293467c870911885adab9e6a 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
index a13e0184d343dadb538cd535e6e50e37e220ebf2..72b0819326db42821012dbf6321fca296d172bc0 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
index d16513899999299d8820471976e506cad2aeff4e..e57d3b8de4b73d588abfad3fc89eae85ab641269 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
index 23b8ed97f4e3bc1fc36bf2d69d3339bdfdc49023..3170b37f82f2e4c2907e0d73fc7ab8464e70210f 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
index ee95c52db513b302b662388e0fc0fd4302e89fd5..eb78850addaade5b09566818340e22d55a4bb606 100644 (file)
@@ -51,6 +51,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
index 7d042dc20c47a77855b258457478e1d0dceb8c96..23ad5027d90cdf777adf1b479387980afe2b845e 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
index bd330c4075a1d13c4ef25da370687d28c5fed1a8..c916a6cae40428e53ade79211ba8994e70583cd4 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
 
index 91b89124c0d7e0ec08328081381ed26b82fddfeb..41f21f2dd8ffae766afeae26f641a75a1994d6f2 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 
 /*
index 92f3ca31b7b90e46c03f05104f6e5d6300d2ce7b..9a7e7c096aa946982bad47f220049916465a01ce 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/hardware/arm_scu.h>
 #include <asm/procinfo.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 
 #include "proc-macros.S"
index 2d3823ec315384e5bc117184b8ae33f5d6fa0e51..3e7e6a8f4109560e2df716474ec5375735c1824c 100644 (file)
@@ -25,6 +25,7 @@
 #include <asm/assembler.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
index bc18ff4051813aca50eff2c580ef2e83757b01e4..c4ac2e67768dcdbf6077e3fc385e2a192ab569d1 100644 (file)
 #ifndef _ASMARM_PGALLOC_H
 #define _ASMARM_PGALLOC_H
 
+#include <asm/domain.h>
+#include <asm/pgtable-hwdef.h>
 #include <asm/processor.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 
+#define _PAGE_USER_TABLE       (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER))
+#define _PAGE_KERNEL_TABLE     (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL))
+
 /*
  * Since we have only two-level page tables, these are trivial
  */
diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h
new file mode 100644 (file)
index 0000000..1d03349
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ *  linux/include/asm-arm/pgtable-hwdef.h
+ *
+ *  Copyright (C) 1995-2002 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef _ASMARM_PGTABLE_HWDEF_H
+#define _ASMARM_PGTABLE_HWDEF_H
+
+/*
+ * Hardware page table definitions.
+ *
+ * + Level 1 descriptor (PMD)
+ *   - common
+ */
+#define PMD_TYPE_MASK          (3 << 0)
+#define PMD_TYPE_FAULT         (0 << 0)
+#define PMD_TYPE_TABLE         (1 << 0)
+#define PMD_TYPE_SECT          (2 << 0)
+#define PMD_BIT4               (1 << 4)
+#define PMD_DOMAIN(x)          ((x) << 5)
+#define PMD_PROTECTION         (1 << 9)        /* v5 */
+/*
+ *   - section
+ */
+#define PMD_SECT_BUFFERABLE    (1 << 2)
+#define PMD_SECT_CACHEABLE     (1 << 3)
+#define PMD_SECT_AP_WRITE      (1 << 10)
+#define PMD_SECT_AP_READ       (1 << 11)
+#define PMD_SECT_TEX(x)                ((x) << 12)     /* v5 */
+#define PMD_SECT_APX           (1 << 15)       /* v6 */
+#define PMD_SECT_S             (1 << 16)       /* v6 */
+#define PMD_SECT_nG            (1 << 17)       /* v6 */
+#define PMD_SECT_SUPER         (1 << 18)       /* v6 */
+
+#define PMD_SECT_UNCACHED      (0)
+#define PMD_SECT_BUFFERED      (PMD_SECT_BUFFERABLE)
+#define PMD_SECT_WT            (PMD_SECT_CACHEABLE)
+#define PMD_SECT_WB            (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
+#define PMD_SECT_MINICACHE     (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
+#define PMD_SECT_WBWA          (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
+#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
+
+/*
+ *   - coarse table (not used)
+ */
+
+/*
+ * + Level 2 descriptor (PTE)
+ *   - common
+ */
+#define PTE_TYPE_MASK          (3 << 0)
+#define PTE_TYPE_FAULT         (0 << 0)
+#define PTE_TYPE_LARGE         (1 << 0)
+#define PTE_TYPE_SMALL         (2 << 0)
+#define PTE_TYPE_EXT           (3 << 0)        /* v5 */
+#define PTE_BUFFERABLE         (1 << 2)
+#define PTE_CACHEABLE          (1 << 3)
+
+/*
+ *   - extended small page/tiny page
+ */
+#define PTE_EXT_XN             (1 << 0)        /* v6 */
+#define PTE_EXT_AP_MASK                (3 << 4)
+#define PTE_EXT_AP0            (1 << 4)
+#define PTE_EXT_AP1            (2 << 4)
+#define PTE_EXT_AP_UNO_SRO     (0 << 4)
+#define PTE_EXT_AP_UNO_SRW     (PTE_EXT_AP0)
+#define PTE_EXT_AP_URO_SRW     (PTE_EXT_AP1)
+#define PTE_EXT_AP_URW_SRW     (PTE_EXT_AP1|PTE_EXT_AP0)
+#define PTE_EXT_TEX(x)         ((x) << 6)      /* v5 */
+#define PTE_EXT_APX            (1 << 9)        /* v6 */
+#define PTE_EXT_SHARED         (1 << 10)       /* v6 */
+#define PTE_EXT_NG             (1 << 11)       /* v6 */
+
+/*
+ *   - small page
+ */
+#define PTE_SMALL_AP_MASK      (0xff << 4)
+#define PTE_SMALL_AP_UNO_SRO   (0x00 << 4)
+#define PTE_SMALL_AP_UNO_SRW   (0x55 << 4)
+#define PTE_SMALL_AP_URO_SRW   (0xaa << 4)
+#define PTE_SMALL_AP_URW_SRW   (0xff << 4)
+
+#endif
index 70e00d08345ec93d6b989fc47b2a5099272375d6..e595ae24efe27d09c820ce23ed83512ddc61654c 100644 (file)
@@ -136,81 +136,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
 #define SUPERSECTION_SIZE      (1UL << SUPERSECTION_SHIFT)
 #define SUPERSECTION_MASK      (~(SUPERSECTION_SIZE-1))
 
-/*
- * Hardware page table definitions.
- *
- * + Level 1 descriptor (PMD)
- *   - common
- */
-#define PMD_TYPE_MASK          (3 << 0)
-#define PMD_TYPE_FAULT         (0 << 0)
-#define PMD_TYPE_TABLE         (1 << 0)
-#define PMD_TYPE_SECT          (2 << 0)
-#define PMD_BIT4               (1 << 4)
-#define PMD_DOMAIN(x)          ((x) << 5)
-#define PMD_PROTECTION         (1 << 9)        /* v5 */
-/*
- *   - section
- */
-#define PMD_SECT_BUFFERABLE    (1 << 2)
-#define PMD_SECT_CACHEABLE     (1 << 3)
-#define PMD_SECT_AP_WRITE      (1 << 10)
-#define PMD_SECT_AP_READ       (1 << 11)
-#define PMD_SECT_TEX(x)                ((x) << 12)     /* v5 */
-#define PMD_SECT_APX           (1 << 15)       /* v6 */
-#define PMD_SECT_S             (1 << 16)       /* v6 */
-#define PMD_SECT_nG            (1 << 17)       /* v6 */
-#define PMD_SECT_SUPER         (1 << 18)       /* v6 */
-
-#define PMD_SECT_UNCACHED      (0)
-#define PMD_SECT_BUFFERED      (PMD_SECT_BUFFERABLE)
-#define PMD_SECT_WT            (PMD_SECT_CACHEABLE)
-#define PMD_SECT_WB            (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
-#define PMD_SECT_MINICACHE     (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
-#define PMD_SECT_WBWA          (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
-#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
-
-/*
- *   - coarse table (not used)
- */
-
-/*
- * + Level 2 descriptor (PTE)
- *   - common
- */
-#define PTE_TYPE_MASK          (3 << 0)
-#define PTE_TYPE_FAULT         (0 << 0)
-#define PTE_TYPE_LARGE         (1 << 0)
-#define PTE_TYPE_SMALL         (2 << 0)
-#define PTE_TYPE_EXT           (3 << 0)        /* v5 */
-#define PTE_BUFFERABLE         (1 << 2)
-#define PTE_CACHEABLE          (1 << 3)
-
-/*
- *   - extended small page/tiny page
- */
-#define PTE_EXT_XN             (1 << 0)        /* v6 */
-#define PTE_EXT_AP_MASK                (3 << 4)
-#define PTE_EXT_AP0            (1 << 4)
-#define PTE_EXT_AP1            (2 << 4)
-#define PTE_EXT_AP_UNO_SRO     (0 << 4)
-#define PTE_EXT_AP_UNO_SRW     (PTE_EXT_AP0)
-#define PTE_EXT_AP_URO_SRW     (PTE_EXT_AP1)
-#define PTE_EXT_AP_URW_SRW     (PTE_EXT_AP1|PTE_EXT_AP0)
-#define PTE_EXT_TEX(x)         ((x) << 6)      /* v5 */
-#define PTE_EXT_APX            (1 << 9)        /* v6 */
-#define PTE_EXT_SHARED         (1 << 10)       /* v6 */
-#define PTE_EXT_NG             (1 << 11)       /* v6 */
-
-/*
- *   - small page
- */
-#define PTE_SMALL_AP_MASK      (0xff << 4)
-#define PTE_SMALL_AP_UNO_SRO   (0x00 << 4)
-#define PTE_SMALL_AP_UNO_SRW   (0x55 << 4)
-#define PTE_SMALL_AP_URO_SRW   (0xaa << 4)
-#define PTE_SMALL_AP_URW_SRW   (0xff << 4)
-
 /*
  * "Linux" PTE definitions.
  *
@@ -236,11 +161,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
 
 #ifndef __ASSEMBLY__
 
-#include <asm/domain.h>
-
-#define _PAGE_USER_TABLE       (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER))
-#define _PAGE_KERNEL_TABLE     (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL))
-
 /*
  * The following macros handle the cache and bufferable bits...
  */