aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-04-19 16:29:23 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 16:29:23 -0400
commitd455a3696c72283923e6870e9e4fe1daa861d7cd (patch)
tree572661a1ed6cceaf83cad55921b7812feace69ee
parentcdfb82fff33cf3b1a367a427e5d89a012dc568b1 (diff)
[PATCH] freepgt: arch FIRST_USER_ADDRESS 0
Replace misleading definition of FIRST_USER_PGD_NR 0 by definition of FIRST_USER_ADDRESS 0 in all the MMU architectures beyond arm and arm26. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-alpha/pgtable.h2
-rw-r--r--include/asm-cris/pgtable.h2
-rw-r--r--include/asm-frv/pgtable.h2
-rw-r--r--include/asm-i386/pgtable.h2
-rw-r--r--include/asm-ia64/pgtable.h2
-rw-r--r--include/asm-m32r/pgtable.h2
-rw-r--r--include/asm-m68k/pgtable.h2
-rw-r--r--include/asm-mips/pgtable-32.h2
-rw-r--r--include/asm-mips/pgtable-64.h2
-rw-r--r--include/asm-parisc/pgtable.h2
-rw-r--r--include/asm-ppc/pgtable.h2
-rw-r--r--include/asm-ppc64/pgtable.h2
-rw-r--r--include/asm-s390/pgtable.h4
-rw-r--r--include/asm-sh/pgtable.h2
-rw-r--r--include/asm-sh64/pgtable.h2
-rw-r--r--include/asm-sparc/pgtable.h2
-rw-r--r--include/asm-sparc64/pgtable.h2
-rw-r--r--include/asm-um/pgtable-2level.h2
-rw-r--r--include/asm-um/pgtable-3level.h2
-rw-r--r--include/asm-x86_64/pgtable.h2
20 files changed, 21 insertions, 21 deletions
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index faae196d8377..408aea55e0cc 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -42,7 +42,7 @@
42#define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3)) 42#define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3))
43#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3)) 43#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3))
44#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) 44#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
45#define FIRST_USER_PGD_NR 0 45#define FIRST_USER_ADDRESS 0
46 46
47/* Number of pointers that fit on a page: this will go away. */ 47/* Number of pointers that fit on a page: this will go away. */
48#define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3)) 48#define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3))
diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h
index 957dd92d108d..f7042944b073 100644
--- a/include/asm-cris/pgtable.h
+++ b/include/asm-cris/pgtable.h
@@ -76,7 +76,7 @@ extern void paging_init(void);
76 */ 76 */
77 77
78#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 78#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
79#define FIRST_USER_PGD_NR 0 79#define FIRST_USER_ADDRESS 0
80 80
81/* zero page used for uninitialized stuff */ 81/* zero page used for uninitialized stuff */
82#ifndef __ASSEMBLY__ 82#ifndef __ASSEMBLY__
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h
index cc1373c4b790..3c6d42a22dfe 100644
--- a/include/asm-frv/pgtable.h
+++ b/include/asm-frv/pgtable.h
@@ -141,7 +141,7 @@ extern unsigned long empty_zero_page;
141#define PTRS_PER_PTE 4096 141#define PTRS_PER_PTE 4096
142 142
143#define USER_PGDS_IN_LAST_PML4 (TASK_SIZE / PGDIR_SIZE) 143#define USER_PGDS_IN_LAST_PML4 (TASK_SIZE / PGDIR_SIZE)
144#define FIRST_USER_PGD_NR 0 144#define FIRST_USER_ADDRESS 0
145 145
146#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) 146#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
147#define KERNEL_PGD_PTRS (PTRS_PER_PGD - USER_PGD_PTRS) 147#define KERNEL_PGD_PTRS (PTRS_PER_PGD - USER_PGD_PTRS)
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 488c2b4befa5..5c725425d863 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -60,7 +60,7 @@ void paging_init(void);
60#define PGDIR_MASK (~(PGDIR_SIZE-1)) 60#define PGDIR_MASK (~(PGDIR_SIZE-1))
61 61
62#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 62#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
63#define FIRST_USER_PGD_NR 0 63#define FIRST_USER_ADDRESS 0
64 64
65#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) 65#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
66#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) 66#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index fecfd0f68961..ea121a002309 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -93,7 +93,7 @@
93#define PGDIR_MASK (~(PGDIR_SIZE-1)) 93#define PGDIR_MASK (~(PGDIR_SIZE-1))
94#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3)) 94#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3))
95#define USER_PTRS_PER_PGD (5*PTRS_PER_PGD/8) /* regions 0-4 are user regions */ 95#define USER_PTRS_PER_PGD (5*PTRS_PER_PGD/8) /* regions 0-4 are user regions */
96#define FIRST_USER_PGD_NR 0 96#define FIRST_USER_ADDRESS 0
97 97
98/* 98/*
99 * Definitions for second level: 99 * Definitions for second level:
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h
index 70a0eb68fdf6..da805e970844 100644
--- a/include/asm-m32r/pgtable.h
+++ b/include/asm-m32r/pgtable.h
@@ -51,7 +51,7 @@ extern unsigned long empty_zero_page[1024];
51#define PGDIR_MASK (~(PGDIR_SIZE - 1)) 51#define PGDIR_MASK (~(PGDIR_SIZE - 1))
52 52
53#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) 53#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
54#define FIRST_USER_PGD_NR 0 54#define FIRST_USER_ADDRESS 0
55 55
56#ifndef __ASSEMBLY__ 56#ifndef __ASSEMBLY__
57/* Just any arbitrary offset to the start of the vmalloc VM area: the 57/* Just any arbitrary offset to the start of the vmalloc VM area: the
diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h
index 0eef32778df2..0c87fc84f7a4 100644
--- a/include/asm-m68k/pgtable.h
+++ b/include/asm-m68k/pgtable.h
@@ -61,7 +61,7 @@
61#define PTRS_PER_PGD 128 61#define PTRS_PER_PGD 128
62#endif 62#endif
63#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 63#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
64#define FIRST_USER_PGD_NR 0 64#define FIRST_USER_ADDRESS 0
65 65
66/* Virtual address region for use by kernel_map() */ 66/* Virtual address region for use by kernel_map() */
67#ifdef CONFIG_SUN3 67#ifdef CONFIG_SUN3
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
index 41a0df7d7768..7fec93b76da9 100644
--- a/include/asm-mips/pgtable-32.h
+++ b/include/asm-mips/pgtable-32.h
@@ -74,7 +74,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
74#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) 74#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
75 75
76#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) 76#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE)
77#define FIRST_USER_PGD_NR 0 77#define FIRST_USER_ADDRESS 0
78 78
79#define VMALLOC_START KSEG2 79#define VMALLOC_START KSEG2
80 80
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h
index 704b551f59e9..1011e0635f56 100644
--- a/include/asm-mips/pgtable-64.h
+++ b/include/asm-mips/pgtable-64.h
@@ -89,7 +89,7 @@
89#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) 89#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
90 90
91#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) 91#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
92#define FIRST_USER_PGD_NR 0 92#define FIRST_USER_ADDRESS 0
93 93
94#define VMALLOC_START XKSEG 94#define VMALLOC_START XKSEG
95#define VMALLOC_END \ 95#define VMALLOC_END \
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
index af353a9bce21..f001bb01e38f 100644
--- a/include/asm-parisc/pgtable.h
+++ b/include/asm-parisc/pgtable.h
@@ -120,7 +120,7 @@
120 * pgd entries used up by user/kernel: 120 * pgd entries used up by user/kernel:
121 */ 121 */
122 122
123#define FIRST_USER_PGD_NR 0 123#define FIRST_USER_ADDRESS 0
124 124
125#ifndef __ASSEMBLY__ 125#ifndef __ASSEMBLY__
126extern void *vmalloc_start; 126extern void *vmalloc_start;
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index a67bd512b2c8..a38606d15549 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -96,7 +96,7 @@ extern unsigned long ioremap_bot, ioremap_base;
96#define PTRS_PER_PGD (1 << (32 - PGDIR_SHIFT)) 96#define PTRS_PER_PGD (1 << (32 - PGDIR_SHIFT))
97 97
98#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) 98#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
99#define FIRST_USER_PGD_NR 0 99#define FIRST_USER_ADDRESS 0
100 100
101#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) 101#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
102#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) 102#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
index 33b90e2aa47d..a26120517c54 100644
--- a/include/asm-ppc64/pgtable.h
+++ b/include/asm-ppc64/pgtable.h
@@ -41,7 +41,7 @@
41#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE) 41#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE)
42 42
43#define USER_PTRS_PER_PGD (1024) 43#define USER_PTRS_PER_PGD (1024)
44#define FIRST_USER_PGD_NR 0 44#define FIRST_USER_ADDRESS 0
45 45
46#define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \ 46#define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \
47 PGD_INDEX_SIZE + PAGE_SHIFT) 47 PGD_INDEX_SIZE + PAGE_SHIFT)
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index 1633cb75f057..df94f89038cc 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -95,14 +95,14 @@ extern char empty_zero_page[PAGE_SIZE];
95# define USER_PTRS_PER_PGD 512 95# define USER_PTRS_PER_PGD 512
96# define USER_PGD_PTRS 512 96# define USER_PGD_PTRS 512
97# define KERNEL_PGD_PTRS 512 97# define KERNEL_PGD_PTRS 512
98# define FIRST_USER_PGD_NR 0
99#else /* __s390x__ */ 98#else /* __s390x__ */
100# define USER_PTRS_PER_PGD 2048 99# define USER_PTRS_PER_PGD 2048
101# define USER_PGD_PTRS 2048 100# define USER_PGD_PTRS 2048
102# define KERNEL_PGD_PTRS 2048 101# define KERNEL_PGD_PTRS 2048
103# define FIRST_USER_PGD_NR 0
104#endif /* __s390x__ */ 102#endif /* __s390x__ */
105 103
104#define FIRST_USER_ADDRESS 0
105
106#define pte_ERROR(e) \ 106#define pte_ERROR(e) \
107 printk("%s:%d: bad pte %p.\n", __FILE__, __LINE__, (void *) pte_val(e)) 107 printk("%s:%d: bad pte %p.\n", __FILE__, __LINE__, (void *) pte_val(e))
108#define pmd_ERROR(e) \ 108#define pmd_ERROR(e) \
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index 8a9689d5366f..cd847a47a9aa 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -44,7 +44,7 @@ extern unsigned long empty_zero_page[1024];
44#define PGDIR_MASK (~(PGDIR_SIZE-1)) 44#define PGDIR_MASK (~(PGDIR_SIZE-1))
45 45
46#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 46#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
47#define FIRST_USER_PGD_NR 0 47#define FIRST_USER_ADDRESS 0
48 48
49#define PTE_PHYS_MASK 0x1ffff000 49#define PTE_PHYS_MASK 0x1ffff000
50 50
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h
index 45f70c0f4a5e..525e1523ef5f 100644
--- a/include/asm-sh64/pgtable.h
+++ b/include/asm-sh64/pgtable.h
@@ -238,7 +238,7 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
238 238
239/* Round it up ! */ 239/* Round it up ! */
240#define USER_PTRS_PER_PGD ((TASK_SIZE+PGDIR_SIZE-1)/PGDIR_SIZE) 240#define USER_PTRS_PER_PGD ((TASK_SIZE+PGDIR_SIZE-1)/PGDIR_SIZE)
241#define FIRST_USER_PGD_NR 0 241#define FIRST_USER_ADDRESS 0
242 242
243#ifndef __ASSEMBLY__ 243#ifndef __ASSEMBLY__
244#define VMALLOC_END 0xff000000 244#define VMALLOC_END 0xff000000
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
index 373a6c327590..40ed30a2b7c6 100644
--- a/include/asm-sparc/pgtable.h
+++ b/include/asm-sparc/pgtable.h
@@ -63,7 +63,7 @@ BTFIXUPDEF_INT(page_kernel)
63#define PTRS_PER_PMD BTFIXUP_SIMM13(ptrs_per_pmd) 63#define PTRS_PER_PMD BTFIXUP_SIMM13(ptrs_per_pmd)
64#define PTRS_PER_PGD BTFIXUP_SIMM13(ptrs_per_pgd) 64#define PTRS_PER_PGD BTFIXUP_SIMM13(ptrs_per_pgd)
65#define USER_PTRS_PER_PGD BTFIXUP_SIMM13(user_ptrs_per_pgd) 65#define USER_PTRS_PER_PGD BTFIXUP_SIMM13(user_ptrs_per_pgd)
66#define FIRST_USER_PGD_NR 0 66#define FIRST_USER_ADDRESS 0
67#define PTE_SIZE (PTRS_PER_PTE*4) 67#define PTE_SIZE (PTRS_PER_PTE*4)
68 68
69#define PAGE_NONE __pgprot(BTFIXUP_INT(page_none)) 69#define PAGE_NONE __pgprot(BTFIXUP_INT(page_none))
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index c93011574843..af9bf175a223 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -78,7 +78,7 @@
78#define PTRS_PER_PGD (1UL << PGDIR_BITS) 78#define PTRS_PER_PGD (1UL << PGDIR_BITS)
79 79
80/* Kernel has a separate 44bit address space. */ 80/* Kernel has a separate 44bit address space. */
81#define FIRST_USER_PGD_NR 0 81#define FIRST_USER_ADDRESS 0
82 82
83#define pte_ERROR(e) __builtin_trap() 83#define pte_ERROR(e) __builtin_trap()
84#define pmd_ERROR(e) __builtin_trap() 84#define pmd_ERROR(e) __builtin_trap()
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h
index 61eb24734247..9b3abc01d60e 100644
--- a/include/asm-um/pgtable-2level.h
+++ b/include/asm-um/pgtable-2level.h
@@ -23,7 +23,7 @@
23#define PTRS_PER_PTE 1024 23#define PTRS_PER_PTE 1024
24#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE) 24#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
25#define PTRS_PER_PGD 1024 25#define PTRS_PER_PGD 1024
26#define FIRST_USER_PGD_NR 0 26#define FIRST_USER_ADDRESS 0
27 27
28#define pte_ERROR(e) \ 28#define pte_ERROR(e) \
29 printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), \ 29 printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), \
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h
index faf051c2c418..bdbc3f97e20b 100644
--- a/include/asm-um/pgtable-3level.h
+++ b/include/asm-um/pgtable-3level.h
@@ -31,7 +31,7 @@
31#define PTRS_PER_PMD 512 31#define PTRS_PER_PMD 512
32#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE) 32#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
33#define PTRS_PER_PGD 512 33#define PTRS_PER_PGD 512
34#define FIRST_USER_PGD_NR 0 34#define FIRST_USER_ADDRESS 0
35 35
36#define pte_ERROR(e) \ 36#define pte_ERROR(e) \
37 printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), \ 37 printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), \
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index dc6b6f2604e8..db2a0efbf573 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -114,7 +114,7 @@ extern inline void pgd_clear (pgd_t * pgd)
114#define PGDIR_MASK (~(PGDIR_SIZE-1)) 114#define PGDIR_MASK (~(PGDIR_SIZE-1))
115 115
116#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 116#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
117#define FIRST_USER_PGD_NR 0 117#define FIRST_USER_ADDRESS 0
118 118
119#ifndef __ASSEMBLY__ 119#ifndef __ASSEMBLY__
120#define MAXMEM 0x3fffffffffffUL 120#define MAXMEM 0x3fffffffffffUL