diff options
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/cacheflush.h | 37 | ||||
-rw-r--r-- | arch/arm/include/asm/clkdev.h | 30 | ||||
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/dma.h | 24 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/iomd.h | 41 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/vic.h | 10 | ||||
-rw-r--r-- | arch/arm/include/asm/hwcap.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/io.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/irq.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/mmu_context.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/mtd-xip.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h | 32 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/setup.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/smp.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/string.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/system.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h | 5 |
19 files changed, 127 insertions, 103 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index de6c59f814a1..6cbd8fdc9f1f 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -10,11 +10,11 @@ | |||
10 | #ifndef _ASMARM_CACHEFLUSH_H | 10 | #ifndef _ASMARM_CACHEFLUSH_H |
11 | #define _ASMARM_CACHEFLUSH_H | 11 | #define _ASMARM_CACHEFLUSH_H |
12 | 12 | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
15 | 14 | ||
16 | #include <asm/glue.h> | 15 | #include <asm/glue.h> |
17 | #include <asm/shmparam.h> | 16 | #include <asm/shmparam.h> |
17 | #include <asm/cachetype.h> | ||
18 | 18 | ||
19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | 19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) |
20 | 20 | ||
@@ -296,16 +296,6 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) | |||
296 | #endif | 296 | #endif |
297 | 297 | ||
298 | /* | 298 | /* |
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 | 299 | * Copy user data from/to a page which is mapped into a different |
310 | * processes address space. Really, we want to allow our "user | 300 | * processes address space. Really, we want to allow our "user |
311 | * space" model to handle this. | 301 | * space" model to handle this. |
@@ -444,4 +434,29 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, | |||
444 | dmac_inv_range(start, start + size); | 434 | dmac_inv_range(start, start + size); |
445 | } | 435 | } |
446 | 436 | ||
437 | /* | ||
438 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
439 | * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT | ||
440 | * caches, since the direct-mappings of these pages may contain cached | ||
441 | * data, we need to do a full cache flush to ensure that writebacks | ||
442 | * don't corrupt data placed into these pages via the new mappings. | ||
443 | */ | ||
444 | static inline void flush_cache_vmap(unsigned long start, unsigned long end) | ||
445 | { | ||
446 | if (!cache_is_vipt_nonaliasing()) | ||
447 | flush_cache_all(); | ||
448 | else | ||
449 | /* | ||
450 | * set_pte_at() called from vmap_pte_range() does not | ||
451 | * have a DSB after cleaning the cache line. | ||
452 | */ | ||
453 | dsb(); | ||
454 | } | ||
455 | |||
456 | static inline void flush_cache_vunmap(unsigned long start, unsigned long end) | ||
457 | { | ||
458 | if (!cache_is_vipt_nonaliasing()) | ||
459 | flush_cache_all(); | ||
460 | } | ||
461 | |||
447 | #endif | 462 | #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/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 4ed149cbb32a..22cb14ec3438 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -69,7 +69,9 @@ extern void dma_cache_maint(const void *kaddr, size_t size, int rw); | |||
69 | */ | 69 | */ |
70 | static inline int dma_supported(struct device *dev, u64 mask) | 70 | static inline int dma_supported(struct device *dev, u64 mask) |
71 | { | 71 | { |
72 | return dev->dma_mask && *dev->dma_mask != 0; | 72 | if (mask < ISA_DMA_THRESHOLD) |
73 | return 0; | ||
74 | return 1; | ||
73 | } | 75 | } |
74 | 76 | ||
75 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) | 77 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) |
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 75154b193117..df5638f3643a 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -1,12 +1,7 @@ | |||
1 | #ifndef __ASM_ARM_DMA_H | 1 | #ifndef __ASM_ARM_DMA_H |
2 | #define __ASM_ARM_DMA_H | 2 | #define __ASM_ARM_DMA_H |
3 | 3 | ||
4 | typedef unsigned int dmach_t; | 4 | #include <asm/memory.h> |
5 | |||
6 | #include <linux/spinlock.h> | ||
7 | #include <asm/system.h> | ||
8 | #include <asm/scatterlist.h> | ||
9 | #include <mach/dma.h> | ||
10 | 5 | ||
11 | /* | 6 | /* |
12 | * This is the maximum virtual address which can be DMA'd from. | 7 | * This is the maximum virtual address which can be DMA'd from. |
@@ -15,6 +10,19 @@ typedef unsigned int dmach_t; | |||
15 | #define MAX_DMA_ADDRESS 0xffffffff | 10 | #define MAX_DMA_ADDRESS 0xffffffff |
16 | #endif | 11 | #endif |
17 | 12 | ||
13 | #ifdef CONFIG_ISA_DMA_API | ||
14 | /* | ||
15 | * This is used to support drivers written for the x86 ISA DMA API. | ||
16 | * It should not be re-used except for that purpose. | ||
17 | */ | ||
18 | #include <linux/spinlock.h> | ||
19 | #include <asm/system.h> | ||
20 | #include <asm/scatterlist.h> | ||
21 | |||
22 | typedef unsigned int dmach_t; | ||
23 | |||
24 | #include <mach/isa-dma.h> | ||
25 | |||
18 | /* | 26 | /* |
19 | * DMA modes | 27 | * DMA modes |
20 | */ | 28 | */ |
@@ -140,4 +148,6 @@ extern int isa_dma_bridge_buggy; | |||
140 | #define isa_dma_bridge_buggy (0) | 148 | #define isa_dma_bridge_buggy (0) |
141 | #endif | 149 | #endif |
142 | 150 | ||
143 | #endif /* _ARM_DMA_H */ | 151 | #endif /* CONFIG_ISA_DMA_API */ |
152 | |||
153 | #endif /* __ASM_ARM_DMA_H */ | ||
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/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h index 263f2c362a30..f87328d4a180 100644 --- a/arch/arm/include/asm/hardware/vic.h +++ b/arch/arm/include/asm/hardware/vic.h | |||
@@ -29,15 +29,17 @@ | |||
29 | #define VIC_INT_SOFT 0x18 | 29 | #define VIC_INT_SOFT 0x18 |
30 | #define VIC_INT_SOFT_CLEAR 0x1c | 30 | #define VIC_INT_SOFT_CLEAR 0x1c |
31 | #define VIC_PROTECT 0x20 | 31 | #define VIC_PROTECT 0x20 |
32 | #define VIC_VECT_ADDR 0x30 | 32 | #define VIC_PL190_VECT_ADDR 0x30 /* PL190 only */ |
33 | #define VIC_DEF_VECT_ADDR 0x34 | 33 | #define VIC_PL190_DEF_VECT_ADDR 0x34 /* PL190 only */ |
34 | 34 | ||
35 | #define VIC_VECT_ADDR0 0x100 /* 0 to 15 */ | 35 | #define VIC_VECT_ADDR0 0x100 /* 0 to 15 (0..31 PL192) */ |
36 | #define VIC_VECT_CNTL0 0x200 /* 0 to 15 */ | 36 | #define VIC_VECT_CNTL0 0x200 /* 0 to 15 (0..31 PL192) */ |
37 | #define VIC_ITCR 0x300 /* VIC test control register */ | 37 | #define VIC_ITCR 0x300 /* VIC test control register */ |
38 | 38 | ||
39 | #define VIC_VECT_CNTL_ENABLE (1 << 5) | 39 | #define VIC_VECT_CNTL_ENABLE (1 << 5) |
40 | 40 | ||
41 | #define VIC_PL192_VECT_ADDR 0xF00 | ||
42 | |||
41 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
42 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources); | 44 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources); |
43 | #endif | 45 | #endif |
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/io.h b/arch/arm/include/asm/io.h index a8094451be57..d2a59cfc30ce 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -80,6 +80,14 @@ extern void __iounmap(volatile void __iomem *addr); | |||
80 | extern void __readwrite_bug(const char *fn); | 80 | extern void __readwrite_bug(const char *fn); |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * A typesafe __io() helper | ||
84 | */ | ||
85 | static inline void __iomem *__typesafe_io(unsigned long addr) | ||
86 | { | ||
87 | return (void __iomem *)addr; | ||
88 | } | ||
89 | |||
90 | /* | ||
83 | * Now, pick up the machine-defined IO definitions | 91 | * Now, pick up the machine-defined IO definitions |
84 | */ | 92 | */ |
85 | #include <mach/io.h> | 93 | #include <mach/io.h> |
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index a0009aa5d157..328f14a8b790 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h | |||
@@ -7,10 +7,6 @@ | |||
7 | #define irq_canonicalize(i) (i) | 7 | #define irq_canonicalize(i) (i) |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #ifndef NR_IRQS | ||
11 | #define NR_IRQS 128 | ||
12 | #endif | ||
13 | |||
14 | /* | 10 | /* |
15 | * Use this value to indicate lack of interrupt | 11 | * Use this value to indicate lack of interrupt |
16 | * capability | 12 | * capability |
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/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 0559f37c2a27..263fed05ea33 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define __ASM_ARM_MMU_CONTEXT_H | 14 | #define __ASM_ARM_MMU_CONTEXT_H |
15 | 15 | ||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/sched.h> | ||
17 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
18 | #include <asm/cachetype.h> | 19 | #include <asm/cachetype.h> |
19 | #include <asm/proc-fns.h> | 20 | #include <asm/proc-fns.h> |
diff --git a/arch/arm/include/asm/mtd-xip.h b/arch/arm/include/asm/mtd-xip.h index d8fbe2d9b8b9..d79d66d2cf71 100644 --- a/arch/arm/include/asm/mtd-xip.h +++ b/arch/arm/include/asm/mtd-xip.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __ARM_MTD_XIP_H__ | 15 | #ifndef __ARM_MTD_XIP_H__ |
16 | #define __ARM_MTD_XIP_H__ | 16 | #define __ARM_MTD_XIP_H__ |
17 | 17 | ||
18 | #include <mach/hardware.h> | ||
19 | #include <mach/mtd-xip.h> | 18 | #include <mach/mtd-xip.h> |
20 | 19 | ||
21 | /* fill instruction prefetch */ | 20 | /* fill instruction prefetch */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index bed1c0a00368..f341c9dbd662 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -108,32 +108,38 @@ | |||
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) memzero((void *)(page), 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); |
138 | 144 | ||
139 | #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 6ff33790f47b..1845892260e7 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/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) |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 727b5c042e52..fad70da5911d 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -114,7 +114,7 @@ extern void local_timer_interrupt(void); | |||
114 | /* | 114 | /* |
115 | * Stop a local timer interrupt. | 115 | * Stop a local timer interrupt. |
116 | */ | 116 | */ |
117 | extern void local_timer_stop(unsigned int cpu); | 117 | extern void local_timer_stop(void); |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * Platform provides this to acknowledge a local timer IRQ | 120 | * Platform provides this to acknowledge a local timer IRQ |
@@ -123,7 +123,7 @@ extern int local_timer_ack(void); | |||
123 | 123 | ||
124 | #else | 124 | #else |
125 | 125 | ||
126 | static inline void local_timer_stop(unsigned int cpu) | 126 | static inline void local_timer_stop(void) |
127 | { | 127 | { |
128 | } | 128 | } |
129 | 129 | ||
@@ -132,7 +132,7 @@ static inline void local_timer_stop(unsigned int cpu) | |||
132 | /* | 132 | /* |
133 | * Setup a local timer interrupt for a CPU. | 133 | * Setup a local timer interrupt for a CPU. |
134 | */ | 134 | */ |
135 | extern void local_timer_setup(unsigned int cpu); | 135 | extern void local_timer_setup(void); |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * show local interrupt info | 138 | * show local interrupt info |
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/system.h b/arch/arm/include/asm/system.h index 568020b34e3e..811be55f338e 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <asm/memory.h> | ||
7 | |||
8 | #define CPU_ARCH_UNKNOWN 0 | 6 | #define CPU_ARCH_UNKNOWN 0 |
9 | #define CPU_ARCH_ARMv3 1 | 7 | #define CPU_ARCH_ARMv3 1 |
10 | #define CPU_ARCH_ARMv4 2 | 8 | #define CPU_ARCH_ARMv4 2 |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index e98ec60b3400..7897464e0c24 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -11,7 +11,8 @@ | |||
11 | /* | 11 | /* |
12 | * User space memory access functions | 12 | * User space memory access functions |
13 | */ | 13 | */ |
14 | #include <linux/sched.h> | 14 | #include <linux/string.h> |
15 | #include <linux/thread_info.h> | ||
15 | #include <asm/errno.h> | 16 | #include <asm/errno.h> |
16 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
17 | #include <asm/domain.h> | 18 | #include <asm/domain.h> |
@@ -400,7 +401,7 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u | |||
400 | if (access_ok(VERIFY_READ, from, n)) | 401 | if (access_ok(VERIFY_READ, from, n)) |
401 | n = __copy_from_user(to, from, n); | 402 | n = __copy_from_user(to, from, n); |
402 | else /* security hole - plug it */ | 403 | else /* security hole - plug it */ |
403 | memzero(to, n); | 404 | memset(to, 0, n); |
404 | return n; | 405 | return n; |
405 | } | 406 | } |
406 | 407 | ||