diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/byteorder.h | 25 | ||||
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 86 | ||||
-rw-r--r-- | arch/arm/include/asm/kexec.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 22 | ||||
-rw-r--r-- | arch/arm/include/asm/mtd-xip.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/tlbflush.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/unistd.h | 6 |
8 files changed, 103 insertions, 51 deletions
diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h index 4fbfb22f65a0..d04a7a2bc2e9 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h | |||
@@ -18,7 +18,15 @@ | |||
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <asm/types.h> | 19 | #include <asm/types.h> |
20 | 20 | ||
21 | static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) | 21 | #ifdef __ARMEB__ |
22 | # define __BIG_ENDIAN | ||
23 | #else | ||
24 | # define __LITTLE_ENDIAN | ||
25 | #endif | ||
26 | |||
27 | #define __SWAB_64_THRU_32__ | ||
28 | |||
29 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
22 | { | 30 | { |
23 | __u32 t; | 31 | __u32 t; |
24 | 32 | ||
@@ -40,19 +48,8 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) | |||
40 | 48 | ||
41 | return x; | 49 | return x; |
42 | } | 50 | } |
51 | #define __arch_swab32 __arch_swab32 | ||
43 | 52 | ||
44 | #define __arch__swab32(x) ___arch__swab32(x) | 53 | #include <linux/byteorder.h> |
45 | |||
46 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
47 | # define __BYTEORDER_HAS_U64__ | ||
48 | # define __SWAB_64_THRU_32__ | ||
49 | #endif | ||
50 | |||
51 | #ifdef __ARMEB__ | ||
52 | #include <linux/byteorder/big_endian.h> | ||
53 | #else | ||
54 | #include <linux/byteorder/little_endian.h> | ||
55 | #endif | ||
56 | 54 | ||
57 | #endif | 55 | #endif |
58 | |||
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 45329fca1b64..7b95d2058395 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -3,11 +3,48 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/mm.h> /* need struct page */ | 6 | #include <linux/mm_types.h> |
7 | |||
8 | #include <linux/scatterlist.h> | 7 | #include <linux/scatterlist.h> |
9 | 8 | ||
10 | #include <asm-generic/dma-coherent.h> | 9 | #include <asm-generic/dma-coherent.h> |
10 | #include <asm/memory.h> | ||
11 | |||
12 | /* | ||
13 | * page_to_dma/dma_to_virt/virt_to_dma are architecture private functions | ||
14 | * used internally by the DMA-mapping API to provide DMA addresses. They | ||
15 | * must not be used by drivers. | ||
16 | */ | ||
17 | #ifndef __arch_page_to_dma | ||
18 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | ||
19 | { | ||
20 | return (dma_addr_t)__virt_to_bus((unsigned long)page_address(page)); | ||
21 | } | ||
22 | |||
23 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | ||
24 | { | ||
25 | return (void *)__bus_to_virt(addr); | ||
26 | } | ||
27 | |||
28 | static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | ||
29 | { | ||
30 | return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); | ||
31 | } | ||
32 | #else | ||
33 | static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | ||
34 | { | ||
35 | return __arch_page_to_dma(dev, page); | ||
36 | } | ||
37 | |||
38 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | ||
39 | { | ||
40 | return __arch_dma_to_virt(dev, addr); | ||
41 | } | ||
42 | |||
43 | static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | ||
44 | { | ||
45 | return __arch_virt_to_dma(dev, addr); | ||
46 | } | ||
47 | #endif | ||
11 | 48 | ||
12 | /* | 49 | /* |
13 | * DMA-consistent mapping functions. These allocate/free a region of | 50 | * DMA-consistent mapping functions. These allocate/free a region of |
@@ -169,7 +206,7 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size, | |||
169 | if (!arch_is_coherent()) | 206 | if (!arch_is_coherent()) |
170 | dma_cache_maint(cpu_addr, size, dir); | 207 | dma_cache_maint(cpu_addr, size, dir); |
171 | 208 | ||
172 | return virt_to_dma(dev, (unsigned long)cpu_addr); | 209 | return virt_to_dma(dev, cpu_addr); |
173 | } | 210 | } |
174 | #else | 211 | #else |
175 | extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction); | 212 | extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction); |
@@ -195,7 +232,7 @@ dma_map_page(struct device *dev, struct page *page, | |||
195 | unsigned long offset, size_t size, | 232 | unsigned long offset, size_t size, |
196 | enum dma_data_direction dir) | 233 | enum dma_data_direction dir) |
197 | { | 234 | { |
198 | return dma_map_single(dev, page_address(page) + offset, size, (int)dir); | 235 | return dma_map_single(dev, page_address(page) + offset, size, dir); |
199 | } | 236 | } |
200 | 237 | ||
201 | /** | 238 | /** |
@@ -241,7 +278,7 @@ static inline void | |||
241 | dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size, | 278 | dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size, |
242 | enum dma_data_direction dir) | 279 | enum dma_data_direction dir) |
243 | { | 280 | { |
244 | dma_unmap_single(dev, handle, size, (int)dir); | 281 | dma_unmap_single(dev, handle, size, dir); |
245 | } | 282 | } |
246 | 283 | ||
247 | /** | 284 | /** |
@@ -314,11 +351,12 @@ extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_da | |||
314 | 351 | ||
315 | 352 | ||
316 | /** | 353 | /** |
317 | * dma_sync_single_for_cpu | 354 | * dma_sync_single_range_for_cpu |
318 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 355 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
319 | * @handle: DMA address of buffer | 356 | * @handle: DMA address of buffer |
320 | * @size: size of buffer to map | 357 | * @offset: offset of region to start sync |
321 | * @dir: DMA transfer direction | 358 | * @size: size of region to sync |
359 | * @dir: DMA transfer direction (same as passed to dma_map_single) | ||
322 | * | 360 | * |
323 | * Make physical memory consistent for a single streaming mode DMA | 361 | * Make physical memory consistent for a single streaming mode DMA |
324 | * translation after a transfer. | 362 | * translation after a transfer. |
@@ -332,25 +370,41 @@ extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_da | |||
332 | */ | 370 | */ |
333 | #ifndef CONFIG_DMABOUNCE | 371 | #ifndef CONFIG_DMABOUNCE |
334 | static inline void | 372 | static inline void |
335 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, | 373 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t handle, |
336 | enum dma_data_direction dir) | 374 | unsigned long offset, size_t size, |
375 | enum dma_data_direction dir) | ||
337 | { | 376 | { |
338 | if (!arch_is_coherent()) | 377 | if (!arch_is_coherent()) |
339 | dma_cache_maint((void *)dma_to_virt(dev, handle), size, dir); | 378 | dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir); |
340 | } | 379 | } |
341 | 380 | ||
342 | static inline void | 381 | static inline void |
343 | dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, | 382 | dma_sync_single_range_for_device(struct device *dev, dma_addr_t handle, |
344 | enum dma_data_direction dir) | 383 | unsigned long offset, size_t size, |
384 | enum dma_data_direction dir) | ||
345 | { | 385 | { |
346 | if (!arch_is_coherent()) | 386 | if (!arch_is_coherent()) |
347 | dma_cache_maint((void *)dma_to_virt(dev, handle), size, dir); | 387 | dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir); |
348 | } | 388 | } |
349 | #else | 389 | #else |
350 | extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction); | 390 | extern void dma_sync_single_range_for_cpu(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction); |
351 | extern void dma_sync_single_for_device(struct device*, dma_addr_t, size_t, enum dma_data_direction); | 391 | extern void dma_sync_single_range_for_device(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction); |
352 | #endif | 392 | #endif |
353 | 393 | ||
394 | static inline void | ||
395 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, | ||
396 | enum dma_data_direction dir) | ||
397 | { | ||
398 | dma_sync_single_range_for_cpu(dev, handle, 0, size, dir); | ||
399 | } | ||
400 | |||
401 | static inline void | ||
402 | dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, | ||
403 | enum dma_data_direction dir) | ||
404 | { | ||
405 | dma_sync_single_range_for_device(dev, handle, 0, size, dir); | ||
406 | } | ||
407 | |||
354 | 408 | ||
355 | /** | 409 | /** |
356 | * dma_sync_sg_for_cpu | 410 | * dma_sync_sg_for_cpu |
diff --git a/arch/arm/include/asm/kexec.h b/arch/arm/include/asm/kexec.h index c8986bb99ed5..df15a0dc228e 100644 --- a/arch/arm/include/asm/kexec.h +++ b/arch/arm/include/asm/kexec.h | |||
@@ -10,7 +10,7 @@ | |||
10 | /* Maximum address we can use for the control code buffer */ | 10 | /* Maximum address we can use for the control code buffer */ |
11 | #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL) | 11 | #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL) |
12 | 12 | ||
13 | #define KEXEC_CONTROL_CODE_SIZE 4096 | 13 | #define KEXEC_CONTROL_PAGE_SIZE 4096 |
14 | 14 | ||
15 | #define KEXEC_ARCH KEXEC_ARCH_ARM | 15 | #define KEXEC_ARCH KEXEC_ARCH_ARM |
16 | 16 | ||
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 1e070a2b561a..bf7c737c9226 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -150,6 +150,14 @@ | |||
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * Amount of memory reserved for the vmalloc() area, and minimum | ||
154 | * address for vmalloc mappings. | ||
155 | */ | ||
156 | extern unsigned long vmalloc_reserve; | ||
157 | |||
158 | #define VMALLOC_MIN (void *)(VMALLOC_END - vmalloc_reserve) | ||
159 | |||
160 | /* | ||
153 | * PFNs are used to describe any physical page; this means | 161 | * PFNs are used to describe any physical page; this means |
154 | * PFN 0 == physical address 0. | 162 | * PFN 0 == physical address 0. |
155 | * | 163 | * |
@@ -306,20 +314,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
306 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 314 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
307 | 315 | ||
308 | /* | 316 | /* |
309 | * Optional device DMA address remapping. Do _not_ use directly! | ||
310 | * We should really eliminate virt_to_bus() here - it's deprecated. | ||
311 | */ | ||
312 | #ifndef __arch_page_to_dma | ||
313 | #define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus((unsigned long)page_address(page))) | ||
314 | #define dma_to_virt(dev, addr) ((void *)__bus_to_virt(addr)) | ||
315 | #define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_bus((unsigned long)(addr))) | ||
316 | #else | ||
317 | #define page_to_dma(dev, page) (__arch_page_to_dma(dev, page)) | ||
318 | #define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr)) | ||
319 | #define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr)) | ||
320 | #endif | ||
321 | |||
322 | /* | ||
323 | * Optional coherency support. Currently used only by selected | 317 | * Optional coherency support. Currently used only by selected |
324 | * Intel XSC3-based systems. | 318 | * Intel XSC3-based systems. |
325 | */ | 319 | */ |
diff --git a/arch/arm/include/asm/mtd-xip.h b/arch/arm/include/asm/mtd-xip.h index 4225372a26f3..d8fbe2d9b8b9 100644 --- a/arch/arm/include/asm/mtd-xip.h +++ b/arch/arm/include/asm/mtd-xip.h | |||
@@ -10,8 +10,6 @@ | |||
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | * | ||
14 | * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $ | ||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #ifndef __ARM_MTD_XIP_H__ | 15 | #ifndef __ARM_MTD_XIP_H__ |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index b01d5e7e3d5a..517a4d6ffc74 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -112,9 +112,9 @@ extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | |||
112 | static inline void prefetch(const void *ptr) | 112 | static inline void prefetch(const void *ptr) |
113 | { | 113 | { |
114 | __asm__ __volatile__( | 114 | __asm__ __volatile__( |
115 | "pld\t%0" | 115 | "pld\t%a0" |
116 | : | 116 | : |
117 | : "o" (*(char *)ptr) | 117 | : "p" (ptr) |
118 | : "cc"); | 118 | : "cc"); |
119 | } | 119 | } |
120 | 120 | ||
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index 0d0d40f1b599..b543a054a17e 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -54,6 +54,7 @@ | |||
54 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction | 54 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction |
55 | * fr - Feroceon (v4wbi with non-outer-cacheable page table walks) | 55 | * fr - Feroceon (v4wbi with non-outer-cacheable page table walks) |
56 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction | 56 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction |
57 | * v7wbi - identical to v6wbi | ||
57 | */ | 58 | */ |
58 | #undef _TLB | 59 | #undef _TLB |
59 | #undef MULTI_TLB | 60 | #undef MULTI_TLB |
@@ -266,14 +267,16 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
266 | v4wbi_possible_flags | \ | 267 | v4wbi_possible_flags | \ |
267 | fr_possible_flags | \ | 268 | fr_possible_flags | \ |
268 | v4wb_possible_flags | \ | 269 | v4wb_possible_flags | \ |
269 | v6wbi_possible_flags) | 270 | v6wbi_possible_flags | \ |
271 | v7wbi_possible_flags) | ||
270 | 272 | ||
271 | #define always_tlb_flags (v3_always_flags & \ | 273 | #define always_tlb_flags (v3_always_flags & \ |
272 | v4_always_flags & \ | 274 | v4_always_flags & \ |
273 | v4wbi_always_flags & \ | 275 | v4wbi_always_flags & \ |
274 | fr_always_flags & \ | 276 | fr_always_flags & \ |
275 | v4wb_always_flags & \ | 277 | v4wb_always_flags & \ |
276 | v6wbi_always_flags) | 278 | v6wbi_always_flags & \ |
279 | v7wbi_always_flags) | ||
277 | 280 | ||
278 | #define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f))) | 281 | #define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f))) |
279 | 282 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index f95fbb2fcb5f..010618487cf1 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -381,6 +381,12 @@ | |||
381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) | 381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) |
382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) | 382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) |
383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) | 383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) |
384 | #define __NR_signalfd4 (__NR_SYSCALL_BASE+355) | ||
385 | #define __NR_eventfd2 (__NR_SYSCALL_BASE+356) | ||
386 | #define __NR_epoll_create1 (__NR_SYSCALL_BASE+357) | ||
387 | #define __NR_dup3 (__NR_SYSCALL_BASE+358) | ||
388 | #define __NR_pipe2 (__NR_SYSCALL_BASE+359) | ||
389 | #define __NR_inotify_init1 (__NR_SYSCALL_BASE+360) | ||
384 | 390 | ||
385 | /* | 391 | /* |
386 | * The following SWIs are ARM private. | 392 | * The following SWIs are ARM private. |