diff options
Diffstat (limited to 'arch')
51 files changed, 203 insertions, 293 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 24626b0419ee..a48aecc17eac 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -754,7 +754,7 @@ config ARCH_SA1100 | |||
754 | select ARCH_HAS_CPUFREQ | 754 | select ARCH_HAS_CPUFREQ |
755 | select CPU_FREQ | 755 | select CPU_FREQ |
756 | select GENERIC_CLOCKEVENTS | 756 | select GENERIC_CLOCKEVENTS |
757 | select CLKDEV_LOOKUP | 757 | select HAVE_CLK |
758 | select HAVE_SCHED_CLOCK | 758 | select HAVE_SCHED_CLOCK |
759 | select TICK_ONESHOT | 759 | select TICK_ONESHOT |
760 | select ARCH_REQUIRE_GPIOLIB | 760 | select ARCH_REQUIRE_GPIOLIB |
@@ -825,7 +825,6 @@ config ARCH_S5PC100 | |||
825 | select HAVE_CLK | 825 | select HAVE_CLK |
826 | select CLKDEV_LOOKUP | 826 | select CLKDEV_LOOKUP |
827 | select CPU_V7 | 827 | select CPU_V7 |
828 | select ARM_L1_CACHE_SHIFT_6 | ||
829 | select ARCH_USES_GETTIMEOFFSET | 828 | select ARCH_USES_GETTIMEOFFSET |
830 | select HAVE_S3C2410_I2C if I2C | 829 | select HAVE_S3C2410_I2C if I2C |
831 | select HAVE_S3C_RTC if RTC_CLASS | 830 | select HAVE_S3C_RTC if RTC_CLASS |
@@ -842,7 +841,6 @@ config ARCH_S5PV210 | |||
842 | select HAVE_CLK | 841 | select HAVE_CLK |
843 | select CLKDEV_LOOKUP | 842 | select CLKDEV_LOOKUP |
844 | select CLKSRC_MMIO | 843 | select CLKSRC_MMIO |
845 | select ARM_L1_CACHE_SHIFT_6 | ||
846 | select ARCH_HAS_CPUFREQ | 844 | select ARCH_HAS_CPUFREQ |
847 | select GENERIC_CLOCKEVENTS | 845 | select GENERIC_CLOCKEVENTS |
848 | select HAVE_SCHED_CLOCK | 846 | select HAVE_SCHED_CLOCK |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index b2dc2dd7f1df..c47d6199b784 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/exception.h> | 43 | #include <asm/exception.h> |
44 | #include <asm/smp_plat.h> | ||
44 | #include <asm/mach/irq.h> | 45 | #include <asm/mach/irq.h> |
45 | #include <asm/hardware/gic.h> | 46 | #include <asm/hardware/gic.h> |
46 | 47 | ||
@@ -352,11 +353,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
352 | unsigned int gic_irqs = gic->gic_irqs; | 353 | unsigned int gic_irqs = gic->gic_irqs; |
353 | struct irq_domain *domain = &gic->domain; | 354 | struct irq_domain *domain = &gic->domain; |
354 | void __iomem *base = gic_data_dist_base(gic); | 355 | void __iomem *base = gic_data_dist_base(gic); |
355 | u32 cpu = 0; | 356 | u32 cpu = cpu_logical_map(smp_processor_id()); |
356 | |||
357 | #ifdef CONFIG_SMP | ||
358 | cpu = cpu_logical_map(smp_processor_id()); | ||
359 | #endif | ||
360 | 357 | ||
361 | cpumask = 1 << cpu; | 358 | cpumask = 1 << cpu; |
362 | cpumask |= cpumask << 8; | 359 | cpumask |= cpumask << 8; |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index b6e65dedfd71..62f8095d46de 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -237,7 +237,7 @@ | |||
237 | */ | 237 | */ |
238 | #ifdef CONFIG_THUMB2_KERNEL | 238 | #ifdef CONFIG_THUMB2_KERNEL |
239 | 239 | ||
240 | .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=T() | 240 | .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=TUSER() |
241 | 9999: | 241 | 9999: |
242 | .if \inc == 1 | 242 | .if \inc == 1 |
243 | \instr\cond\()b\()\t\().w \reg, [\ptr, #\off] | 243 | \instr\cond\()b\()\t\().w \reg, [\ptr, #\off] |
@@ -277,7 +277,7 @@ | |||
277 | 277 | ||
278 | #else /* !CONFIG_THUMB2_KERNEL */ | 278 | #else /* !CONFIG_THUMB2_KERNEL */ |
279 | 279 | ||
280 | .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=T() | 280 | .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=TUSER() |
281 | .rept \rept | 281 | .rept \rept |
282 | 9999: | 282 | 9999: |
283 | .if \inc == 1 | 283 | .if \inc == 1 |
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index af18ceaacf5d..b5dc173d336f 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h | |||
@@ -83,9 +83,9 @@ | |||
83 | * instructions (inline assembly) | 83 | * instructions (inline assembly) |
84 | */ | 84 | */ |
85 | #ifdef CONFIG_CPU_USE_DOMAINS | 85 | #ifdef CONFIG_CPU_USE_DOMAINS |
86 | #define T(instr) #instr "t" | 86 | #define TUSER(instr) #instr "t" |
87 | #else | 87 | #else |
88 | #define T(instr) #instr | 88 | #define TUSER(instr) #instr |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | #else /* __ASSEMBLY__ */ | 91 | #else /* __ASSEMBLY__ */ |
@@ -95,9 +95,9 @@ | |||
95 | * instructions | 95 | * instructions |
96 | */ | 96 | */ |
97 | #ifdef CONFIG_CPU_USE_DOMAINS | 97 | #ifdef CONFIG_CPU_USE_DOMAINS |
98 | #define T(instr) instr ## t | 98 | #define TUSER(instr) instr ## t |
99 | #else | 99 | #else |
100 | #define T(instr) instr | 100 | #define TUSER(instr) instr |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | #endif /* __ASSEMBLY__ */ | 103 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 253cc86318bf..7be54690aeec 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
@@ -75,9 +75,9 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
75 | 75 | ||
76 | #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ | 76 | #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ |
77 | __asm__ __volatile__( \ | 77 | __asm__ __volatile__( \ |
78 | "1: " T(ldr) " %1, [%3]\n" \ | 78 | "1: " TUSER(ldr) " %1, [%3]\n" \ |
79 | " " insn "\n" \ | 79 | " " insn "\n" \ |
80 | "2: " T(str) " %0, [%3]\n" \ | 80 | "2: " TUSER(str) " %0, [%3]\n" \ |
81 | " mov %0, #0\n" \ | 81 | " mov %0, #0\n" \ |
82 | __futex_atomic_ex_table("%5") \ | 82 | __futex_atomic_ex_table("%5") \ |
83 | : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ | 83 | : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ |
@@ -95,10 +95,10 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
95 | return -EFAULT; | 95 | return -EFAULT; |
96 | 96 | ||
97 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | 97 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" |
98 | "1: " T(ldr) " %1, [%4]\n" | 98 | "1: " TUSER(ldr) " %1, [%4]\n" |
99 | " teq %1, %2\n" | 99 | " teq %1, %2\n" |
100 | " it eq @ explicit IT needed for the 2b label\n" | 100 | " it eq @ explicit IT needed for the 2b label\n" |
101 | "2: " T(streq) " %3, [%4]\n" | 101 | "2: " TUSER(streq) " %3, [%4]\n" |
102 | __futex_atomic_ex_table("%5") | 102 | __futex_atomic_ex_table("%5") |
103 | : "+r" (ret), "=&r" (val) | 103 | : "+r" (ret), "=&r" (val) |
104 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | 104 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 1e5717afc4ac..ae29293270a3 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -71,12 +71,6 @@ extern void platform_secondary_init(unsigned int cpu); | |||
71 | extern void platform_smp_prepare_cpus(unsigned int); | 71 | extern void platform_smp_prepare_cpus(unsigned int); |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * Logical CPU mapping. | ||
75 | */ | ||
76 | extern int __cpu_logical_map[NR_CPUS]; | ||
77 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | ||
78 | |||
79 | /* | ||
80 | * Initial data for bringing up a secondary CPU. | 74 | * Initial data for bringing up a secondary CPU. |
81 | */ | 75 | */ |
82 | struct secondary_data { | 76 | struct secondary_data { |
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index f24c1b9e211d..558d6c80aca9 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -43,4 +43,10 @@ static inline int cache_ops_need_broadcast(void) | |||
43 | } | 43 | } |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* | ||
47 | * Logical CPU mapping. | ||
48 | */ | ||
49 | extern int __cpu_logical_map[]; | ||
50 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | ||
51 | |||
46 | #endif | 52 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index b293616a1a1a..2958976d867b 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -227,7 +227,7 @@ do { \ | |||
227 | 227 | ||
228 | #define __get_user_asm_byte(x,addr,err) \ | 228 | #define __get_user_asm_byte(x,addr,err) \ |
229 | __asm__ __volatile__( \ | 229 | __asm__ __volatile__( \ |
230 | "1: " T(ldrb) " %1,[%2],#0\n" \ | 230 | "1: " TUSER(ldrb) " %1,[%2],#0\n" \ |
231 | "2:\n" \ | 231 | "2:\n" \ |
232 | " .pushsection .fixup,\"ax\"\n" \ | 232 | " .pushsection .fixup,\"ax\"\n" \ |
233 | " .align 2\n" \ | 233 | " .align 2\n" \ |
@@ -263,7 +263,7 @@ do { \ | |||
263 | 263 | ||
264 | #define __get_user_asm_word(x,addr,err) \ | 264 | #define __get_user_asm_word(x,addr,err) \ |
265 | __asm__ __volatile__( \ | 265 | __asm__ __volatile__( \ |
266 | "1: " T(ldr) " %1,[%2],#0\n" \ | 266 | "1: " TUSER(ldr) " %1,[%2],#0\n" \ |
267 | "2:\n" \ | 267 | "2:\n" \ |
268 | " .pushsection .fixup,\"ax\"\n" \ | 268 | " .pushsection .fixup,\"ax\"\n" \ |
269 | " .align 2\n" \ | 269 | " .align 2\n" \ |
@@ -308,7 +308,7 @@ do { \ | |||
308 | 308 | ||
309 | #define __put_user_asm_byte(x,__pu_addr,err) \ | 309 | #define __put_user_asm_byte(x,__pu_addr,err) \ |
310 | __asm__ __volatile__( \ | 310 | __asm__ __volatile__( \ |
311 | "1: " T(strb) " %1,[%2],#0\n" \ | 311 | "1: " TUSER(strb) " %1,[%2],#0\n" \ |
312 | "2:\n" \ | 312 | "2:\n" \ |
313 | " .pushsection .fixup,\"ax\"\n" \ | 313 | " .pushsection .fixup,\"ax\"\n" \ |
314 | " .align 2\n" \ | 314 | " .align 2\n" \ |
@@ -341,7 +341,7 @@ do { \ | |||
341 | 341 | ||
342 | #define __put_user_asm_word(x,__pu_addr,err) \ | 342 | #define __put_user_asm_word(x,__pu_addr,err) \ |
343 | __asm__ __volatile__( \ | 343 | __asm__ __volatile__( \ |
344 | "1: " T(str) " %1,[%2],#0\n" \ | 344 | "1: " TUSER(str) " %1,[%2],#0\n" \ |
345 | "2:\n" \ | 345 | "2:\n" \ |
346 | " .pushsection .fixup,\"ax\"\n" \ | 346 | " .pushsection .fixup,\"ax\"\n" \ |
347 | " .align 2\n" \ | 347 | " .align 2\n" \ |
@@ -366,10 +366,10 @@ do { \ | |||
366 | 366 | ||
367 | #define __put_user_asm_dword(x,__pu_addr,err) \ | 367 | #define __put_user_asm_dword(x,__pu_addr,err) \ |
368 | __asm__ __volatile__( \ | 368 | __asm__ __volatile__( \ |
369 | ARM( "1: " T(str) " " __reg_oper1 ", [%1], #4\n" ) \ | 369 | ARM( "1: " TUSER(str) " " __reg_oper1 ", [%1], #4\n" ) \ |
370 | ARM( "2: " T(str) " " __reg_oper0 ", [%1]\n" ) \ | 370 | ARM( "2: " TUSER(str) " " __reg_oper0 ", [%1]\n" ) \ |
371 | THUMB( "1: " T(str) " " __reg_oper1 ", [%1]\n" ) \ | 371 | THUMB( "1: " TUSER(str) " " __reg_oper1 ", [%1]\n" ) \ |
372 | THUMB( "2: " T(str) " " __reg_oper0 ", [%1, #4]\n" ) \ | 372 | THUMB( "2: " TUSER(str) " " __reg_oper0 ", [%1, #4]\n" ) \ |
373 | "3:\n" \ | 373 | "3:\n" \ |
374 | " .pushsection .fixup,\"ax\"\n" \ | 374 | " .pushsection .fixup,\"ax\"\n" \ |
375 | " .align 2\n" \ | 375 | " .align 2\n" \ |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 520889cf1b5b..9fd0ba90c1d2 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -149,6 +149,11 @@ ENDPROC(ret_from_fork) | |||
149 | #endif | 149 | #endif |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | .macro mcount_adjust_addr rd, rn | ||
153 | bic \rd, \rn, #1 @ clear the Thumb bit if present | ||
154 | sub \rd, \rd, #MCOUNT_INSN_SIZE | ||
155 | .endm | ||
156 | |||
152 | .macro __mcount suffix | 157 | .macro __mcount suffix |
153 | mcount_enter | 158 | mcount_enter |
154 | ldr r0, =ftrace_trace_function | 159 | ldr r0, =ftrace_trace_function |
@@ -173,8 +178,7 @@ ENDPROC(ret_from_fork) | |||
173 | mcount_exit | 178 | mcount_exit |
174 | 179 | ||
175 | 1: mcount_get_lr r1 @ lr of instrumented func | 180 | 1: mcount_get_lr r1 @ lr of instrumented func |
176 | mov r0, lr @ instrumented function | 181 | mcount_adjust_addr r0, lr @ instrumented function |
177 | sub r0, r0, #MCOUNT_INSN_SIZE | ||
178 | adr lr, BSYM(2f) | 182 | adr lr, BSYM(2f) |
179 | mov pc, r2 | 183 | mov pc, r2 |
180 | 2: mcount_exit | 184 | 2: mcount_exit |
@@ -184,8 +188,7 @@ ENDPROC(ret_from_fork) | |||
184 | mcount_enter | 188 | mcount_enter |
185 | 189 | ||
186 | mcount_get_lr r1 @ lr of instrumented func | 190 | mcount_get_lr r1 @ lr of instrumented func |
187 | mov r0, lr @ instrumented function | 191 | mcount_adjust_addr r0, lr @ instrumented function |
188 | sub r0, r0, #MCOUNT_INSN_SIZE | ||
189 | 192 | ||
190 | .globl ftrace_call\suffix | 193 | .globl ftrace_call\suffix |
191 | ftrace_call\suffix: | 194 | ftrace_call\suffix: |
@@ -205,11 +208,11 @@ ftrace_graph_call\suffix: | |||
205 | #ifdef CONFIG_DYNAMIC_FTRACE | 208 | #ifdef CONFIG_DYNAMIC_FTRACE |
206 | @ called from __ftrace_caller, saved in mcount_enter | 209 | @ called from __ftrace_caller, saved in mcount_enter |
207 | ldr r1, [sp, #16] @ instrumented routine (func) | 210 | ldr r1, [sp, #16] @ instrumented routine (func) |
211 | mcount_adjust_addr r1, r1 | ||
208 | #else | 212 | #else |
209 | @ called from __mcount, untouched in lr | 213 | @ called from __mcount, untouched in lr |
210 | mov r1, lr @ instrumented routine (func) | 214 | mcount_adjust_addr r1, lr @ instrumented routine (func) |
211 | #endif | 215 | #endif |
212 | sub r1, r1, #MCOUNT_INSN_SIZE | ||
213 | mov r2, fp @ frame pointer | 216 | mov r2, fp @ frame pointer |
214 | bl prepare_ftrace_return | 217 | bl prepare_ftrace_return |
215 | mcount_exit | 218 | mcount_exit |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 129fbd55bde8..a255c39612ca 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
23 | #include <linux/of_fdt.h> | 23 | #include <linux/of_fdt.h> |
24 | #include <linux/crash_dump.h> | ||
25 | #include <linux/root_dev.h> | 24 | #include <linux/root_dev.h> |
26 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
27 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
@@ -160,7 +159,7 @@ static struct resource mem_res[] = { | |||
160 | .flags = IORESOURCE_MEM | 159 | .flags = IORESOURCE_MEM |
161 | }, | 160 | }, |
162 | { | 161 | { |
163 | .name = "Kernel text", | 162 | .name = "Kernel code", |
164 | .start = 0, | 163 | .start = 0, |
165 | .end = 0, | 164 | .end = 0, |
166 | .flags = IORESOURCE_MEM | 165 | .flags = IORESOURCE_MEM |
@@ -427,6 +426,20 @@ void cpu_init(void) | |||
427 | : "r14"); | 426 | : "r14"); |
428 | } | 427 | } |
429 | 428 | ||
429 | int __cpu_logical_map[NR_CPUS]; | ||
430 | |||
431 | void __init smp_setup_processor_id(void) | ||
432 | { | ||
433 | int i; | ||
434 | u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0; | ||
435 | |||
436 | cpu_logical_map(0) = cpu; | ||
437 | for (i = 1; i < NR_CPUS; ++i) | ||
438 | cpu_logical_map(i) = i == cpu ? 0 : i; | ||
439 | |||
440 | printk(KERN_INFO "Booting Linux on physical CPU %d\n", cpu); | ||
441 | } | ||
442 | |||
430 | static void __init setup_processor(void) | 443 | static void __init setup_processor(void) |
431 | { | 444 | { |
432 | struct proc_info_list *list; | 445 | struct proc_info_list *list; |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 57db122a4f62..cdeb727527d3 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -233,20 +233,6 @@ void __ref cpu_die(void) | |||
233 | } | 233 | } |
234 | #endif /* CONFIG_HOTPLUG_CPU */ | 234 | #endif /* CONFIG_HOTPLUG_CPU */ |
235 | 235 | ||
236 | int __cpu_logical_map[NR_CPUS]; | ||
237 | |||
238 | void __init smp_setup_processor_id(void) | ||
239 | { | ||
240 | int i; | ||
241 | u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0; | ||
242 | |||
243 | cpu_logical_map(0) = cpu; | ||
244 | for (i = 1; i < NR_CPUS; ++i) | ||
245 | cpu_logical_map(i) = i == cpu ? 0 : i; | ||
246 | |||
247 | printk(KERN_INFO "Booting Linux on physical CPU %d\n", cpu); | ||
248 | } | ||
249 | |||
250 | /* | 236 | /* |
251 | * Called by both boot and secondaries to move global data into | 237 | * Called by both boot and secondaries to move global data into |
252 | * per-processor storage. | 238 | * per-processor storage. |
@@ -443,9 +429,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent); | |||
443 | static void ipi_timer(void) | 429 | static void ipi_timer(void) |
444 | { | 430 | { |
445 | struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent); | 431 | struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent); |
446 | irq_enter(); | ||
447 | evt->event_handler(evt); | 432 | evt->event_handler(evt); |
448 | irq_exit(); | ||
449 | } | 433 | } |
450 | 434 | ||
451 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | 435 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST |
@@ -548,7 +532,9 @@ void handle_IPI(int ipinr, struct pt_regs *regs) | |||
548 | 532 | ||
549 | switch (ipinr) { | 533 | switch (ipinr) { |
550 | case IPI_TIMER: | 534 | case IPI_TIMER: |
535 | irq_enter(); | ||
551 | ipi_timer(); | 536 | ipi_timer(); |
537 | irq_exit(); | ||
552 | break; | 538 | break; |
553 | 539 | ||
554 | case IPI_RESCHEDULE: | 540 | case IPI_RESCHEDULE: |
@@ -556,15 +542,21 @@ void handle_IPI(int ipinr, struct pt_regs *regs) | |||
556 | break; | 542 | break; |
557 | 543 | ||
558 | case IPI_CALL_FUNC: | 544 | case IPI_CALL_FUNC: |
545 | irq_enter(); | ||
559 | generic_smp_call_function_interrupt(); | 546 | generic_smp_call_function_interrupt(); |
547 | irq_exit(); | ||
560 | break; | 548 | break; |
561 | 549 | ||
562 | case IPI_CALL_FUNC_SINGLE: | 550 | case IPI_CALL_FUNC_SINGLE: |
551 | irq_enter(); | ||
563 | generic_smp_call_function_single_interrupt(); | 552 | generic_smp_call_function_single_interrupt(); |
553 | irq_exit(); | ||
564 | break; | 554 | break; |
565 | 555 | ||
566 | case IPI_CPU_STOP: | 556 | case IPI_CPU_STOP: |
557 | irq_enter(); | ||
567 | ipi_cpu_stop(cpu); | 558 | ipi_cpu_stop(cpu); |
559 | irq_exit(); | ||
568 | break; | 560 | break; |
569 | 561 | ||
570 | default: | 562 | default: |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index c8e938553d47..4285daa077b0 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -252,6 +252,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
252 | else | 252 | else |
253 | twd_calibrate_rate(); | 253 | twd_calibrate_rate(); |
254 | 254 | ||
255 | __raw_writel(0, twd_base + TWD_TIMER_CONTROL); | ||
256 | |||
255 | clk->name = "local_timer"; | 257 | clk->name = "local_timer"; |
256 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | | 258 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | |
257 | CLOCK_EVT_FEAT_C3STOP; | 259 | CLOCK_EVT_FEAT_C3STOP; |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index f76e75548670..1e19691e0406 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <asm-generic/vmlinux.lds.h> | 6 | #include <asm-generic/vmlinux.lds.h> |
7 | #include <asm/cache.h> | ||
7 | #include <asm/thread_info.h> | 8 | #include <asm/thread_info.h> |
8 | #include <asm/memory.h> | 9 | #include <asm/memory.h> |
9 | #include <asm/page.h> | 10 | #include <asm/page.h> |
@@ -181,7 +182,7 @@ SECTIONS | |||
181 | } | 182 | } |
182 | #endif | 183 | #endif |
183 | 184 | ||
184 | PERCPU_SECTION(32) | 185 | PERCPU_SECTION(L1_CACHE_BYTES) |
185 | 186 | ||
186 | #ifdef CONFIG_XIP_KERNEL | 187 | #ifdef CONFIG_XIP_KERNEL |
187 | __data_loc = ALIGN(4); /* location in binary */ | 188 | __data_loc = ALIGN(4); /* location in binary */ |
@@ -212,13 +213,13 @@ SECTIONS | |||
212 | #endif | 213 | #endif |
213 | 214 | ||
214 | NOSAVE_DATA | 215 | NOSAVE_DATA |
215 | CACHELINE_ALIGNED_DATA(32) | 216 | CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) |
216 | READ_MOSTLY_DATA(32) | 217 | READ_MOSTLY_DATA(L1_CACHE_BYTES) |
217 | 218 | ||
218 | /* | 219 | /* |
219 | * The exception fixup table (might need resorting at runtime) | 220 | * The exception fixup table (might need resorting at runtime) |
220 | */ | 221 | */ |
221 | . = ALIGN(32); | 222 | . = ALIGN(4); |
222 | __start___ex_table = .; | 223 | __start___ex_table = .; |
223 | #ifdef CONFIG_MMU | 224 | #ifdef CONFIG_MMU |
224 | *(__ex_table) | 225 | *(__ex_table) |
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index 1b049cd7a49a..11093a7c3e32 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
@@ -31,18 +31,18 @@ | |||
31 | #include <asm/domain.h> | 31 | #include <asm/domain.h> |
32 | 32 | ||
33 | ENTRY(__get_user_1) | 33 | ENTRY(__get_user_1) |
34 | 1: T(ldrb) r2, [r0] | 34 | 1: TUSER(ldrb) r2, [r0] |
35 | mov r0, #0 | 35 | mov r0, #0 |
36 | mov pc, lr | 36 | mov pc, lr |
37 | ENDPROC(__get_user_1) | 37 | ENDPROC(__get_user_1) |
38 | 38 | ||
39 | ENTRY(__get_user_2) | 39 | ENTRY(__get_user_2) |
40 | #ifdef CONFIG_THUMB2_KERNEL | 40 | #ifdef CONFIG_THUMB2_KERNEL |
41 | 2: T(ldrb) r2, [r0] | 41 | 2: TUSER(ldrb) r2, [r0] |
42 | 3: T(ldrb) r3, [r0, #1] | 42 | 3: TUSER(ldrb) r3, [r0, #1] |
43 | #else | 43 | #else |
44 | 2: T(ldrb) r2, [r0], #1 | 44 | 2: TUSER(ldrb) r2, [r0], #1 |
45 | 3: T(ldrb) r3, [r0] | 45 | 3: TUSER(ldrb) r3, [r0] |
46 | #endif | 46 | #endif |
47 | #ifndef __ARMEB__ | 47 | #ifndef __ARMEB__ |
48 | orr r2, r2, r3, lsl #8 | 48 | orr r2, r2, r3, lsl #8 |
@@ -54,7 +54,7 @@ ENTRY(__get_user_2) | |||
54 | ENDPROC(__get_user_2) | 54 | ENDPROC(__get_user_2) |
55 | 55 | ||
56 | ENTRY(__get_user_4) | 56 | ENTRY(__get_user_4) |
57 | 4: T(ldr) r2, [r0] | 57 | 4: TUSER(ldr) r2, [r0] |
58 | mov r0, #0 | 58 | mov r0, #0 |
59 | mov pc, lr | 59 | mov pc, lr |
60 | ENDPROC(__get_user_4) | 60 | ENDPROC(__get_user_4) |
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S index c023fc11e86c..7db25990c589 100644 --- a/arch/arm/lib/putuser.S +++ b/arch/arm/lib/putuser.S | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/domain.h> | 31 | #include <asm/domain.h> |
32 | 32 | ||
33 | ENTRY(__put_user_1) | 33 | ENTRY(__put_user_1) |
34 | 1: T(strb) r2, [r0] | 34 | 1: TUSER(strb) r2, [r0] |
35 | mov r0, #0 | 35 | mov r0, #0 |
36 | mov pc, lr | 36 | mov pc, lr |
37 | ENDPROC(__put_user_1) | 37 | ENDPROC(__put_user_1) |
@@ -40,19 +40,19 @@ ENTRY(__put_user_2) | |||
40 | mov ip, r2, lsr #8 | 40 | mov ip, r2, lsr #8 |
41 | #ifdef CONFIG_THUMB2_KERNEL | 41 | #ifdef CONFIG_THUMB2_KERNEL |
42 | #ifndef __ARMEB__ | 42 | #ifndef __ARMEB__ |
43 | 2: T(strb) r2, [r0] | 43 | 2: TUSER(strb) r2, [r0] |
44 | 3: T(strb) ip, [r0, #1] | 44 | 3: TUSER(strb) ip, [r0, #1] |
45 | #else | 45 | #else |
46 | 2: T(strb) ip, [r0] | 46 | 2: TUSER(strb) ip, [r0] |
47 | 3: T(strb) r2, [r0, #1] | 47 | 3: TUSER(strb) r2, [r0, #1] |
48 | #endif | 48 | #endif |
49 | #else /* !CONFIG_THUMB2_KERNEL */ | 49 | #else /* !CONFIG_THUMB2_KERNEL */ |
50 | #ifndef __ARMEB__ | 50 | #ifndef __ARMEB__ |
51 | 2: T(strb) r2, [r0], #1 | 51 | 2: TUSER(strb) r2, [r0], #1 |
52 | 3: T(strb) ip, [r0] | 52 | 3: TUSER(strb) ip, [r0] |
53 | #else | 53 | #else |
54 | 2: T(strb) ip, [r0], #1 | 54 | 2: TUSER(strb) ip, [r0], #1 |
55 | 3: T(strb) r2, [r0] | 55 | 3: TUSER(strb) r2, [r0] |
56 | #endif | 56 | #endif |
57 | #endif /* CONFIG_THUMB2_KERNEL */ | 57 | #endif /* CONFIG_THUMB2_KERNEL */ |
58 | mov r0, #0 | 58 | mov r0, #0 |
@@ -60,18 +60,18 @@ ENTRY(__put_user_2) | |||
60 | ENDPROC(__put_user_2) | 60 | ENDPROC(__put_user_2) |
61 | 61 | ||
62 | ENTRY(__put_user_4) | 62 | ENTRY(__put_user_4) |
63 | 4: T(str) r2, [r0] | 63 | 4: TUSER(str) r2, [r0] |
64 | mov r0, #0 | 64 | mov r0, #0 |
65 | mov pc, lr | 65 | mov pc, lr |
66 | ENDPROC(__put_user_4) | 66 | ENDPROC(__put_user_4) |
67 | 67 | ||
68 | ENTRY(__put_user_8) | 68 | ENTRY(__put_user_8) |
69 | #ifdef CONFIG_THUMB2_KERNEL | 69 | #ifdef CONFIG_THUMB2_KERNEL |
70 | 5: T(str) r2, [r0] | 70 | 5: TUSER(str) r2, [r0] |
71 | 6: T(str) r3, [r0, #4] | 71 | 6: TUSER(str) r3, [r0, #4] |
72 | #else | 72 | #else |
73 | 5: T(str) r2, [r0], #4 | 73 | 5: TUSER(str) r2, [r0], #4 |
74 | 6: T(str) r3, [r0] | 74 | 6: TUSER(str) r3, [r0] |
75 | #endif | 75 | #endif |
76 | mov r0, #0 | 76 | mov r0, #0 |
77 | mov pc, lr | 77 | mov pc, lr |
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S index d0ece2aeb70d..5c908b1cb8ed 100644 --- a/arch/arm/lib/uaccess.S +++ b/arch/arm/lib/uaccess.S | |||
@@ -32,11 +32,11 @@ | |||
32 | rsb ip, ip, #4 | 32 | rsb ip, ip, #4 |
33 | cmp ip, #2 | 33 | cmp ip, #2 |
34 | ldrb r3, [r1], #1 | 34 | ldrb r3, [r1], #1 |
35 | USER( T(strb) r3, [r0], #1) @ May fault | 35 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
36 | ldrgeb r3, [r1], #1 | 36 | ldrgeb r3, [r1], #1 |
37 | USER( T(strgeb) r3, [r0], #1) @ May fault | 37 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
38 | ldrgtb r3, [r1], #1 | 38 | ldrgtb r3, [r1], #1 |
39 | USER( T(strgtb) r3, [r0], #1) @ May fault | 39 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault |
40 | sub r2, r2, ip | 40 | sub r2, r2, ip |
41 | b .Lc2u_dest_aligned | 41 | b .Lc2u_dest_aligned |
42 | 42 | ||
@@ -59,7 +59,7 @@ ENTRY(__copy_to_user) | |||
59 | addmi ip, r2, #4 | 59 | addmi ip, r2, #4 |
60 | bmi .Lc2u_0nowords | 60 | bmi .Lc2u_0nowords |
61 | ldr r3, [r1], #4 | 61 | ldr r3, [r1], #4 |
62 | USER( T(str) r3, [r0], #4) @ May fault | 62 | USER( TUSER( str) r3, [r0], #4) @ May fault |
63 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | 63 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction |
64 | rsb ip, ip, #0 | 64 | rsb ip, ip, #0 |
65 | movs ip, ip, lsr #32 - PAGE_SHIFT | 65 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -88,18 +88,18 @@ USER( T(str) r3, [r0], #4) @ May fault | |||
88 | stmneia r0!, {r3 - r4} @ Shouldnt fault | 88 | stmneia r0!, {r3 - r4} @ Shouldnt fault |
89 | tst ip, #4 | 89 | tst ip, #4 |
90 | ldrne r3, [r1], #4 | 90 | ldrne r3, [r1], #4 |
91 | T(strne) r3, [r0], #4 @ Shouldnt fault | 91 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault |
92 | ands ip, ip, #3 | 92 | ands ip, ip, #3 |
93 | beq .Lc2u_0fupi | 93 | beq .Lc2u_0fupi |
94 | .Lc2u_0nowords: teq ip, #0 | 94 | .Lc2u_0nowords: teq ip, #0 |
95 | beq .Lc2u_finished | 95 | beq .Lc2u_finished |
96 | .Lc2u_nowords: cmp ip, #2 | 96 | .Lc2u_nowords: cmp ip, #2 |
97 | ldrb r3, [r1], #1 | 97 | ldrb r3, [r1], #1 |
98 | USER( T(strb) r3, [r0], #1) @ May fault | 98 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
99 | ldrgeb r3, [r1], #1 | 99 | ldrgeb r3, [r1], #1 |
100 | USER( T(strgeb) r3, [r0], #1) @ May fault | 100 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
101 | ldrgtb r3, [r1], #1 | 101 | ldrgtb r3, [r1], #1 |
102 | USER( T(strgtb) r3, [r0], #1) @ May fault | 102 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault |
103 | b .Lc2u_finished | 103 | b .Lc2u_finished |
104 | 104 | ||
105 | .Lc2u_not_enough: | 105 | .Lc2u_not_enough: |
@@ -120,7 +120,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault | |||
120 | mov r3, r7, pull #8 | 120 | mov r3, r7, pull #8 |
121 | ldr r7, [r1], #4 | 121 | ldr r7, [r1], #4 |
122 | orr r3, r3, r7, push #24 | 122 | orr r3, r3, r7, push #24 |
123 | USER( T(str) r3, [r0], #4) @ May fault | 123 | USER( TUSER( str) r3, [r0], #4) @ May fault |
124 | mov ip, r0, lsl #32 - PAGE_SHIFT | 124 | mov ip, r0, lsl #32 - PAGE_SHIFT |
125 | rsb ip, ip, #0 | 125 | rsb ip, ip, #0 |
126 | movs ip, ip, lsr #32 - PAGE_SHIFT | 126 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -155,18 +155,18 @@ USER( T(str) r3, [r0], #4) @ May fault | |||
155 | movne r3, r7, pull #8 | 155 | movne r3, r7, pull #8 |
156 | ldrne r7, [r1], #4 | 156 | ldrne r7, [r1], #4 |
157 | orrne r3, r3, r7, push #24 | 157 | orrne r3, r3, r7, push #24 |
158 | T(strne) r3, [r0], #4 @ Shouldnt fault | 158 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault |
159 | ands ip, ip, #3 | 159 | ands ip, ip, #3 |
160 | beq .Lc2u_1fupi | 160 | beq .Lc2u_1fupi |
161 | .Lc2u_1nowords: mov r3, r7, get_byte_1 | 161 | .Lc2u_1nowords: mov r3, r7, get_byte_1 |
162 | teq ip, #0 | 162 | teq ip, #0 |
163 | beq .Lc2u_finished | 163 | beq .Lc2u_finished |
164 | cmp ip, #2 | 164 | cmp ip, #2 |
165 | USER( T(strb) r3, [r0], #1) @ May fault | 165 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
166 | movge r3, r7, get_byte_2 | 166 | movge r3, r7, get_byte_2 |
167 | USER( T(strgeb) r3, [r0], #1) @ May fault | 167 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
168 | movgt r3, r7, get_byte_3 | 168 | movgt r3, r7, get_byte_3 |
169 | USER( T(strgtb) r3, [r0], #1) @ May fault | 169 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault |
170 | b .Lc2u_finished | 170 | b .Lc2u_finished |
171 | 171 | ||
172 | .Lc2u_2fupi: subs r2, r2, #4 | 172 | .Lc2u_2fupi: subs r2, r2, #4 |
@@ -175,7 +175,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault | |||
175 | mov r3, r7, pull #16 | 175 | mov r3, r7, pull #16 |
176 | ldr r7, [r1], #4 | 176 | ldr r7, [r1], #4 |
177 | orr r3, r3, r7, push #16 | 177 | orr r3, r3, r7, push #16 |
178 | USER( T(str) r3, [r0], #4) @ May fault | 178 | USER( TUSER( str) r3, [r0], #4) @ May fault |
179 | mov ip, r0, lsl #32 - PAGE_SHIFT | 179 | mov ip, r0, lsl #32 - PAGE_SHIFT |
180 | rsb ip, ip, #0 | 180 | rsb ip, ip, #0 |
181 | movs ip, ip, lsr #32 - PAGE_SHIFT | 181 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -210,18 +210,18 @@ USER( T(str) r3, [r0], #4) @ May fault | |||
210 | movne r3, r7, pull #16 | 210 | movne r3, r7, pull #16 |
211 | ldrne r7, [r1], #4 | 211 | ldrne r7, [r1], #4 |
212 | orrne r3, r3, r7, push #16 | 212 | orrne r3, r3, r7, push #16 |
213 | T(strne) r3, [r0], #4 @ Shouldnt fault | 213 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault |
214 | ands ip, ip, #3 | 214 | ands ip, ip, #3 |
215 | beq .Lc2u_2fupi | 215 | beq .Lc2u_2fupi |
216 | .Lc2u_2nowords: mov r3, r7, get_byte_2 | 216 | .Lc2u_2nowords: mov r3, r7, get_byte_2 |
217 | teq ip, #0 | 217 | teq ip, #0 |
218 | beq .Lc2u_finished | 218 | beq .Lc2u_finished |
219 | cmp ip, #2 | 219 | cmp ip, #2 |
220 | USER( T(strb) r3, [r0], #1) @ May fault | 220 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
221 | movge r3, r7, get_byte_3 | 221 | movge r3, r7, get_byte_3 |
222 | USER( T(strgeb) r3, [r0], #1) @ May fault | 222 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
223 | ldrgtb r3, [r1], #0 | 223 | ldrgtb r3, [r1], #0 |
224 | USER( T(strgtb) r3, [r0], #1) @ May fault | 224 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault |
225 | b .Lc2u_finished | 225 | b .Lc2u_finished |
226 | 226 | ||
227 | .Lc2u_3fupi: subs r2, r2, #4 | 227 | .Lc2u_3fupi: subs r2, r2, #4 |
@@ -230,7 +230,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault | |||
230 | mov r3, r7, pull #24 | 230 | mov r3, r7, pull #24 |
231 | ldr r7, [r1], #4 | 231 | ldr r7, [r1], #4 |
232 | orr r3, r3, r7, push #8 | 232 | orr r3, r3, r7, push #8 |
233 | USER( T(str) r3, [r0], #4) @ May fault | 233 | USER( TUSER( str) r3, [r0], #4) @ May fault |
234 | mov ip, r0, lsl #32 - PAGE_SHIFT | 234 | mov ip, r0, lsl #32 - PAGE_SHIFT |
235 | rsb ip, ip, #0 | 235 | rsb ip, ip, #0 |
236 | movs ip, ip, lsr #32 - PAGE_SHIFT | 236 | movs ip, ip, lsr #32 - PAGE_SHIFT |
@@ -265,18 +265,18 @@ USER( T(str) r3, [r0], #4) @ May fault | |||
265 | movne r3, r7, pull #24 | 265 | movne r3, r7, pull #24 |
266 | ldrne r7, [r1], #4 | 266 | ldrne r7, [r1], #4 |
267 | orrne r3, r3, r7, push #8 | 267 | orrne r3, r3, r7, push #8 |
268 | T(strne) r3, [r0], #4 @ Shouldnt fault | 268 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault |
269 | ands ip, ip, #3 | 269 | ands ip, ip, #3 |
270 | beq .Lc2u_3fupi | 270 | beq .Lc2u_3fupi |
271 | .Lc2u_3nowords: mov r3, r7, get_byte_3 | 271 | .Lc2u_3nowords: mov r3, r7, get_byte_3 |
272 | teq ip, #0 | 272 | teq ip, #0 |
273 | beq .Lc2u_finished | 273 | beq .Lc2u_finished |
274 | cmp ip, #2 | 274 | cmp ip, #2 |
275 | USER( T(strb) r3, [r0], #1) @ May fault | 275 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
276 | ldrgeb r3, [r1], #1 | 276 | ldrgeb r3, [r1], #1 |
277 | USER( T(strgeb) r3, [r0], #1) @ May fault | 277 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
278 | ldrgtb r3, [r1], #0 | 278 | ldrgtb r3, [r1], #0 |
279 | USER( T(strgtb) r3, [r0], #1) @ May fault | 279 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault |
280 | b .Lc2u_finished | 280 | b .Lc2u_finished |
281 | ENDPROC(__copy_to_user) | 281 | ENDPROC(__copy_to_user) |
282 | 282 | ||
@@ -295,11 +295,11 @@ ENDPROC(__copy_to_user) | |||
295 | .Lcfu_dest_not_aligned: | 295 | .Lcfu_dest_not_aligned: |
296 | rsb ip, ip, #4 | 296 | rsb ip, ip, #4 |
297 | cmp ip, #2 | 297 | cmp ip, #2 |
298 | USER( T(ldrb) r3, [r1], #1) @ May fault | 298 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault |
299 | strb r3, [r0], #1 | 299 | strb r3, [r0], #1 |
300 | USER( T(ldrgeb) r3, [r1], #1) @ May fault | 300 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault |
301 | strgeb r3, [r0], #1 | 301 | strgeb r3, [r0], #1 |
302 | USER( T(ldrgtb) r3, [r1], #1) @ May fault | 302 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault |
303 | strgtb r3, [r0], #1 | 303 | strgtb r3, [r0], #1 |
304 | sub r2, r2, ip | 304 | sub r2, r2, ip |
305 | b .Lcfu_dest_aligned | 305 | b .Lcfu_dest_aligned |
@@ -322,7 +322,7 @@ ENTRY(__copy_from_user) | |||
322 | .Lcfu_0fupi: subs r2, r2, #4 | 322 | .Lcfu_0fupi: subs r2, r2, #4 |
323 | addmi ip, r2, #4 | 323 | addmi ip, r2, #4 |
324 | bmi .Lcfu_0nowords | 324 | bmi .Lcfu_0nowords |
325 | USER( T(ldr) r3, [r1], #4) | 325 | USER( TUSER( ldr) r3, [r1], #4) |
326 | str r3, [r0], #4 | 326 | str r3, [r0], #4 |
327 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | 327 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction |
328 | rsb ip, ip, #0 | 328 | rsb ip, ip, #0 |
@@ -351,18 +351,18 @@ USER( T(ldr) r3, [r1], #4) | |||
351 | ldmneia r1!, {r3 - r4} @ Shouldnt fault | 351 | ldmneia r1!, {r3 - r4} @ Shouldnt fault |
352 | stmneia r0!, {r3 - r4} | 352 | stmneia r0!, {r3 - r4} |
353 | tst ip, #4 | 353 | tst ip, #4 |
354 | T(ldrne) r3, [r1], #4 @ Shouldnt fault | 354 | TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault |
355 | strne r3, [r0], #4 | 355 | strne r3, [r0], #4 |
356 | ands ip, ip, #3 | 356 | ands ip, ip, #3 |
357 | beq .Lcfu_0fupi | 357 | beq .Lcfu_0fupi |
358 | .Lcfu_0nowords: teq ip, #0 | 358 | .Lcfu_0nowords: teq ip, #0 |
359 | beq .Lcfu_finished | 359 | beq .Lcfu_finished |
360 | .Lcfu_nowords: cmp ip, #2 | 360 | .Lcfu_nowords: cmp ip, #2 |
361 | USER( T(ldrb) r3, [r1], #1) @ May fault | 361 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault |
362 | strb r3, [r0], #1 | 362 | strb r3, [r0], #1 |
363 | USER( T(ldrgeb) r3, [r1], #1) @ May fault | 363 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault |
364 | strgeb r3, [r0], #1 | 364 | strgeb r3, [r0], #1 |
365 | USER( T(ldrgtb) r3, [r1], #1) @ May fault | 365 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault |
366 | strgtb r3, [r0], #1 | 366 | strgtb r3, [r0], #1 |
367 | b .Lcfu_finished | 367 | b .Lcfu_finished |
368 | 368 | ||
@@ -375,7 +375,7 @@ USER( T(ldrgtb) r3, [r1], #1) @ May fault | |||
375 | 375 | ||
376 | .Lcfu_src_not_aligned: | 376 | .Lcfu_src_not_aligned: |
377 | bic r1, r1, #3 | 377 | bic r1, r1, #3 |
378 | USER( T(ldr) r7, [r1], #4) @ May fault | 378 | USER( TUSER( ldr) r7, [r1], #4) @ May fault |
379 | cmp ip, #2 | 379 | cmp ip, #2 |
380 | bgt .Lcfu_3fupi | 380 | bgt .Lcfu_3fupi |
381 | beq .Lcfu_2fupi | 381 | beq .Lcfu_2fupi |
@@ -383,7 +383,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault | |||
383 | addmi ip, r2, #4 | 383 | addmi ip, r2, #4 |
384 | bmi .Lcfu_1nowords | 384 | bmi .Lcfu_1nowords |
385 | mov r3, r7, pull #8 | 385 | mov r3, r7, pull #8 |
386 | USER( T(ldr) r7, [r1], #4) @ May fault | 386 | USER( TUSER( ldr) r7, [r1], #4) @ May fault |
387 | orr r3, r3, r7, push #24 | 387 | orr r3, r3, r7, push #24 |
388 | str r3, [r0], #4 | 388 | str r3, [r0], #4 |
389 | mov ip, r1, lsl #32 - PAGE_SHIFT | 389 | mov ip, r1, lsl #32 - PAGE_SHIFT |
@@ -418,7 +418,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault | |||
418 | stmneia r0!, {r3 - r4} | 418 | stmneia r0!, {r3 - r4} |
419 | tst ip, #4 | 419 | tst ip, #4 |
420 | movne r3, r7, pull #8 | 420 | movne r3, r7, pull #8 |
421 | USER( T(ldrne) r7, [r1], #4) @ May fault | 421 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault |
422 | orrne r3, r3, r7, push #24 | 422 | orrne r3, r3, r7, push #24 |
423 | strne r3, [r0], #4 | 423 | strne r3, [r0], #4 |
424 | ands ip, ip, #3 | 424 | ands ip, ip, #3 |
@@ -438,7 +438,7 @@ USER( T(ldrne) r7, [r1], #4) @ May fault | |||
438 | addmi ip, r2, #4 | 438 | addmi ip, r2, #4 |
439 | bmi .Lcfu_2nowords | 439 | bmi .Lcfu_2nowords |
440 | mov r3, r7, pull #16 | 440 | mov r3, r7, pull #16 |
441 | USER( T(ldr) r7, [r1], #4) @ May fault | 441 | USER( TUSER( ldr) r7, [r1], #4) @ May fault |
442 | orr r3, r3, r7, push #16 | 442 | orr r3, r3, r7, push #16 |
443 | str r3, [r0], #4 | 443 | str r3, [r0], #4 |
444 | mov ip, r1, lsl #32 - PAGE_SHIFT | 444 | mov ip, r1, lsl #32 - PAGE_SHIFT |
@@ -474,7 +474,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault | |||
474 | stmneia r0!, {r3 - r4} | 474 | stmneia r0!, {r3 - r4} |
475 | tst ip, #4 | 475 | tst ip, #4 |
476 | movne r3, r7, pull #16 | 476 | movne r3, r7, pull #16 |
477 | USER( T(ldrne) r7, [r1], #4) @ May fault | 477 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault |
478 | orrne r3, r3, r7, push #16 | 478 | orrne r3, r3, r7, push #16 |
479 | strne r3, [r0], #4 | 479 | strne r3, [r0], #4 |
480 | ands ip, ip, #3 | 480 | ands ip, ip, #3 |
@@ -486,7 +486,7 @@ USER( T(ldrne) r7, [r1], #4) @ May fault | |||
486 | strb r3, [r0], #1 | 486 | strb r3, [r0], #1 |
487 | movge r3, r7, get_byte_3 | 487 | movge r3, r7, get_byte_3 |
488 | strgeb r3, [r0], #1 | 488 | strgeb r3, [r0], #1 |
489 | USER( T(ldrgtb) r3, [r1], #0) @ May fault | 489 | USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault |
490 | strgtb r3, [r0], #1 | 490 | strgtb r3, [r0], #1 |
491 | b .Lcfu_finished | 491 | b .Lcfu_finished |
492 | 492 | ||
@@ -494,7 +494,7 @@ USER( T(ldrgtb) r3, [r1], #0) @ May fault | |||
494 | addmi ip, r2, #4 | 494 | addmi ip, r2, #4 |
495 | bmi .Lcfu_3nowords | 495 | bmi .Lcfu_3nowords |
496 | mov r3, r7, pull #24 | 496 | mov r3, r7, pull #24 |
497 | USER( T(ldr) r7, [r1], #4) @ May fault | 497 | USER( TUSER( ldr) r7, [r1], #4) @ May fault |
498 | orr r3, r3, r7, push #8 | 498 | orr r3, r3, r7, push #8 |
499 | str r3, [r0], #4 | 499 | str r3, [r0], #4 |
500 | mov ip, r1, lsl #32 - PAGE_SHIFT | 500 | mov ip, r1, lsl #32 - PAGE_SHIFT |
@@ -529,7 +529,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault | |||
529 | stmneia r0!, {r3 - r4} | 529 | stmneia r0!, {r3 - r4} |
530 | tst ip, #4 | 530 | tst ip, #4 |
531 | movne r3, r7, pull #24 | 531 | movne r3, r7, pull #24 |
532 | USER( T(ldrne) r7, [r1], #4) @ May fault | 532 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault |
533 | orrne r3, r3, r7, push #8 | 533 | orrne r3, r3, r7, push #8 |
534 | strne r3, [r0], #4 | 534 | strne r3, [r0], #4 |
535 | ands ip, ip, #3 | 535 | ands ip, ip, #3 |
@@ -539,9 +539,9 @@ USER( T(ldrne) r7, [r1], #4) @ May fault | |||
539 | beq .Lcfu_finished | 539 | beq .Lcfu_finished |
540 | cmp ip, #2 | 540 | cmp ip, #2 |
541 | strb r3, [r0], #1 | 541 | strb r3, [r0], #1 |
542 | USER( T(ldrgeb) r3, [r1], #1) @ May fault | 542 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault |
543 | strgeb r3, [r0], #1 | 543 | strgeb r3, [r0], #1 |
544 | USER( T(ldrgtb) r3, [r1], #1) @ May fault | 544 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault |
545 | strgtb r3, [r0], #1 | 545 | strgtb r3, [r0], #1 |
546 | b .Lcfu_finished | 546 | b .Lcfu_finished |
547 | ENDPROC(__copy_from_user) | 547 | ENDPROC(__copy_from_user) |
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index da70e7e39937..dd1ad55524c9 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/smp_plat.h> | ||
19 | 20 | ||
20 | #include <mach/regs-pmu.h> | 21 | #include <mach/regs-pmu.h> |
21 | 22 | ||
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 683aec786b78..0f2035a1eb6e 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
25 | #include <asm/hardware/gic.h> | 25 | #include <asm/hardware/gic.h> |
26 | #include <asm/smp_plat.h> | ||
26 | #include <asm/smp_scu.h> | 27 | #include <asm/smp_scu.h> |
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 7afbe1e55beb..8394d512a402 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | 26 | ||
27 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
28 | #include <asm/smp_plat.h> | ||
28 | #include <asm/smp_scu.h> | 29 | #include <asm/smp_scu.h> |
29 | #include <asm/hardware/arm_timer.h> | 30 | #include <asm/hardware/arm_timer.h> |
30 | #include <asm/hardware/timer-sp.h> | 31 | #include <asm/hardware/timer-sp.h> |
@@ -72,9 +73,7 @@ static void __init highbank_map_io(void) | |||
72 | 73 | ||
73 | void highbank_set_cpu_jump(int cpu, void *jump_addr) | 74 | void highbank_set_cpu_jump(int cpu, void *jump_addr) |
74 | { | 75 | { |
75 | #ifdef CONFIG_SMP | ||
76 | cpu = cpu_logical_map(cpu); | 76 | cpu = cpu_logical_map(cpu); |
77 | #endif | ||
78 | writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu)); | 77 | writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu)); |
79 | __cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16); | 78 | __cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16); |
80 | outer_clean_range(HB_JUMP_TABLE_PHYS(cpu), | 79 | outer_clean_range(HB_JUMP_TABLE_PHYS(cpu), |
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index 29bd1243781e..e15f1555c59b 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_address.h> | 16 | #include <linux/of_address.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <asm/smp_plat.h> | ||
18 | 19 | ||
19 | #define SRC_SCR 0x000 | 20 | #define SRC_SCR 0x000 |
20 | #define SRC_GPR1 0x020 | 21 | #define SRC_GPR1 0x020 |
@@ -24,10 +25,6 @@ | |||
24 | 25 | ||
25 | static void __iomem *src_base; | 26 | static void __iomem *src_base; |
26 | 27 | ||
27 | #ifndef CONFIG_SMP | ||
28 | #define cpu_logical_map(cpu) 0 | ||
29 | #endif | ||
30 | |||
31 | void imx_enable_cpu(int cpu, bool enable) | 28 | void imx_enable_cpu(int cpu, bool enable) |
32 | { | 29 | { |
33 | u32 mask, val; | 30 | u32 mask, val; |
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c index 41c252de0215..a446fc14221f 100644 --- a/arch/arm/mach-msm/hotplug.c +++ b/arch/arm/mach-msm/hotplug.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
12 | 12 | ||
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/smp_plat.h> | ||
14 | 15 | ||
15 | extern volatile int pen_release; | 16 | extern volatile int pen_release; |
16 | 17 | ||
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 0b3e357c4c8c..db0117ec55f4 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
21 | #include <asm/cputype.h> | 21 | #include <asm/cputype.h> |
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/smp_plat.h> | ||
23 | 24 | ||
24 | #include <mach/msm_iomap.h> | 25 | #include <mach/msm_iomap.h> |
25 | 26 | ||
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index af0c212e3c7b..9cf4c3c1914d 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -15,7 +15,6 @@ config ARCH_MX53 | |||
15 | config SOC_IMX50 | 15 | config SOC_IMX50 |
16 | bool | 16 | bool |
17 | select CPU_V7 | 17 | select CPU_V7 |
18 | select ARM_L1_CACHE_SHIFT_6 | ||
19 | select MXC_TZIC | 18 | select MXC_TZIC |
20 | select ARCH_MXC_IOMUX_V3 | 19 | select ARCH_MXC_IOMUX_V3 |
21 | select ARCH_MXC_AUDMUX_V2 | 20 | select ARCH_MXC_AUDMUX_V2 |
@@ -25,7 +24,6 @@ config SOC_IMX50 | |||
25 | config SOC_IMX51 | 24 | config SOC_IMX51 |
26 | bool | 25 | bool |
27 | select CPU_V7 | 26 | select CPU_V7 |
28 | select ARM_L1_CACHE_SHIFT_6 | ||
29 | select MXC_TZIC | 27 | select MXC_TZIC |
30 | select ARCH_MXC_IOMUX_V3 | 28 | select ARCH_MXC_IOMUX_V3 |
31 | select ARCH_MXC_AUDMUX_V2 | 29 | select ARCH_MXC_AUDMUX_V2 |
@@ -35,7 +33,6 @@ config SOC_IMX51 | |||
35 | config SOC_IMX53 | 33 | config SOC_IMX53 |
36 | bool | 34 | bool |
37 | select CPU_V7 | 35 | select CPU_V7 |
38 | select ARM_L1_CACHE_SHIFT_6 | ||
39 | select MXC_TZIC | 36 | select MXC_TZIC |
40 | select ARCH_MXC_IOMUX_V3 | 37 | select ARCH_MXC_IOMUX_V3 |
41 | select ARCH_MX53 | 38 | select ARCH_MX53 |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index a8ba7b96dcd1..41e6612ecbaf 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -33,7 +33,6 @@ config ARCH_OMAP3 | |||
33 | default y | 33 | default y |
34 | select CPU_V7 | 34 | select CPU_V7 |
35 | select USB_ARCH_HAS_EHCI | 35 | select USB_ARCH_HAS_EHCI |
36 | select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 | ||
37 | select ARCH_HAS_OPP | 36 | select ARCH_HAS_OPP |
38 | select PM_OPP if PM | 37 | select PM_OPP if PM |
39 | select ARM_CPU_SUSPEND if PM | 38 | select ARM_CPU_SUSPEND if PM |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 18fd177073f4..5bc13121eac5 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -415,29 +415,9 @@ static struct resource pxa_rtc_resources[] = { | |||
415 | }, | 415 | }, |
416 | }; | 416 | }; |
417 | 417 | ||
418 | static struct resource sa1100_rtc_resources[] = { | ||
419 | [0] = { | ||
420 | .start = 0x40900000, | ||
421 | .end = 0x409000ff, | ||
422 | .flags = IORESOURCE_MEM, | ||
423 | }, | ||
424 | [1] = { | ||
425 | .start = IRQ_RTC1Hz, | ||
426 | .end = IRQ_RTC1Hz, | ||
427 | .flags = IORESOURCE_IRQ, | ||
428 | }, | ||
429 | [2] = { | ||
430 | .start = IRQ_RTCAlrm, | ||
431 | .end = IRQ_RTCAlrm, | ||
432 | .flags = IORESOURCE_IRQ, | ||
433 | }, | ||
434 | }; | ||
435 | |||
436 | struct platform_device sa1100_device_rtc = { | 418 | struct platform_device sa1100_device_rtc = { |
437 | .name = "sa1100-rtc", | 419 | .name = "sa1100-rtc", |
438 | .id = -1, | 420 | .id = -1, |
439 | .num_resources = ARRAY_SIZE(sa1100_rtc_resources), | ||
440 | .resource = sa1100_rtc_resources, | ||
441 | }; | 421 | }; |
442 | 422 | ||
443 | struct platform_device pxa_device_rtc = { | 423 | struct platform_device pxa_device_rtc = { |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index adf058fa97ee..91e4f6c03766 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -209,8 +209,6 @@ static struct clk_lookup pxa25x_clkregs[] = { | |||
209 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), | 209 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), |
210 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), | 210 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), |
211 | INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), | 211 | INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), |
212 | INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), | ||
213 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
214 | }; | 212 | }; |
215 | 213 | ||
216 | static struct clk_lookup pxa25x_hwuart_clkreg = | 214 | static struct clk_lookup pxa25x_hwuart_clkreg = |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 180bd8675d4b..aed6cbcf3866 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -230,8 +230,6 @@ static struct clk_lookup pxa27x_clkregs[] = { | |||
230 | INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), | 230 | INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), |
231 | INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), | 231 | INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), |
232 | INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), | 232 | INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), |
233 | INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), | ||
234 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
235 | }; | 233 | }; |
236 | 234 | ||
237 | #ifdef CONFIG_PM | 235 | #ifdef CONFIG_PM |
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index 0388eda7878a..40bb16501d86 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c | |||
@@ -89,7 +89,6 @@ static DEFINE_PXA3_CKEN(gcu, PXA300_GCU, 0, 0); | |||
89 | static struct clk_lookup common_clkregs[] = { | 89 | static struct clk_lookup common_clkregs[] = { |
90 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL), | 90 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL), |
91 | INIT_CLKREG(&clk_gcu, "pxa3xx-gcu", NULL), | 91 | INIT_CLKREG(&clk_gcu, "pxa3xx-gcu", NULL), |
92 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
93 | }; | 92 | }; |
94 | 93 | ||
95 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); | 94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); |
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index d487e1ff4c9a..8d614ecd8e99 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c | |||
@@ -83,7 +83,6 @@ static DEFINE_PXA3_CKEN(gcu, PXA320_GCU, 0, 0); | |||
83 | static struct clk_lookup pxa320_clkregs[] = { | 83 | static struct clk_lookup pxa320_clkregs[] = { |
84 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL), | 84 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL), |
85 | INIT_CLKREG(&clk_gcu, "pxa3xx-gcu", NULL), | 85 | INIT_CLKREG(&clk_gcu, "pxa3xx-gcu", NULL), |
86 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
87 | }; | 86 | }; |
88 | 87 | ||
89 | static int __init pxa320_init(void) | 88 | static int __init pxa320_init(void) |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index f107c71c7589..4f402afa6609 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -67,7 +67,6 @@ static struct clk_lookup pxa3xx_clkregs[] = { | |||
67 | INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), | 67 | INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), |
68 | /* Power I2C clock is always on */ | 68 | /* Power I2C clock is always on */ |
69 | INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL), | 69 | INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL), |
70 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
71 | INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), | 70 | INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), |
72 | INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), | 71 | INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), |
73 | INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), | 72 | INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), |
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c index fccc644702e6..d082a583df78 100644 --- a/arch/arm/mach-pxa/pxa95x.c +++ b/arch/arm/mach-pxa/pxa95x.c | |||
@@ -217,7 +217,6 @@ static struct clk_lookup pxa95x_clkregs[] = { | |||
217 | INIT_CLKREG(&clk_pxa95x_pout, NULL, "CLK_POUT"), | 217 | INIT_CLKREG(&clk_pxa95x_pout, NULL, "CLK_POUT"), |
218 | /* Power I2C clock is always on */ | 218 | /* Power I2C clock is always on */ |
219 | INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL), | 219 | INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL), |
220 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
221 | INIT_CLKREG(&clk_pxa95x_lcd, "pxa2xx-fb", NULL), | 220 | INIT_CLKREG(&clk_pxa95x_lcd, "pxa2xx-fb", NULL), |
222 | INIT_CLKREG(&clk_pxa95x_ffuart, "pxa2xx-uart.0", NULL), | 221 | INIT_CLKREG(&clk_pxa95x_ffuart, "pxa2xx-uart.0", NULL), |
223 | INIT_CLKREG(&clk_pxa95x_btuart, "pxa2xx-uart.1", NULL), | 222 | INIT_CLKREG(&clk_pxa95x_btuart, "pxa2xx-uart.1", NULL), |
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index ac1aed2a8da4..eb55f05bef3a 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | ||
16 | 17 | ||
17 | extern volatile int pen_release; | 18 | extern volatile int pen_release; |
18 | 19 | ||
diff --git a/arch/arm/mach-realview/include/mach/board-eb.h b/arch/arm/mach-realview/include/mach/board-eb.h index 794a8d91a6a6..124bce6b4d7b 100644 --- a/arch/arm/mach-realview/include/mach/board-eb.h +++ b/arch/arm/mach-realview/include/mach/board-eb.h | |||
@@ -47,21 +47,23 @@ | |||
47 | #define REALVIEW_EB_USB_BASE 0x4F000000 /* USB */ | 47 | #define REALVIEW_EB_USB_BASE 0x4F000000 /* USB */ |
48 | 48 | ||
49 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB | 49 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB |
50 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ | 50 | #define REALVIEW_EB11MP_PRIV_MEM_BASE 0x1F000000 |
51 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | ||
52 | #define REALVIEW_EB11MP_TWD_BASE 0x10100600 | ||
53 | #define REALVIEW_EB11MP_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ | ||
54 | #define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */ | 51 | #define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */ |
55 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ | 52 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ |
56 | #else | 53 | #else |
57 | #define REALVIEW_EB11MP_SCU_BASE 0x1F000000 /* SCU registers */ | 54 | #define REALVIEW_EB11MP_PRIV_MEM_BASE 0x1F000000 |
58 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x1F000100 /* Generic interrupt controller CPU interface */ | ||
59 | #define REALVIEW_EB11MP_TWD_BASE 0x1F000600 | ||
60 | #define REALVIEW_EB11MP_GIC_DIST_BASE 0x1F001000 /* Generic interrupt controller distributor */ | ||
61 | #define REALVIEW_EB11MP_L220_BASE 0x1F002000 /* L220 registers */ | 55 | #define REALVIEW_EB11MP_L220_BASE 0x1F002000 /* L220 registers */ |
62 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */ | 56 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */ |
63 | #endif | 57 | #endif |
64 | 58 | ||
59 | #define REALVIEW_EB11MP_PRIV_MEM_SIZE SZ_8K | ||
60 | #define REALVIEW_EB11MP_PRIV_MEM_OFF(x) (REALVIEW_EB11MP_PRIV_MEM_BASE + (x)) | ||
61 | |||
62 | #define REALVIEW_EB11MP_SCU_BASE REALVIEW_EB11MP_PRIV_MEM_OFF(0) /* SCU registers */ | ||
63 | #define REALVIEW_EB11MP_GIC_CPU_BASE REALVIEW_EB11MP_PRIV_MEM_OFF(0x0100) /* Generic interrupt controller CPU interface */ | ||
64 | #define REALVIEW_EB11MP_TWD_BASE REALVIEW_EB11MP_PRIV_MEM_OFF(0x0600) | ||
65 | #define REALVIEW_EB11MP_GIC_DIST_BASE REALVIEW_EB11MP_PRIV_MEM_OFF(0x1000) /* Generic interrupt controller distributor */ | ||
66 | |||
65 | /* | 67 | /* |
66 | * Core tile identification (REALVIEW_SYS_PROCID) | 68 | * Core tile identification (REALVIEW_SYS_PROCID) |
67 | */ | 69 | */ |
diff --git a/arch/arm/mach-realview/include/mach/board-pb11mp.h b/arch/arm/mach-realview/include/mach/board-pb11mp.h index 7abf918b77e9..aa2d4e02ea2c 100644 --- a/arch/arm/mach-realview/include/mach/board-pb11mp.h +++ b/arch/arm/mach-realview/include/mach/board-pb11mp.h | |||
@@ -75,6 +75,8 @@ | |||
75 | /* | 75 | /* |
76 | * Testchip peripheral and fpga gic regions | 76 | * Testchip peripheral and fpga gic regions |
77 | */ | 77 | */ |
78 | #define REALVIEW_TC11MP_PRIV_MEM_BASE 0x1F000000 | ||
79 | #define REALVIEW_TC11MP_PRIV_MEM_SIZE SZ_8K | ||
78 | #define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */ | 80 | #define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */ |
79 | #define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */ | 81 | #define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */ |
80 | #define REALVIEW_TC11MP_TWD_BASE 0x1F000600 | 82 | #define REALVIEW_TC11MP_TWD_BASE 0x1F000600 |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index e62962117763..9578145f2df0 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -91,14 +91,9 @@ static struct map_desc realview_eb_io_desc[] __initdata = { | |||
91 | 91 | ||
92 | static struct map_desc realview_eb11mp_io_desc[] __initdata = { | 92 | static struct map_desc realview_eb11mp_io_desc[] __initdata = { |
93 | { | 93 | { |
94 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_SCU_BASE), | 94 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_PRIV_MEM_BASE), |
95 | .pfn = __phys_to_pfn(REALVIEW_EB11MP_SCU_BASE), | 95 | .pfn = __phys_to_pfn(REALVIEW_EB11MP_PRIV_MEM_BASE), |
96 | .length = SZ_4K, | 96 | .length = REALVIEW_EB11MP_PRIV_MEM_SIZE, |
97 | .type = MT_DEVICE, | ||
98 | }, { | ||
99 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_GIC_DIST_BASE), | ||
100 | .pfn = __phys_to_pfn(REALVIEW_EB11MP_GIC_DIST_BASE), | ||
101 | .length = SZ_4K, | ||
102 | .type = MT_DEVICE, | 97 | .type = MT_DEVICE, |
103 | }, { | 98 | }, { |
104 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_L220_BASE), | 99 | .virtual = IO_ADDRESS(REALVIEW_EB11MP_L220_BASE), |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 127a3fd42ab1..2147335f66f5 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -64,15 +64,10 @@ static struct map_desc realview_pb11mp_io_desc[] __initdata = { | |||
64 | .pfn = __phys_to_pfn(REALVIEW_PB11MP_GIC_DIST_BASE), | 64 | .pfn = __phys_to_pfn(REALVIEW_PB11MP_GIC_DIST_BASE), |
65 | .length = SZ_4K, | 65 | .length = SZ_4K, |
66 | .type = MT_DEVICE, | 66 | .type = MT_DEVICE, |
67 | }, { | 67 | }, { /* Maps the SCU, GIC CPU interface, TWD, GIC DIST */ |
68 | .virtual = IO_ADDRESS(REALVIEW_TC11MP_GIC_CPU_BASE), | 68 | .virtual = IO_ADDRESS(REALVIEW_TC11MP_PRIV_MEM_BASE), |
69 | .pfn = __phys_to_pfn(REALVIEW_TC11MP_GIC_CPU_BASE), | 69 | .pfn = __phys_to_pfn(REALVIEW_TC11MP_PRIV_MEM_BASE), |
70 | .length = SZ_4K, | 70 | .length = REALVIEW_TC11MP_PRIV_MEM_SIZE, |
71 | .type = MT_DEVICE, | ||
72 | }, { | ||
73 | .virtual = IO_ADDRESS(REALVIEW_TC11MP_GIC_DIST_BASE), | ||
74 | .pfn = __phys_to_pfn(REALVIEW_TC11MP_GIC_DIST_BASE), | ||
75 | .length = SZ_4K, | ||
76 | .type = MT_DEVICE, | 71 | .type = MT_DEVICE, |
77 | }, { | 72 | }, { |
78 | .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE), | 73 | .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE), |
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c index d6df9f6c9f7e..dab3c6347a8f 100644 --- a/arch/arm/mach-sa1100/clock.c +++ b/arch/arm/mach-sa1100/clock.c | |||
@@ -11,39 +11,17 @@ | |||
11 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/io.h> | ||
15 | #include <linux/clkdev.h> | ||
16 | 14 | ||
17 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
18 | 16 | ||
19 | struct clkops { | 17 | /* |
20 | void (*enable)(struct clk *); | 18 | * Very simple clock implementation - we only have one clock to deal with. |
21 | void (*disable)(struct clk *); | 19 | */ |
22 | unsigned long (*getrate)(struct clk *); | ||
23 | }; | ||
24 | |||
25 | struct clk { | 20 | struct clk { |
26 | const struct clkops *ops; | ||
27 | unsigned long rate; | ||
28 | unsigned int enabled; | 21 | unsigned int enabled; |
29 | }; | 22 | }; |
30 | 23 | ||
31 | #define INIT_CLKREG(_clk, _devname, _conname) \ | 24 | static void clk_gpio27_enable(void) |
32 | { \ | ||
33 | .clk = _clk, \ | ||
34 | .dev_id = _devname, \ | ||
35 | .con_id = _conname, \ | ||
36 | } | ||
37 | |||
38 | #define DEFINE_CLK(_name, _ops, _rate) \ | ||
39 | struct clk clk_##_name = { \ | ||
40 | .ops = _ops, \ | ||
41 | .rate = _rate, \ | ||
42 | } | ||
43 | |||
44 | static DEFINE_SPINLOCK(clocks_lock); | ||
45 | |||
46 | static void clk_gpio27_enable(struct clk *clk) | ||
47 | { | 25 | { |
48 | /* | 26 | /* |
49 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | 27 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: |
@@ -54,22 +32,38 @@ static void clk_gpio27_enable(struct clk *clk) | |||
54 | TUCR = TUCR_3_6864MHz; | 32 | TUCR = TUCR_3_6864MHz; |
55 | } | 33 | } |
56 | 34 | ||
57 | static void clk_gpio27_disable(struct clk *clk) | 35 | static void clk_gpio27_disable(void) |
58 | { | 36 | { |
59 | TUCR = 0; | 37 | TUCR = 0; |
60 | GPDR &= ~GPIO_32_768kHz; | 38 | GPDR &= ~GPIO_32_768kHz; |
61 | GAFR &= ~GPIO_32_768kHz; | 39 | GAFR &= ~GPIO_32_768kHz; |
62 | } | 40 | } |
63 | 41 | ||
42 | static struct clk clk_gpio27; | ||
43 | |||
44 | static DEFINE_SPINLOCK(clocks_lock); | ||
45 | |||
46 | struct clk *clk_get(struct device *dev, const char *id) | ||
47 | { | ||
48 | const char *devname = dev_name(dev); | ||
49 | |||
50 | return strcmp(devname, "sa1111.0") ? ERR_PTR(-ENOENT) : &clk_gpio27; | ||
51 | } | ||
52 | EXPORT_SYMBOL(clk_get); | ||
53 | |||
54 | void clk_put(struct clk *clk) | ||
55 | { | ||
56 | } | ||
57 | EXPORT_SYMBOL(clk_put); | ||
58 | |||
64 | int clk_enable(struct clk *clk) | 59 | int clk_enable(struct clk *clk) |
65 | { | 60 | { |
66 | unsigned long flags; | 61 | unsigned long flags; |
67 | 62 | ||
68 | spin_lock_irqsave(&clocks_lock, flags); | 63 | spin_lock_irqsave(&clocks_lock, flags); |
69 | if (clk->enabled++ == 0) | 64 | if (clk->enabled++ == 0) |
70 | clk->ops->enable(clk); | 65 | clk_gpio27_enable(); |
71 | spin_unlock_irqrestore(&clocks_lock, flags); | 66 | spin_unlock_irqrestore(&clocks_lock, flags); |
72 | |||
73 | return 0; | 67 | return 0; |
74 | } | 68 | } |
75 | EXPORT_SYMBOL(clk_enable); | 69 | EXPORT_SYMBOL(clk_enable); |
@@ -82,48 +76,13 @@ void clk_disable(struct clk *clk) | |||
82 | 76 | ||
83 | spin_lock_irqsave(&clocks_lock, flags); | 77 | spin_lock_irqsave(&clocks_lock, flags); |
84 | if (--clk->enabled == 0) | 78 | if (--clk->enabled == 0) |
85 | clk->ops->disable(clk); | 79 | clk_gpio27_disable(); |
86 | spin_unlock_irqrestore(&clocks_lock, flags); | 80 | spin_unlock_irqrestore(&clocks_lock, flags); |
87 | } | 81 | } |
88 | EXPORT_SYMBOL(clk_disable); | 82 | EXPORT_SYMBOL(clk_disable); |
89 | 83 | ||
90 | unsigned long clk_get_rate(struct clk *clk) | 84 | unsigned long clk_get_rate(struct clk *clk) |
91 | { | 85 | { |
92 | unsigned long rate; | 86 | return 3686400; |
93 | |||
94 | rate = clk->rate; | ||
95 | if (clk->ops->getrate) | ||
96 | rate = clk->ops->getrate(clk); | ||
97 | |||
98 | return rate; | ||
99 | } | 87 | } |
100 | EXPORT_SYMBOL(clk_get_rate); | 88 | EXPORT_SYMBOL(clk_get_rate); |
101 | |||
102 | const struct clkops clk_gpio27_ops = { | ||
103 | .enable = clk_gpio27_enable, | ||
104 | .disable = clk_gpio27_disable, | ||
105 | }; | ||
106 | |||
107 | static void clk_dummy_enable(struct clk *clk) { } | ||
108 | static void clk_dummy_disable(struct clk *clk) { } | ||
109 | |||
110 | const struct clkops clk_dummy_ops = { | ||
111 | .enable = clk_dummy_enable, | ||
112 | .disable = clk_dummy_disable, | ||
113 | }; | ||
114 | |||
115 | static DEFINE_CLK(gpio27, &clk_gpio27_ops, 3686400); | ||
116 | static DEFINE_CLK(dummy, &clk_dummy_ops, 0); | ||
117 | |||
118 | static struct clk_lookup sa11xx_clkregs[] = { | ||
119 | INIT_CLKREG(&clk_gpio27, "sa1111.0", NULL), | ||
120 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
121 | }; | ||
122 | |||
123 | static int __init sa11xx_clk_init(void) | ||
124 | { | ||
125 | clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs)); | ||
126 | return 0; | ||
127 | } | ||
128 | |||
129 | postcore_initcall(sa11xx_clk_init); | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index b9060e236def..fd5652118ed1 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -138,8 +138,6 @@ static struct pda_power_pdata collie_power_data = { | |||
138 | static struct resource collie_power_resource[] = { | 138 | static struct resource collie_power_resource[] = { |
139 | { | 139 | { |
140 | .name = "ac", | 140 | .name = "ac", |
141 | .start = gpio_to_irq(COLLIE_GPIO_AC_IN), | ||
142 | .end = gpio_to_irq(COLLIE_GPIO_AC_IN), | ||
143 | .flags = IORESOURCE_IRQ | | 141 | .flags = IORESOURCE_IRQ | |
144 | IORESOURCE_IRQ_HIGHEDGE | | 142 | IORESOURCE_IRQ_HIGHEDGE | |
145 | IORESOURCE_IRQ_LOWEDGE, | 143 | IORESOURCE_IRQ_LOWEDGE, |
@@ -341,7 +339,8 @@ static void __init collie_init(void) | |||
341 | 339 | ||
342 | GPSR |= _COLLIE_GPIO_UCB1x00_RESET; | 340 | GPSR |= _COLLIE_GPIO_UCB1x00_RESET; |
343 | 341 | ||
344 | 342 | collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN); | |
343 | collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN); | ||
345 | platform_scoop_config = &collie_pcmcia_config; | 344 | platform_scoop_config = &collie_pcmcia_config; |
346 | 345 | ||
347 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 346 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index aaa8acf76b7b..19b2053f5af4 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
@@ -228,7 +228,7 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy) | |||
228 | return 0; | 228 | return 0; |
229 | } | 229 | } |
230 | 230 | ||
231 | static struct cpufreq_driver sa1100_driver = { | 231 | static struct cpufreq_driver sa1100_driver __refdata = { |
232 | .flags = CPUFREQ_STICKY, | 232 | .flags = CPUFREQ_STICKY, |
233 | .verify = sa11x0_verify_speed, | 233 | .verify = sa11x0_verify_speed, |
234 | .target = sa1100_target, | 234 | .target = sa1100_target, |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 480d2ea46b00..bb10ee2cb89f 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -345,29 +345,9 @@ void sa11x0_register_irda(struct irda_platform_data *irda) | |||
345 | sa11x0_register_device(&sa11x0ir_device, irda); | 345 | sa11x0_register_device(&sa11x0ir_device, irda); |
346 | } | 346 | } |
347 | 347 | ||
348 | static struct resource sa11x0rtc_resources[] = { | ||
349 | [0] = { | ||
350 | .start = 0x90010000, | ||
351 | .end = 0x900100ff, | ||
352 | .flags = IORESOURCE_MEM, | ||
353 | }, | ||
354 | [1] = { | ||
355 | .start = IRQ_RTC1Hz, | ||
356 | .end = IRQ_RTC1Hz, | ||
357 | .flags = IORESOURCE_IRQ, | ||
358 | }, | ||
359 | [2] = { | ||
360 | .start = IRQ_RTCAlrm, | ||
361 | .end = IRQ_RTCAlrm, | ||
362 | .flags = IORESOURCE_IRQ, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | static struct platform_device sa11x0rtc_device = { | 348 | static struct platform_device sa11x0rtc_device = { |
367 | .name = "sa1100-rtc", | 349 | .name = "sa1100-rtc", |
368 | .id = -1, | 350 | .id = -1, |
369 | .resource = sa11x0rtc_resources, | ||
370 | .num_resources = ARRAY_SIZE(sa11x0rtc_resources), | ||
371 | }; | 351 | }; |
372 | 352 | ||
373 | static struct platform_device *sa11x0_devices[] __initdata = { | 353 | static struct platform_device *sa11x0_devices[] __initdata = { |
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index f50b00bd18a0..b412fc09c80c 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c | |||
@@ -198,3 +198,5 @@ static int __init jornada_ssp_init(void) | |||
198 | { | 198 | { |
199 | return platform_driver_register(&jornadassp_driver); | 199 | return platform_driver_register(&jornadassp_driver); |
200 | } | 200 | } |
201 | |||
202 | module_init(jornada_ssp_init); | ||
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index cc97ef892d1b..4fe2e9eaf501 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/r8a7779.h> | 27 | #include <mach/r8a7779.h> |
28 | #include <asm/smp_plat.h> | ||
28 | #include <asm/smp_scu.h> | 29 | #include <asm/smp_scu.h> |
29 | #include <asm/smp_twd.h> | 30 | #include <asm/smp_twd.h> |
30 | #include <asm/hardware/gic.h> | 31 | #include <asm/hardware/gic.h> |
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index be1ade76ccc8..0d159d64a345 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <mach/common.h> | 25 | #include <mach/common.h> |
26 | #include <asm/smp_plat.h> | ||
26 | #include <asm/smp_scu.h> | 27 | #include <asm/smp_scu.h> |
27 | #include <asm/smp_twd.h> | 28 | #include <asm/smp_twd.h> |
28 | #include <asm/hardware/gic.h> | 29 | #include <asm/hardware/gic.h> |
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c index 572015e57cd9..c76f0f456f04 100644 --- a/arch/arm/mach-ux500/hotplug.c +++ b/arch/arm/mach-ux500/hotplug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | ||
16 | 17 | ||
17 | extern volatile int pen_release; | 18 | extern volatile int pen_release; |
18 | 19 | ||
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index a19e398dade3..d2058ef8345f 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
21 | #include <asm/hardware/gic.h> | 21 | #include <asm/hardware/gic.h> |
22 | #include <asm/smp_plat.h> | ||
22 | #include <asm/smp_scu.h> | 23 | #include <asm/smp_scu.h> |
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <mach/setup.h> | 25 | #include <mach/setup.h> |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 2b1e836a76ed..b1e87c184e54 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -217,7 +217,7 @@ static void __init ct_ca9x4_init(void) | |||
217 | } | 217 | } |
218 | 218 | ||
219 | #ifdef CONFIG_SMP | 219 | #ifdef CONFIG_SMP |
220 | static void ct_ca9x4_init_cpu_map(void) | 220 | static void __init ct_ca9x4_init_cpu_map(void) |
221 | { | 221 | { |
222 | int i, ncores = scu_get_core_count(MMIO_P2V(A9_MPCORE_SCU)); | 222 | int i, ncores = scu_get_core_count(MMIO_P2V(A9_MPCORE_SCU)); |
223 | 223 | ||
@@ -233,7 +233,7 @@ static void ct_ca9x4_init_cpu_map(void) | |||
233 | set_smp_cross_call(gic_raise_softirq); | 233 | set_smp_cross_call(gic_raise_softirq); |
234 | } | 234 | } |
235 | 235 | ||
236 | static void ct_ca9x4_smp_enable(unsigned int max_cpus) | 236 | static void __init ct_ca9x4_smp_enable(unsigned int max_cpus) |
237 | { | 237 | { |
238 | scu_enable(MMIO_P2V(A9_MPCORE_SCU)); | 238 | scu_enable(MMIO_P2V(A9_MPCORE_SCU)); |
239 | } | 239 | } |
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c index 813ee08f96e6..3034a4dab4a1 100644 --- a/arch/arm/mach-vexpress/hotplug.c +++ b/arch/arm/mach-vexpress/hotplug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | 14 | ||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | ||
16 | #include <asm/system.h> | 17 | #include <asm/system.h> |
17 | 18 | ||
18 | extern volatile int pen_release; | 19 | extern volatile int pen_release; |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 4cefb57d9ed2..1a3ca2488164 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -882,6 +882,7 @@ config CACHE_XSC3L2 | |||
882 | 882 | ||
883 | config ARM_L1_CACHE_SHIFT_6 | 883 | config ARM_L1_CACHE_SHIFT_6 |
884 | bool | 884 | bool |
885 | default y if CPU_V7 | ||
885 | help | 886 | help |
886 | Setting ARM L1 cache line size to 64 Bytes. | 887 | Setting ARM L1 cache line size to 64 Bytes. |
887 | 888 | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 6ec1226fc62d..5dc7d127a40f 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -310,7 +310,7 @@ static void arm_memory_present(void) | |||
310 | 310 | ||
311 | static bool arm_memblock_steal_permitted = true; | 311 | static bool arm_memblock_steal_permitted = true; |
312 | 312 | ||
313 | phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align) | 313 | phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) |
314 | { | 314 | { |
315 | phys_addr_t phys; | 315 | phys_addr_t phys; |
316 | 316 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 7e9b5bf910c1..0404ccbb8aa3 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -148,10 +148,6 @@ ENDPROC(cpu_v7_do_resume) | |||
148 | * Initialise TLB, Caches, and MMU state ready to switch the MMU | 148 | * Initialise TLB, Caches, and MMU state ready to switch the MMU |
149 | * on. Return in r0 the new CP15 C1 control register setting. | 149 | * on. Return in r0 the new CP15 C1 control register setting. |
150 | * | 150 | * |
151 | * We automatically detect if we have a Harvard cache, and use the | ||
152 | * Harvard cache control instructions insead of the unified cache | ||
153 | * control instructions. | ||
154 | * | ||
155 | * This should be able to cover all ARMv7 cores. | 151 | * This should be able to cover all ARMv7 cores. |
156 | * | 152 | * |
157 | * It is assumed that: | 153 | * It is assumed that: |
@@ -251,9 +247,7 @@ __v7_setup: | |||
251 | #endif | 247 | #endif |
252 | 248 | ||
253 | 3: mov r10, #0 | 249 | 3: mov r10, #0 |
254 | #ifdef HARVARD_CACHE | ||
255 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate | 250 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate |
256 | #endif | ||
257 | dsb | 251 | dsb |
258 | #ifdef CONFIG_MMU | 252 | #ifdef CONFIG_MMU |
259 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs | 253 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs |
@@ -330,16 +324,6 @@ __v7_ca5mp_proc_info: | |||
330 | .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info | 324 | .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info |
331 | 325 | ||
332 | /* | 326 | /* |
333 | * ARM Ltd. Cortex A7 processor. | ||
334 | */ | ||
335 | .type __v7_ca7mp_proc_info, #object | ||
336 | __v7_ca7mp_proc_info: | ||
337 | .long 0x410fc070 | ||
338 | .long 0xff0ffff0 | ||
339 | __v7_proc __v7_ca7mp_setup, hwcaps = HWCAP_IDIV | ||
340 | .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info | ||
341 | |||
342 | /* | ||
343 | * ARM Ltd. Cortex A9 processor. | 327 | * ARM Ltd. Cortex A9 processor. |
344 | */ | 328 | */ |
345 | .type __v7_ca9mp_proc_info, #object | 329 | .type __v7_ca9mp_proc_info, #object |
@@ -351,6 +335,16 @@ __v7_ca9mp_proc_info: | |||
351 | #endif /* CONFIG_ARM_LPAE */ | 335 | #endif /* CONFIG_ARM_LPAE */ |
352 | 336 | ||
353 | /* | 337 | /* |
338 | * ARM Ltd. Cortex A7 processor. | ||
339 | */ | ||
340 | .type __v7_ca7mp_proc_info, #object | ||
341 | __v7_ca7mp_proc_info: | ||
342 | .long 0x410fc070 | ||
343 | .long 0xff0ffff0 | ||
344 | __v7_proc __v7_ca7mp_setup, hwcaps = HWCAP_IDIV | ||
345 | .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info | ||
346 | |||
347 | /* | ||
354 | * ARM Ltd. Cortex A15 processor. | 348 | * ARM Ltd. Cortex A15 processor. |
355 | */ | 349 | */ |
356 | .type __v7_ca15mp_proc_info, #object | 350 | .type __v7_ca15mp_proc_info, #object |
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c index 92f18d372b69..49c7db48c7f1 100644 --- a/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/plat-versatile/platsmp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | 17 | ||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/smp_plat.h> | ||
19 | #include <asm/hardware/gic.h> | 20 | #include <asm/hardware/gic.h> |
20 | 21 | ||
21 | /* | 22 | /* |