diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-11-28 10:39:02 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-11-28 10:39:02 -0500 |
commit | 7ef4de17cc55a3c3b8d093743b1e3b845d8eba47 (patch) | |
tree | adf87c996affbb6c42850d55cb34c0e5a2f6d340 /arch/arm/include | |
parent | f412b09f4ed7c57f5b8935ed7d6fc786f402a629 (diff) | |
parent | b5ee9002583fc14e6d45a04c18f208987a8fbced (diff) |
Merge branch 'highmem' into devel
Conflicts:
arch/arm/mach-clps7500/include/mach/memory.h
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/memory.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h | 30 | ||||
-rw-r--r-- | arch/arm/include/asm/setup.h | 6 |
3 files changed, 27 insertions, 16 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 77764301844b..0202a7c20e62 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -112,10 +112,8 @@ | |||
112 | * private definitions which should NOT be used outside memory.h | 112 | * private definitions which should NOT be used outside memory.h |
113 | * files. Use virt_to_phys/phys_to_virt/__pa/__va instead. | 113 | * files. Use virt_to_phys/phys_to_virt/__pa/__va instead. |
114 | */ | 114 | */ |
115 | #ifndef __virt_to_phys | ||
116 | #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) | 115 | #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) |
117 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) | 116 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) |
118 | #endif | ||
119 | 117 | ||
120 | /* | 118 | /* |
121 | * Convert a physical address to a Page Frame Number and back | 119 | * Convert a physical address to a Page Frame Number and back |
@@ -180,6 +178,11 @@ static inline void *phys_to_virt(unsigned long x) | |||
180 | * memory. Use of these is *deprecated* (and that doesn't mean | 178 | * memory. Use of these is *deprecated* (and that doesn't mean |
181 | * use the __ prefixed forms instead.) See dma-mapping.h. | 179 | * use the __ prefixed forms instead.) See dma-mapping.h. |
182 | */ | 180 | */ |
181 | #ifndef __virt_to_bus | ||
182 | #define __virt_to_bus __virt_to_phys | ||
183 | #define __bus_to_virt __phys_to_virt | ||
184 | #endif | ||
185 | |||
183 | static inline __deprecated unsigned long virt_to_bus(void *x) | 186 | static inline __deprecated unsigned long virt_to_bus(void *x) |
184 | { | 187 | { |
185 | return __virt_to_bus((unsigned long)x); | 188 | return __virt_to_bus((unsigned long)x); |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 5fee45e23038..f341c9dbd662 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -108,30 +108,36 @@ | |||
108 | #error Unknown user operations model | 108 | #error Unknown user operations model |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | struct page; | ||
112 | |||
111 | struct cpu_user_fns { | 113 | struct cpu_user_fns { |
112 | void (*cpu_clear_user_page)(void *p, unsigned long user); | 114 | void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); |
113 | void (*cpu_copy_user_page)(void *to, const void *from, | 115 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, |
114 | unsigned long user); | 116 | unsigned long vaddr); |
115 | }; | 117 | }; |
116 | 118 | ||
117 | #ifdef MULTI_USER | 119 | #ifdef MULTI_USER |
118 | extern struct cpu_user_fns cpu_user; | 120 | extern struct cpu_user_fns cpu_user; |
119 | 121 | ||
120 | #define __cpu_clear_user_page cpu_user.cpu_clear_user_page | 122 | #define __cpu_clear_user_highpage cpu_user.cpu_clear_user_highpage |
121 | #define __cpu_copy_user_page cpu_user.cpu_copy_user_page | 123 | #define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage |
122 | 124 | ||
123 | #else | 125 | #else |
124 | 126 | ||
125 | #define __cpu_clear_user_page __glue(_USER,_clear_user_page) | 127 | #define __cpu_clear_user_highpage __glue(_USER,_clear_user_highpage) |
126 | #define __cpu_copy_user_page __glue(_USER,_copy_user_page) | 128 | #define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage) |
127 | 129 | ||
128 | extern void __cpu_clear_user_page(void *p, unsigned long user); | 130 | extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr); |
129 | extern void __cpu_copy_user_page(void *to, const void *from, | 131 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, |
130 | unsigned long user); | 132 | unsigned long vaddr); |
131 | #endif | 133 | #endif |
132 | 134 | ||
133 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) | 135 | #define clear_user_highpage(page,vaddr) \ |
134 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) | 136 | __cpu_clear_user_highpage(page, vaddr) |
137 | |||
138 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | ||
139 | #define copy_user_highpage(to,from,vaddr,vma) \ | ||
140 | __cpu_copy_user_highpage(to, from, vaddr) | ||
135 | 141 | ||
136 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
137 | extern void copy_page(void *to, const void *from); | 143 | extern void copy_page(void *to, const void *from); |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index a65413ba121d..f2cd18a0932b 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -209,9 +209,11 @@ struct meminfo { | |||
209 | struct membank bank[NR_BANKS]; | 209 | struct membank bank[NR_BANKS]; |
210 | }; | 210 | }; |
211 | 211 | ||
212 | extern struct meminfo meminfo; | ||
213 | |||
212 | #define for_each_nodebank(iter,mi,no) \ | 214 | #define for_each_nodebank(iter,mi,no) \ |
213 | for (iter = 0; iter < mi->nr_banks; iter++) \ | 215 | for (iter = 0; iter < (mi)->nr_banks; iter++) \ |
214 | if (mi->bank[iter].node == no) | 216 | if ((mi)->bank[iter].node == no) |
215 | 217 | ||
216 | #define bank_pfn_start(bank) __phys_to_pfn((bank)->start) | 218 | #define bank_pfn_start(bank) __phys_to_pfn((bank)->start) |
217 | #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size) | 219 | #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size) |