diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-19 18:21:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-19 18:21:51 -0500 |
commit | 29ac878a71d1900cc2e283819b1daa388961ab6e (patch) | |
tree | 8756008bf1e3b07f2ab6fc6321b494a5eeee63ed | |
parent | 54c4e6b5fee0347ab81e2c2fe4239c455c3422ae (diff) | |
parent | a6c61e9dfdd0adf8443932cfc43b0c1e25036ad5 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
-rw-r--r-- | Documentation/arm/memory.txt | 4 | ||||
-rw-r--r-- | arch/arm/kernel/armksyms.c | 1 | ||||
-rw-r--r-- | arch/arm/kernel/entry-common.S | 3 | ||||
-rw-r--r-- | arch/arm/kernel/signal.c | 25 | ||||
-rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 6 | ||||
-rw-r--r-- | arch/arm/lib/getuser.S | 11 | ||||
-rw-r--r-- | arch/arm/mm/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mm/blockops.c | 185 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 24 | ||||
-rw-r--r-- | arch/arm/mm/ioremap.c | 3 | ||||
-rw-r--r-- | drivers/mtd/maps/ipaq-flash.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/h1910.c | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/io.h | 9 | ||||
-rw-r--r-- | include/asm-arm/io.h | 21 | ||||
-rw-r--r-- | include/asm-arm/uaccess.h | 8 |
15 files changed, 57 insertions, 253 deletions
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 4b1c93a8177b..dc6045577a8b 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Kernel Memory Layout on ARM Linux | 1 | Kernel Memory Layout on ARM Linux |
2 | 2 | ||
3 | Russell King <rmk@arm.linux.org.uk> | 3 | Russell King <rmk@arm.linux.org.uk> |
4 | May 21, 2004 (2.6.6) | 4 | November 17, 2005 (2.6.15) |
5 | 5 | ||
6 | This document describes the virtual memory layout which the Linux | 6 | This document describes the virtual memory layout which the Linux |
7 | kernel uses for ARM processors. It indicates which regions are | 7 | kernel uses for ARM processors. It indicates which regions are |
@@ -37,6 +37,8 @@ ff000000 ffbfffff Reserved for future expansion of DMA | |||
37 | mapping region. | 37 | mapping region. |
38 | 38 | ||
39 | VMALLOC_END feffffff Free for platform use, recommended. | 39 | VMALLOC_END feffffff Free for platform use, recommended. |
40 | VMALLOC_END must be aligned to a 2MB | ||
41 | boundary. | ||
40 | 42 | ||
41 | VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. | 43 | VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. |
42 | Memory returned by vmalloc/ioremap will | 44 | Memory returned by vmalloc/ioremap will |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 7a3261f0bf79..9997098009a9 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -120,7 +120,6 @@ EXPORT_SYMBOL(__arch_strncpy_from_user); | |||
120 | EXPORT_SYMBOL(__get_user_1); | 120 | EXPORT_SYMBOL(__get_user_1); |
121 | EXPORT_SYMBOL(__get_user_2); | 121 | EXPORT_SYMBOL(__get_user_2); |
122 | EXPORT_SYMBOL(__get_user_4); | 122 | EXPORT_SYMBOL(__get_user_4); |
123 | EXPORT_SYMBOL(__get_user_8); | ||
124 | 123 | ||
125 | EXPORT_SYMBOL(__put_user_1); | 124 | EXPORT_SYMBOL(__put_user_1); |
126 | EXPORT_SYMBOL(__put_user_2); | 125 | EXPORT_SYMBOL(__put_user_2); |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 066597f4345a..f7f183075237 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -48,8 +48,7 @@ work_pending: | |||
48 | mov r0, sp @ 'regs' | 48 | mov r0, sp @ 'regs' |
49 | mov r2, why @ 'syscall' | 49 | mov r2, why @ 'syscall' |
50 | bl do_notify_resume | 50 | bl do_notify_resume |
51 | disable_irq @ disable interrupts | 51 | b ret_slow_syscall @ Check work again |
52 | b no_work_pending | ||
53 | 52 | ||
54 | work_resched: | 53 | work_resched: |
55 | bl schedule | 54 | bl schedule |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index a917e3dd3666..765922bcf9e7 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -595,23 +595,22 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
595 | */ | 595 | */ |
596 | ret |= !valid_user_regs(regs); | 596 | ret |= !valid_user_regs(regs); |
597 | 597 | ||
598 | /* | ||
599 | * Block the signal if we were unsuccessful. | ||
600 | */ | ||
601 | if (ret != 0) { | 598 | if (ret != 0) { |
602 | spin_lock_irq(&tsk->sighand->siglock); | 599 | force_sigsegv(sig, tsk); |
603 | sigorsets(&tsk->blocked, &tsk->blocked, | 600 | return; |
604 | &ka->sa.sa_mask); | ||
605 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
606 | sigaddset(&tsk->blocked, sig); | ||
607 | recalc_sigpending(); | ||
608 | spin_unlock_irq(&tsk->sighand->siglock); | ||
609 | } | 601 | } |
610 | 602 | ||
611 | if (ret == 0) | 603 | /* |
612 | return; | 604 | * Block the signal if we were successful. |
605 | */ | ||
606 | spin_lock_irq(&tsk->sighand->siglock); | ||
607 | sigorsets(&tsk->blocked, &tsk->blocked, | ||
608 | &ka->sa.sa_mask); | ||
609 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
610 | sigaddset(&tsk->blocked, sig); | ||
611 | recalc_sigpending(); | ||
612 | spin_unlock_irq(&tsk->sighand->siglock); | ||
613 | 613 | ||
614 | force_sigsegv(sig, tsk); | ||
615 | } | 614 | } |
616 | 615 | ||
617 | /* | 616 | /* |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 80c8e4c8cefa..9a47770114d4 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -172,6 +172,10 @@ SECTIONS | |||
172 | .comment 0 : { *(.comment) } | 172 | .comment 0 : { *(.comment) } |
173 | } | 173 | } |
174 | 174 | ||
175 | /* those must never be empty */ | 175 | /* |
176 | * These must never be empty | ||
177 | * If you have to comment these two assert statements out, your | ||
178 | * binutils is too old (for other reasons as well) | ||
179 | */ | ||
176 | ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") | 180 | ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") |
177 | ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") | 181 | ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") |
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index d204018070a4..c03ea8e666ba 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
@@ -54,15 +54,6 @@ __get_user_4: | |||
54 | mov r0, #0 | 54 | mov r0, #0 |
55 | mov pc, lr | 55 | mov pc, lr |
56 | 56 | ||
57 | .global __get_user_8 | ||
58 | __get_user_8: | ||
59 | 5: ldrt r2, [r0], #4 | ||
60 | 6: ldrt r3, [r0] | ||
61 | mov r0, #0 | ||
62 | mov pc, lr | ||
63 | |||
64 | __get_user_bad_8: | ||
65 | mov r3, #0 | ||
66 | __get_user_bad: | 57 | __get_user_bad: |
67 | mov r2, #0 | 58 | mov r2, #0 |
68 | mov r0, #-EFAULT | 59 | mov r0, #-EFAULT |
@@ -73,6 +64,4 @@ __get_user_bad: | |||
73 | .long 2b, __get_user_bad | 64 | .long 2b, __get_user_bad |
74 | .long 3b, __get_user_bad | 65 | .long 3b, __get_user_bad |
75 | .long 4b, __get_user_bad | 66 | .long 4b, __get_user_bad |
76 | .long 5b, __get_user_bad_8 | ||
77 | .long 6b, __get_user_bad_8 | ||
78 | .previous | 67 | .previous |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 59f47d4c2dfe..ffe73ba2bf17 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -51,4 +51,4 @@ obj-$(CONFIG_CPU_ARM1026) += proc-arm1026.o | |||
51 | obj-$(CONFIG_CPU_SA110) += proc-sa110.o | 51 | obj-$(CONFIG_CPU_SA110) += proc-sa110.o |
52 | obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o | 52 | obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o |
53 | obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o | 53 | obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o |
54 | obj-$(CONFIG_CPU_V6) += proc-v6.o blockops.o | 54 | obj-$(CONFIG_CPU_V6) += proc-v6.o |
diff --git a/arch/arm/mm/blockops.c b/arch/arm/mm/blockops.c deleted file mode 100644 index 4f5ee2d08996..000000000000 --- a/arch/arm/mm/blockops.c +++ /dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/errno.h> | ||
4 | #include <linux/mm.h> | ||
5 | |||
6 | #include <asm/memory.h> | ||
7 | #include <asm/ptrace.h> | ||
8 | #include <asm/cacheflush.h> | ||
9 | #include <asm/traps.h> | ||
10 | |||
11 | extern struct cpu_cache_fns blk_cache_fns; | ||
12 | |||
13 | #define HARVARD_CACHE | ||
14 | |||
15 | /* | ||
16 | * blk_flush_kern_dcache_page(kaddr) | ||
17 | * | ||
18 | * Ensure that the data held in the page kaddr is written back | ||
19 | * to the page in question. | ||
20 | * | ||
21 | * - kaddr - kernel address (guaranteed to be page aligned) | ||
22 | */ | ||
23 | static void __attribute__((naked)) | ||
24 | blk_flush_kern_dcache_page(void *kaddr) | ||
25 | { | ||
26 | asm( | ||
27 | "add r1, r0, %0 \n\ | ||
28 | sub r1, r1, %1 \n\ | ||
29 | 1: .word 0xec401f0e @ mcrr p15, 0, r0, r1, c14, 0 @ blocking \n\ | ||
30 | mov r0, #0 \n\ | ||
31 | mcr p15, 0, r0, c7, c5, 0 \n\ | ||
32 | mcr p15, 0, r0, c7, c10, 4 \n\ | ||
33 | mov pc, lr" | ||
34 | : | ||
35 | : "I" (PAGE_SIZE), "I" (L1_CACHE_BYTES)); | ||
36 | } | ||
37 | |||
38 | /* | ||
39 | * blk_dma_inv_range(start,end) | ||
40 | * | ||
41 | * Invalidate the data cache within the specified region; we will | ||
42 | * be performing a DMA operation in this region and we want to | ||
43 | * purge old data in the cache. | ||
44 | * | ||
45 | * - start - virtual start address of region | ||
46 | * - end - virtual end address of region | ||
47 | */ | ||
48 | static void __attribute__((naked)) | ||
49 | blk_dma_inv_range_unified(unsigned long start, unsigned long end) | ||
50 | { | ||
51 | asm( | ||
52 | "tst r0, %0 \n\ | ||
53 | mcrne p15, 0, r0, c7, c11, 1 @ clean unified line \n\ | ||
54 | tst r1, %0 \n\ | ||
55 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line\n\ | ||
56 | .word 0xec401f06 @ mcrr p15, 0, r1, r0, c6, 0 @ blocking \n\ | ||
57 | mov r0, #0 \n\ | ||
58 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer \n\ | ||
59 | mov pc, lr" | ||
60 | : | ||
61 | : "I" (L1_CACHE_BYTES - 1)); | ||
62 | } | ||
63 | |||
64 | static void __attribute__((naked)) | ||
65 | blk_dma_inv_range_harvard(unsigned long start, unsigned long end) | ||
66 | { | ||
67 | asm( | ||
68 | "tst r0, %0 \n\ | ||
69 | mcrne p15, 0, r0, c7, c10, 1 @ clean D line \n\ | ||
70 | tst r1, %0 \n\ | ||
71 | mcrne p15, 0, r1, c7, c14, 1 @ clean & invalidate D line \n\ | ||
72 | .word 0xec401f06 @ mcrr p15, 0, r1, r0, c6, 0 @ blocking \n\ | ||
73 | mov r0, #0 \n\ | ||
74 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer \n\ | ||
75 | mov pc, lr" | ||
76 | : | ||
77 | : "I" (L1_CACHE_BYTES - 1)); | ||
78 | } | ||
79 | |||
80 | /* | ||
81 | * blk_dma_clean_range(start,end) | ||
82 | * - start - virtual start address of region | ||
83 | * - end - virtual end address of region | ||
84 | */ | ||
85 | static void __attribute__((naked)) | ||
86 | blk_dma_clean_range(unsigned long start, unsigned long end) | ||
87 | { | ||
88 | asm( | ||
89 | ".word 0xec401f0c @ mcrr p15, 0, r1, r0, c12, 0 @ blocking \n\ | ||
90 | mov r0, #0 \n\ | ||
91 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer \n\ | ||
92 | mov pc, lr"); | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * blk_dma_flush_range(start,end) | ||
97 | * - start - virtual start address of region | ||
98 | * - end - virtual end address of region | ||
99 | */ | ||
100 | static void __attribute__((naked)) | ||
101 | blk_dma_flush_range(unsigned long start, unsigned long end) | ||
102 | { | ||
103 | asm( | ||
104 | ".word 0xec401f0e @ mcrr p15, 0, r1, r0, c14, 0 @ blocking \n\ | ||
105 | mov pc, lr"); | ||
106 | } | ||
107 | |||
108 | static int blockops_trap(struct pt_regs *regs, unsigned int instr) | ||
109 | { | ||
110 | regs->ARM_r4 |= regs->ARM_r2; | ||
111 | regs->ARM_pc += 4; | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | static char *func[] = { | ||
116 | "Prefetch data range", | ||
117 | "Clean+Invalidate data range", | ||
118 | "Clean data range", | ||
119 | "Invalidate data range", | ||
120 | "Invalidate instr range" | ||
121 | }; | ||
122 | |||
123 | static struct undef_hook blockops_hook __initdata = { | ||
124 | .instr_mask = 0x0fffffd0, | ||
125 | .instr_val = 0x0c401f00, | ||
126 | .cpsr_mask = PSR_T_BIT, | ||
127 | .cpsr_val = 0, | ||
128 | .fn = blockops_trap, | ||
129 | }; | ||
130 | |||
131 | static int __init blockops_check(void) | ||
132 | { | ||
133 | register unsigned int err asm("r4") = 0; | ||
134 | unsigned int err_pos = 1; | ||
135 | unsigned int cache_type; | ||
136 | int i; | ||
137 | |||
138 | asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (cache_type)); | ||
139 | |||
140 | printk("Checking V6 block cache operations:\n"); | ||
141 | register_undef_hook(&blockops_hook); | ||
142 | |||
143 | __asm__ ("mov r0, %0\n\t" | ||
144 | "mov r1, %1\n\t" | ||
145 | "mov r2, #1\n\t" | ||
146 | ".word 0xec401f2c @ mcrr p15, 0, r1, r0, c12, 2\n\t" | ||
147 | "mov r2, #2\n\t" | ||
148 | ".word 0xec401f0e @ mcrr p15, 0, r1, r0, c14, 0\n\t" | ||
149 | "mov r2, #4\n\t" | ||
150 | ".word 0xec401f0c @ mcrr p15, 0, r1, r0, c12, 0\n\t" | ||
151 | "mov r2, #8\n\t" | ||
152 | ".word 0xec401f06 @ mcrr p15, 0, r1, r0, c6, 0\n\t" | ||
153 | "mov r2, #16\n\t" | ||
154 | ".word 0xec401f05 @ mcrr p15, 0, r1, r0, c5, 0\n\t" | ||
155 | : | ||
156 | : "r" (PAGE_OFFSET), "r" (PAGE_OFFSET + 128) | ||
157 | : "r0", "r1", "r2"); | ||
158 | |||
159 | unregister_undef_hook(&blockops_hook); | ||
160 | |||
161 | for (i = 0; i < ARRAY_SIZE(func); i++, err_pos <<= 1) | ||
162 | printk("%30s: %ssupported\n", func[i], err & err_pos ? "not " : ""); | ||
163 | |||
164 | if ((err & 8) == 0) { | ||
165 | printk(" --> Using %s block cache invalidate\n", | ||
166 | cache_type & (1 << 24) ? "harvard" : "unified"); | ||
167 | if (cache_type & (1 << 24)) | ||
168 | cpu_cache.dma_inv_range = blk_dma_inv_range_harvard; | ||
169 | else | ||
170 | cpu_cache.dma_inv_range = blk_dma_inv_range_unified; | ||
171 | } | ||
172 | if ((err & 4) == 0) { | ||
173 | printk(" --> Using block cache clean\n"); | ||
174 | cpu_cache.dma_clean_range = blk_dma_clean_range; | ||
175 | } | ||
176 | if ((err & 2) == 0) { | ||
177 | printk(" --> Using block cache clean+invalidate\n"); | ||
178 | cpu_cache.dma_flush_range = blk_dma_flush_range; | ||
179 | cpu_cache.flush_kern_dcache_page = blk_flush_kern_dcache_page; | ||
180 | } | ||
181 | |||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | __initcall(blockops_check); | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index c168f322ef8c..8b276ee38acf 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -420,7 +420,8 @@ static void __init bootmem_init(struct meminfo *mi) | |||
420 | * Set up device the mappings. Since we clear out the page tables for all | 420 | * Set up device the mappings. Since we clear out the page tables for all |
421 | * mappings above VMALLOC_END, we will remove any debug device mappings. | 421 | * mappings above VMALLOC_END, we will remove any debug device mappings. |
422 | * This means you have to be careful how you debug this function, or any | 422 | * This means you have to be careful how you debug this function, or any |
423 | * called function. (Do it by code inspection!) | 423 | * called function. This means you can't use any function or debugging |
424 | * method which may touch any device, otherwise the kernel _will_ crash. | ||
424 | */ | 425 | */ |
425 | static void __init devicemaps_init(struct machine_desc *mdesc) | 426 | static void __init devicemaps_init(struct machine_desc *mdesc) |
426 | { | 427 | { |
@@ -428,6 +429,12 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
428 | unsigned long addr; | 429 | unsigned long addr; |
429 | void *vectors; | 430 | void *vectors; |
430 | 431 | ||
432 | /* | ||
433 | * Allocate the vector page early. | ||
434 | */ | ||
435 | vectors = alloc_bootmem_low_pages(PAGE_SIZE); | ||
436 | BUG_ON(!vectors); | ||
437 | |||
431 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) | 438 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) |
432 | pmd_clear(pmd_off_k(addr)); | 439 | pmd_clear(pmd_off_k(addr)); |
433 | 440 | ||
@@ -461,12 +468,6 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
461 | create_mapping(&map); | 468 | create_mapping(&map); |
462 | #endif | 469 | #endif |
463 | 470 | ||
464 | flush_cache_all(); | ||
465 | local_flush_tlb_all(); | ||
466 | |||
467 | vectors = alloc_bootmem_low_pages(PAGE_SIZE); | ||
468 | BUG_ON(!vectors); | ||
469 | |||
470 | /* | 471 | /* |
471 | * Create a mapping for the machine vectors at the high-vectors | 472 | * Create a mapping for the machine vectors at the high-vectors |
472 | * location (0xffff0000). If we aren't using high-vectors, also | 473 | * location (0xffff0000). If we aren't using high-vectors, also |
@@ -491,12 +492,13 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
491 | mdesc->map_io(); | 492 | mdesc->map_io(); |
492 | 493 | ||
493 | /* | 494 | /* |
494 | * Finally flush the tlb again - this ensures that we're in a | 495 | * Finally flush the caches and tlb to ensure that we're in a |
495 | * consistent state wrt the writebuffer if the writebuffer needs | 496 | * consistent state wrt the writebuffer. This also ensures that |
496 | * draining. After this point, we can start to touch devices | 497 | * any write-allocated cache lines in the vector page are written |
497 | * again. | 498 | * back. After this point, we can start to touch devices again. |
498 | */ | 499 | */ |
499 | local_flush_tlb_all(); | 500 | local_flush_tlb_all(); |
501 | flush_cache_all(); | ||
500 | } | 502 | } |
501 | 503 | ||
502 | /* | 504 | /* |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 0f128c28fee4..10901398e4a2 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -130,8 +130,7 @@ remap_area_pages(unsigned long start, unsigned long phys_addr, | |||
130 | * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. | 130 | * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. |
131 | */ | 131 | */ |
132 | void __iomem * | 132 | void __iomem * |
133 | __ioremap(unsigned long phys_addr, size_t size, unsigned long flags, | 133 | __ioremap(unsigned long phys_addr, size_t size, unsigned long flags) |
134 | unsigned long align) | ||
135 | { | 134 | { |
136 | void * addr; | 135 | void * addr; |
137 | struct vm_struct * area; | 136 | struct vm_struct * area; |
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c index 35097c9bbf50..b8ccb0a95789 100644 --- a/drivers/mtd/maps/ipaq-flash.c +++ b/drivers/mtd/maps/ipaq-flash.c | |||
@@ -246,7 +246,7 @@ int __init ipaq_mtd_init(void) | |||
246 | ipaq_map[i].size = h3xxx_max_flash_size; | 246 | ipaq_map[i].size = h3xxx_max_flash_size; |
247 | ipaq_map[i].set_vpp = h3xxx_set_vpp; | 247 | ipaq_map[i].set_vpp = h3xxx_set_vpp; |
248 | ipaq_map[i].phys = cs_phys[i]; | 248 | ipaq_map[i].phys = cs_phys[i]; |
249 | ipaq_map[i].virt = __ioremap(cs_phys[i], 0x04000000, 0, 1); | 249 | ipaq_map[i].virt = ioremap(cs_phys[i], 0x04000000); |
250 | if (machine_is_h3100 () || machine_is_h1900()) | 250 | if (machine_is_h3100 () || machine_is_h1900()) |
251 | ipaq_map[i].bankwidth = 2; | 251 | ipaq_map[i].bankwidth = 2; |
252 | } | 252 | } |
@@ -280,7 +280,7 @@ int __init ipaq_mtd_init(void) | |||
280 | nb_parts = ARRAY_SIZE(jornada_partitions); | 280 | nb_parts = ARRAY_SIZE(jornada_partitions); |
281 | ipaq_map[0].size = jornada_max_flash_size; | 281 | ipaq_map[0].size = jornada_max_flash_size; |
282 | ipaq_map[0].set_vpp = jornada56x_set_vpp; | 282 | ipaq_map[0].set_vpp = jornada56x_set_vpp; |
283 | ipaq_map[0].virt = (__u32)__ioremap(0x0, 0x04000000, 0, 1); | 283 | ipaq_map[0].virt = (__u32)ioremap(0x0, 0x04000000); |
284 | } | 284 | } |
285 | #endif | 285 | #endif |
286 | #ifdef CONFIG_SA1100_JORNADA720 | 286 | #ifdef CONFIG_SA1100_JORNADA720 |
@@ -442,7 +442,7 @@ static int __init h1900_special_case(void) | |||
442 | ipaq_map[0].size = 0x80000; | 442 | ipaq_map[0].size = 0x80000; |
443 | ipaq_map[0].set_vpp = h3xxx_set_vpp; | 443 | ipaq_map[0].set_vpp = h3xxx_set_vpp; |
444 | ipaq_map[0].phys = 0x0; | 444 | ipaq_map[0].phys = 0x0; |
445 | ipaq_map[0].virt = __ioremap(0x0, 0x04000000, 0, 1); | 445 | ipaq_map[0].virt = ioremap(0x0, 0x04000000); |
446 | ipaq_map[0].bankwidth = 2; | 446 | ipaq_map[0].bankwidth = 2; |
447 | 447 | ||
448 | printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt); | 448 | printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt); |
diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c index 041e4b3358fb..f68f7a99a630 100644 --- a/drivers/mtd/nand/h1910.c +++ b/drivers/mtd/nand/h1910.c | |||
@@ -112,7 +112,7 @@ static int __init h1910_init (void) | |||
112 | if (!machine_is_h1900()) | 112 | if (!machine_is_h1900()) |
113 | return -ENODEV; | 113 | return -ENODEV; |
114 | 114 | ||
115 | nandaddr = __ioremap(0x08000000, 0x1000, 0, 1); | 115 | nandaddr = ioremap(0x08000000, 0x1000); |
116 | if (!nandaddr) { | 116 | if (!nandaddr) { |
117 | printk("Failed to ioremap nand flash.\n"); | 117 | printk("Failed to ioremap nand flash.\n"); |
118 | return -ENOMEM; | 118 | return -ENOMEM; |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 688f7f90d93e..942b622455bc 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -59,11 +59,10 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); | |||
59 | * fallback to the default. | 59 | * fallback to the default. |
60 | */ | 60 | */ |
61 | static inline void __iomem * | 61 | static inline void __iomem * |
62 | __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags, unsigned long align) | 62 | __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags) |
63 | { | 63 | { |
64 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long, unsigned long); | ||
65 | if((addr < 0x48000000) || (addr > 0x4fffffff)) | 64 | if((addr < 0x48000000) || (addr > 0x4fffffff)) |
66 | return __ioremap(addr, size, flags, align); | 65 | return __ioremap(addr, size, flags); |
67 | 66 | ||
68 | return (void *)addr; | 67 | return (void *)addr; |
69 | } | 68 | } |
@@ -71,13 +70,11 @@ __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags, unsigned | |||
71 | static inline void | 70 | static inline void |
72 | __ixp4xx_iounmap(void __iomem *addr) | 71 | __ixp4xx_iounmap(void __iomem *addr) |
73 | { | 72 | { |
74 | extern void __iounmap(void __iomem *addr); | ||
75 | |||
76 | if ((u32)addr >= VMALLOC_START) | 73 | if ((u32)addr >= VMALLOC_START) |
77 | __iounmap(addr); | 74 | __iounmap(addr); |
78 | } | 75 | } |
79 | 76 | ||
80 | #define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x) | 77 | #define __arch_ioremap(a, s, f) __ixp4xx_ioremap(a, s, f) |
81 | #define __arch_iounmap(a) __ixp4xx_iounmap(a) | 78 | #define __arch_iounmap(a) __ixp4xx_iounmap(a) |
82 | 79 | ||
83 | #define writeb(v, p) __ixp4xx_writeb(v, p) | 80 | #define writeb(v, p) __ixp4xx_writeb(v, p) |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 2e6799632f12..ae69db4a1010 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -55,6 +55,12 @@ extern void __raw_readsl(void __iomem *addr, void *data, int longlen); | |||
55 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a)) | 55 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a)) |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * Architecture ioremap implementation. | ||
59 | */ | ||
60 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); | ||
61 | extern void __iounmap(void __iomem *addr); | ||
62 | |||
63 | /* | ||
58 | * Bad read/write accesses... | 64 | * Bad read/write accesses... |
59 | */ | 65 | */ |
60 | extern void __readwrite_bug(const char *fn); | 66 | extern void __readwrite_bug(const char *fn); |
@@ -256,18 +262,15 @@ out: | |||
256 | * ioremap takes a PCI memory address, as specified in | 262 | * ioremap takes a PCI memory address, as specified in |
257 | * Documentation/IO-mapping.txt. | 263 | * Documentation/IO-mapping.txt. |
258 | */ | 264 | */ |
259 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long, unsigned long); | ||
260 | extern void __iounmap(void __iomem *addr); | ||
261 | |||
262 | #ifndef __arch_ioremap | 265 | #ifndef __arch_ioremap |
263 | #define ioremap(cookie,size) __ioremap(cookie,size,0,1) | 266 | #define ioremap(cookie,size) __ioremap(cookie,size,0) |
264 | #define ioremap_nocache(cookie,size) __ioremap(cookie,size,0,1) | 267 | #define ioremap_nocache(cookie,size) __ioremap(cookie,size,0) |
265 | #define ioremap_cached(cookie,size) __ioremap(cookie,size,L_PTE_CACHEABLE,1) | 268 | #define ioremap_cached(cookie,size) __ioremap(cookie,size,L_PTE_CACHEABLE) |
266 | #define iounmap(cookie) __iounmap(cookie) | 269 | #define iounmap(cookie) __iounmap(cookie) |
267 | #else | 270 | #else |
268 | #define ioremap(cookie,size) __arch_ioremap((cookie),(size),0,1) | 271 | #define ioremap(cookie,size) __arch_ioremap((cookie),(size),0) |
269 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie),(size),0,1) | 272 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie),(size),0) |
270 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie),(size),L_PTE_CACHEABLE,1) | 273 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie),(size),L_PTE_CACHEABLE) |
271 | #define iounmap(cookie) __arch_iounmap(cookie) | 274 | #define iounmap(cookie) __arch_iounmap(cookie) |
272 | #endif | 275 | #endif |
273 | 276 | ||
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index a2fdad0138b3..064f0f5e8e2b 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -100,7 +100,6 @@ static inline void set_fs (mm_segment_t fs) | |||
100 | extern int __get_user_1(void *); | 100 | extern int __get_user_1(void *); |
101 | extern int __get_user_2(void *); | 101 | extern int __get_user_2(void *); |
102 | extern int __get_user_4(void *); | 102 | extern int __get_user_4(void *); |
103 | extern int __get_user_8(void *); | ||
104 | extern int __get_user_bad(void); | 103 | extern int __get_user_bad(void); |
105 | 104 | ||
106 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ | 105 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ |
@@ -114,7 +113,7 @@ extern int __get_user_bad(void); | |||
114 | #define get_user(x,p) \ | 113 | #define get_user(x,p) \ |
115 | ({ \ | 114 | ({ \ |
116 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | 115 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ |
117 | register typeof(*(p)) __r2 asm("r2"); \ | 116 | register unsigned int __r2 asm("r2"); \ |
118 | register int __e asm("r0"); \ | 117 | register int __e asm("r0"); \ |
119 | switch (sizeof(*(__p))) { \ | 118 | switch (sizeof(*(__p))) { \ |
120 | case 1: \ | 119 | case 1: \ |
@@ -126,12 +125,9 @@ extern int __get_user_bad(void); | |||
126 | case 4: \ | 125 | case 4: \ |
127 | __get_user_x(__r2, __p, __e, 4, "lr"); \ | 126 | __get_user_x(__r2, __p, __e, 4, "lr"); \ |
128 | break; \ | 127 | break; \ |
129 | case 8: \ | ||
130 | __get_user_x(__r2, __p, __e, 8, "lr"); \ | ||
131 | break; \ | ||
132 | default: __e = __get_user_bad(); break; \ | 128 | default: __e = __get_user_bad(); break; \ |
133 | } \ | 129 | } \ |
134 | x = __r2; \ | 130 | x = (typeof(*(p))) __r2; \ |
135 | __e; \ | 131 | __e; \ |
136 | }) | 132 | }) |
137 | 133 | ||