diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/cacheflush.h | 36 | ||||
-rw-r--r-- | arch/arm/include/asm/clkdev.h | 30 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iomd.h | 41 | ||||
-rw-r--r-- | arch/arm/include/asm/hwcap.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/string.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h | 2 |
8 files changed, 60 insertions, 63 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index de6c59f814a1..85a2514cbffc 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/glue.h> | 16 | #include <asm/glue.h> |
17 | #include <asm/shmparam.h> | 17 | #include <asm/shmparam.h> |
18 | #include <asm/cachetype.h> | ||
18 | 19 | ||
19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | 20 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) |
20 | 21 | ||
@@ -296,16 +297,6 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) | |||
296 | #endif | 297 | #endif |
297 | 298 | ||
298 | /* | 299 | /* |
299 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
300 | * vmalloc, ioremap etc) in kernel space for pages. Since the | ||
301 | * direct-mappings of these pages may contain cached data, we need | ||
302 | * to do a full cache flush to ensure that writebacks don't corrupt | ||
303 | * data placed into these pages via the new mappings. | ||
304 | */ | ||
305 | #define flush_cache_vmap(start, end) flush_cache_all() | ||
306 | #define flush_cache_vunmap(start, end) flush_cache_all() | ||
307 | |||
308 | /* | ||
309 | * Copy user data from/to a page which is mapped into a different | 300 | * Copy user data from/to a page which is mapped into a different |
310 | * processes address space. Really, we want to allow our "user | 301 | * processes address space. Really, we want to allow our "user |
311 | * space" model to handle this. | 302 | * space" model to handle this. |
@@ -444,4 +435,29 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, | |||
444 | dmac_inv_range(start, start + size); | 435 | dmac_inv_range(start, start + size); |
445 | } | 436 | } |
446 | 437 | ||
438 | /* | ||
439 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
440 | * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT | ||
441 | * caches, since the direct-mappings of these pages may contain cached | ||
442 | * data, we need to do a full cache flush to ensure that writebacks | ||
443 | * don't corrupt data placed into these pages via the new mappings. | ||
444 | */ | ||
445 | static inline void flush_cache_vmap(unsigned long start, unsigned long end) | ||
446 | { | ||
447 | if (!cache_is_vipt_nonaliasing()) | ||
448 | flush_cache_all(); | ||
449 | else | ||
450 | /* | ||
451 | * set_pte_at() called from vmap_pte_range() does not | ||
452 | * have a DSB after cleaning the cache line. | ||
453 | */ | ||
454 | dsb(); | ||
455 | } | ||
456 | |||
457 | static inline void flush_cache_vunmap(unsigned long start, unsigned long end) | ||
458 | { | ||
459 | if (!cache_is_vipt_nonaliasing()) | ||
460 | flush_cache_all(); | ||
461 | } | ||
462 | |||
447 | #endif | 463 | #endif |
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h new file mode 100644 index 000000000000..b6ec7c627b39 --- /dev/null +++ b/arch/arm/include/asm/clkdev.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/clkdev.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #ifndef __ASM_CLKDEV_H | ||
13 | #define __ASM_CLKDEV_H | ||
14 | |||
15 | struct clk; | ||
16 | |||
17 | struct clk_lookup { | ||
18 | struct list_head node; | ||
19 | const char *dev_id; | ||
20 | const char *con_id; | ||
21 | struct clk *clk; | ||
22 | }; | ||
23 | |||
24 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
25 | const char *dev_fmt, ...); | ||
26 | |||
27 | void clkdev_add(struct clk_lookup *cl); | ||
28 | void clkdev_drop(struct clk_lookup *cl); | ||
29 | |||
30 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/iomd.h b/arch/arm/include/asm/hardware/iomd.h index 9c5afbd71a69..f9ee69e4f53e 100644 --- a/arch/arm/include/asm/hardware/iomd.h +++ b/arch/arm/include/asm/hardware/iomd.h | |||
@@ -32,19 +32,11 @@ | |||
32 | #define IOMD_KARTRX (0x004) | 32 | #define IOMD_KARTRX (0x004) |
33 | #define IOMD_KCTRL (0x008) | 33 | #define IOMD_KCTRL (0x008) |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_CLPS7500 | ||
36 | #define IOMD_IOLINES (0x00C) | ||
37 | #endif | ||
38 | |||
39 | #define IOMD_IRQSTATA (0x010) | 35 | #define IOMD_IRQSTATA (0x010) |
40 | #define IOMD_IRQREQA (0x014) | 36 | #define IOMD_IRQREQA (0x014) |
41 | #define IOMD_IRQCLRA (0x014) | 37 | #define IOMD_IRQCLRA (0x014) |
42 | #define IOMD_IRQMASKA (0x018) | 38 | #define IOMD_IRQMASKA (0x018) |
43 | 39 | ||
44 | #ifdef CONFIG_ARCH_CLPS7500 | ||
45 | #define IOMD_SUSMODE (0x01C) | ||
46 | #endif | ||
47 | |||
48 | #define IOMD_IRQSTATB (0x020) | 40 | #define IOMD_IRQSTATB (0x020) |
49 | #define IOMD_IRQREQB (0x024) | 41 | #define IOMD_IRQREQB (0x024) |
50 | #define IOMD_IRQMASKB (0x028) | 42 | #define IOMD_IRQMASKB (0x028) |
@@ -53,10 +45,6 @@ | |||
53 | #define IOMD_FIQREQ (0x034) | 45 | #define IOMD_FIQREQ (0x034) |
54 | #define IOMD_FIQMASK (0x038) | 46 | #define IOMD_FIQMASK (0x038) |
55 | 47 | ||
56 | #ifdef CONFIG_ARCH_CLPS7500 | ||
57 | #define IOMD_CLKCTL (0x03C) | ||
58 | #endif | ||
59 | |||
60 | #define IOMD_T0CNTL (0x040) | 48 | #define IOMD_T0CNTL (0x040) |
61 | #define IOMD_T0LTCHL (0x040) | 49 | #define IOMD_T0LTCHL (0x040) |
62 | #define IOMD_T0CNTH (0x044) | 50 | #define IOMD_T0CNTH (0x044) |
@@ -71,18 +59,6 @@ | |||
71 | #define IOMD_T1GO (0x058) | 59 | #define IOMD_T1GO (0x058) |
72 | #define IOMD_T1LATCH (0x05c) | 60 | #define IOMD_T1LATCH (0x05c) |
73 | 61 | ||
74 | #ifdef CONFIG_ARCH_CLPS7500 | ||
75 | #define IOMD_IRQSTATC (0x060) | ||
76 | #define IOMD_IRQREQC (0x064) | ||
77 | #define IOMD_IRQMASKC (0x068) | ||
78 | |||
79 | #define IOMD_VIDMUX (0x06c) | ||
80 | |||
81 | #define IOMD_IRQSTATD (0x070) | ||
82 | #define IOMD_IRQREQD (0x074) | ||
83 | #define IOMD_IRQMASKD (0x078) | ||
84 | #endif | ||
85 | |||
86 | #define IOMD_ROMCR0 (0x080) | 62 | #define IOMD_ROMCR0 (0x080) |
87 | #define IOMD_ROMCR1 (0x084) | 63 | #define IOMD_ROMCR1 (0x084) |
88 | #ifdef CONFIG_ARCH_RPC | 64 | #ifdef CONFIG_ARCH_RPC |
@@ -100,11 +76,6 @@ | |||
100 | #define IOMD_MOUSEY (0x0A4) | 76 | #define IOMD_MOUSEY (0x0A4) |
101 | #endif | 77 | #endif |
102 | 78 | ||
103 | #ifdef CONFIG_ARCH_CLPS7500 | ||
104 | #define IOMD_MSEDAT (0x0A8) | ||
105 | #define IOMD_MSECTL (0x0Ac) | ||
106 | #endif | ||
107 | |||
108 | #ifdef CONFIG_ARCH_RPC | 79 | #ifdef CONFIG_ARCH_RPC |
109 | #define IOMD_DMATCR (0x0C0) | 80 | #define IOMD_DMATCR (0x0C0) |
110 | #endif | 81 | #endif |
@@ -113,18 +84,6 @@ | |||
113 | #ifdef CONFIG_ARCH_RPC | 84 | #ifdef CONFIG_ARCH_RPC |
114 | #define IOMD_DMAEXT (0x0CC) | 85 | #define IOMD_DMAEXT (0x0CC) |
115 | #endif | 86 | #endif |
116 | #ifdef CONFIG_ARCH_CLPS7500 | ||
117 | #define IOMD_ASTCR (0x0CC) | ||
118 | #define IOMD_DRAMCR (0x0D0) | ||
119 | #define IOMD_SELFREF (0x0D4) | ||
120 | #define IOMD_ATODICR (0x0E0) | ||
121 | #define IOMD_ATODSR (0x0E4) | ||
122 | #define IOMD_ATODCC (0x0E8) | ||
123 | #define IOMD_ATODCNT1 (0x0EC) | ||
124 | #define IOMD_ATODCNT2 (0x0F0) | ||
125 | #define IOMD_ATODCNT3 (0x0F4) | ||
126 | #define IOMD_ATODCNT4 (0x0F8) | ||
127 | #endif | ||
128 | 87 | ||
129 | #ifdef CONFIG_ARCH_RPC | 88 | #ifdef CONFIG_ARCH_RPC |
130 | #define DMA_EXT_IO0 1 | 89 | #define DMA_EXT_IO0 1 |
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index 81f4c899a555..bda489f9f017 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define HWCAP_IWMMXT 512 | 16 | #define HWCAP_IWMMXT 512 |
17 | #define HWCAP_CRUNCH 1024 | 17 | #define HWCAP_CRUNCH 1024 |
18 | #define HWCAP_THUMBEE 2048 | 18 | #define HWCAP_THUMBEE 2048 |
19 | #define HWCAP_NEON 4096 | ||
19 | 20 | ||
20 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 21 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
21 | /* | 22 | /* |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 77747df713b4..f341c9dbd662 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -139,7 +139,7 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | |||
139 | #define copy_user_highpage(to,from,vaddr,vma) \ | 139 | #define copy_user_highpage(to,from,vaddr,vma) \ |
140 | __cpu_copy_user_highpage(to, from, vaddr) | 140 | __cpu_copy_user_highpage(to, from, vaddr) |
141 | 141 | ||
142 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
143 | extern void copy_page(void *to, const void *from); | 143 | extern void copy_page(void *to, const void *from); |
144 | 144 | ||
145 | #undef STRICT_MM_TYPECHECKS | 145 | #undef STRICT_MM_TYPECHECKS |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 517a4d6ffc74..2320508443a5 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -64,7 +64,7 @@ struct thread_struct { | |||
64 | ({ \ | 64 | ({ \ |
65 | unsigned long *stack = (unsigned long *)sp; \ | 65 | unsigned long *stack = (unsigned long *)sp; \ |
66 | set_fs(USER_DS); \ | 66 | set_fs(USER_DS); \ |
67 | memzero(regs->uregs, sizeof(regs->uregs)); \ | 67 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ |
68 | if (current->personality & ADDR_LIMIT_32BIT) \ | 68 | if (current->personality & ADDR_LIMIT_32BIT) \ |
69 | regs->ARM_cpsr = USR_MODE; \ | 69 | regs->ARM_cpsr = USR_MODE; \ |
70 | else \ | 70 | else \ |
diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h index e50c4a39b699..cf4f3aad0fc1 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h | |||
@@ -21,7 +21,6 @@ extern void * memmove(void *, const void *, __kernel_size_t); | |||
21 | #define __HAVE_ARCH_MEMCHR | 21 | #define __HAVE_ARCH_MEMCHR |
22 | extern void * memchr(const void *, int, __kernel_size_t); | 22 | extern void * memchr(const void *, int, __kernel_size_t); |
23 | 23 | ||
24 | #define __HAVE_ARCH_MEMZERO | ||
25 | #define __HAVE_ARCH_MEMSET | 24 | #define __HAVE_ARCH_MEMSET |
26 | extern void * memset(void *, int, __kernel_size_t); | 25 | extern void * memset(void *, int, __kernel_size_t); |
27 | 26 | ||
@@ -39,12 +38,4 @@ extern void __memzero(void *ptr, __kernel_size_t n); | |||
39 | (__p); \ | 38 | (__p); \ |
40 | }) | 39 | }) |
41 | 40 | ||
42 | #define memzero(p,n) \ | ||
43 | ({ \ | ||
44 | void *__p = (p); size_t __n = n; \ | ||
45 | if ((__n) != 0) \ | ||
46 | __memzero((__p),(__n)); \ | ||
47 | (__p); \ | ||
48 | }) | ||
49 | |||
50 | #endif | 41 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index e98ec60b3400..cbb7a37e2978 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -400,7 +400,7 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u | |||
400 | if (access_ok(VERIFY_READ, from, n)) | 400 | if (access_ok(VERIFY_READ, from, n)) |
401 | n = __copy_from_user(to, from, n); | 401 | n = __copy_from_user(to, from, n); |
402 | else /* security hole - plug it */ | 402 | else /* security hole - plug it */ |
403 | memzero(to, n); | 403 | memset(to, 0, n); |
404 | return n; | 404 | return n; |
405 | } | 405 | } |
406 | 406 | ||