diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
commit | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (patch) | |
tree | 869d633803eb7c429624d3bd16a6117816849763 /arch/arm/include | |
parent | ddd559b13f6d2fe3ad68c4b3f5235fd3c2eae4e3 (diff) | |
parent | b7cfda9fc3d7aa60cffab5367f2a72a4a70060cd (diff) |
Merge branch 'master' into devel
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/atomic.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 17 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/setup.h | 3 |
4 files changed, 6 insertions, 20 deletions
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index 9e07fe507029..9ed2377fe8e5 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h | |||
@@ -159,8 +159,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | |||
159 | 159 | ||
160 | #else /* ARM_ARCH_6 */ | 160 | #else /* ARM_ARCH_6 */ |
161 | 161 | ||
162 | #include <asm/system.h> | ||
163 | |||
164 | #ifdef CONFIG_SMP | 162 | #ifdef CONFIG_SMP |
165 | #error SMP not supported on pre-ARMv6 CPUs | 163 | #error SMP not supported on pre-ARMv6 CPUs |
166 | #endif | 164 | #endif |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 376be1a62866..cefedf062138 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -218,7 +218,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
218 | * | 218 | * |
219 | * page_to_pfn(page) convert a struct page * to a PFN number | 219 | * page_to_pfn(page) convert a struct page * to a PFN number |
220 | * pfn_to_page(pfn) convert a _valid_ PFN number to struct page * | 220 | * pfn_to_page(pfn) convert a _valid_ PFN number to struct page * |
221 | * pfn_valid(pfn) indicates whether a PFN number is valid | ||
222 | * | 221 | * |
223 | * virt_to_page(k) convert a _valid_ virtual address to struct page * | 222 | * virt_to_page(k) convert a _valid_ virtual address to struct page * |
224 | * virt_addr_valid(k) indicates whether a virtual address is valid | 223 | * virt_addr_valid(k) indicates whether a virtual address is valid |
@@ -227,10 +226,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
227 | 226 | ||
228 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET | 227 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET |
229 | 228 | ||
230 | #ifndef CONFIG_SPARSEMEM | ||
231 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) | ||
232 | #endif | ||
233 | |||
234 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 229 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
235 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) | 230 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) |
236 | 231 | ||
@@ -247,18 +242,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
247 | #define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) | 242 | #define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) |
248 | #define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) | 243 | #define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) |
249 | 244 | ||
250 | #define pfn_valid(pfn) \ | ||
251 | ({ \ | ||
252 | unsigned int nid = PFN_TO_NID(pfn); \ | ||
253 | int valid = nid < MAX_NUMNODES; \ | ||
254 | if (valid) { \ | ||
255 | pg_data_t *node = NODE_DATA(nid); \ | ||
256 | valid = (pfn - node->node_start_pfn) < \ | ||
257 | node->node_spanned_pages; \ | ||
258 | } \ | ||
259 | valid; \ | ||
260 | }) | ||
261 | |||
262 | #define virt_to_page(kaddr) \ | 245 | #define virt_to_page(kaddr) \ |
263 | (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) | 246 | (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) |
264 | 247 | ||
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 9c746af1bf6e..3a32af4cce30 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -194,6 +194,10 @@ typedef unsigned long pgprot_t; | |||
194 | 194 | ||
195 | typedef struct page *pgtable_t; | 195 | typedef struct page *pgtable_t; |
196 | 196 | ||
197 | #ifndef CONFIG_SPARSEMEM | ||
198 | extern int pfn_valid(unsigned long); | ||
199 | #endif | ||
200 | |||
197 | #include <asm/memory.h> | 201 | #include <asm/memory.h> |
198 | 202 | ||
199 | #endif /* !__ASSEMBLY__ */ | 203 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index ee1304f22f94..5ccce0a9b03c 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -201,7 +201,8 @@ static struct tagtable __tagtable_##fn __tag = { tag, fn } | |||
201 | struct membank { | 201 | struct membank { |
202 | unsigned long start; | 202 | unsigned long start; |
203 | unsigned long size; | 203 | unsigned long size; |
204 | int node; | 204 | unsigned short node; |
205 | unsigned short highmem; | ||
205 | }; | 206 | }; |
206 | 207 | ||
207 | struct meminfo { | 208 | struct meminfo { |