aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-07-14 20:28:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-07-14 20:28:13 -0400
commit2f7989efd4398d92b8adffce2e07dd043a0895fe (patch)
tree8acbc880a8908ea18d724f747ea26d0afc2160bf
parent6f7dd68b755b215deda5188a2c13c00f4776ea66 (diff)
parent0ebe25f90cd99bb1bcf622ec8a841421d48380d6 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6226/1: fix kprobe bug in ldr instruction emulation ARM: Update mach-types ARM: lockdep: fix unannotated irqs-on ARM: 6184/2: ux500: use neutral PRCMU base ARM: 6212/1: atomic ops: add memory constraints to inline asm ARM: 6211/1: atomic ops: fix register constraints for atomic64_add_unless ARM: 6210/1: Do not rely on reset defaults of L2X0_AUX_CTRL
-rw-r--r--arch/arm/include/asm/atomic.h132
-rw-r--r--arch/arm/kernel/entry-armv.S16
-rw-r--r--arch/arm/kernel/kprobes-decode.c5
-rw-r--r--arch/arm/kernel/process.c23
-rw-r--r--arch/arm/mach-ux500/clock.c2
-rw-r--r--arch/arm/mach-ux500/cpu-db5500.c1
-rw-r--r--arch/arm/mm/cache-l2x0.c5
-rw-r--r--arch/arm/tools/mach-types152
8 files changed, 243 insertions, 93 deletions
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index a0162fa9456..7e79503ab89 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -40,12 +40,12 @@ static inline void atomic_add(int i, atomic_t *v)
40 int result; 40 int result;
41 41
42 __asm__ __volatile__("@ atomic_add\n" 42 __asm__ __volatile__("@ atomic_add\n"
43"1: ldrex %0, [%2]\n" 43"1: ldrex %0, [%3]\n"
44" add %0, %0, %3\n" 44" add %0, %0, %4\n"
45" strex %1, %0, [%2]\n" 45" strex %1, %0, [%3]\n"
46" teq %1, #0\n" 46" teq %1, #0\n"
47" bne 1b" 47" bne 1b"
48 : "=&r" (result), "=&r" (tmp) 48 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
49 : "r" (&v->counter), "Ir" (i) 49 : "r" (&v->counter), "Ir" (i)
50 : "cc"); 50 : "cc");
51} 51}
@@ -58,12 +58,12 @@ static inline int atomic_add_return(int i, atomic_t *v)
58 smp_mb(); 58 smp_mb();
59 59
60 __asm__ __volatile__("@ atomic_add_return\n" 60 __asm__ __volatile__("@ atomic_add_return\n"
61"1: ldrex %0, [%2]\n" 61"1: ldrex %0, [%3]\n"
62" add %0, %0, %3\n" 62" add %0, %0, %4\n"
63" strex %1, %0, [%2]\n" 63" strex %1, %0, [%3]\n"
64" teq %1, #0\n" 64" teq %1, #0\n"
65" bne 1b" 65" bne 1b"
66 : "=&r" (result), "=&r" (tmp) 66 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
67 : "r" (&v->counter), "Ir" (i) 67 : "r" (&v->counter), "Ir" (i)
68 : "cc"); 68 : "cc");
69 69
@@ -78,12 +78,12 @@ static inline void atomic_sub(int i, atomic_t *v)
78 int result; 78 int result;
79 79
80 __asm__ __volatile__("@ atomic_sub\n" 80 __asm__ __volatile__("@ atomic_sub\n"
81"1: ldrex %0, [%2]\n" 81"1: ldrex %0, [%3]\n"
82" sub %0, %0, %3\n" 82" sub %0, %0, %4\n"
83" strex %1, %0, [%2]\n" 83" strex %1, %0, [%3]\n"
84" teq %1, #0\n" 84" teq %1, #0\n"
85" bne 1b" 85" bne 1b"
86 : "=&r" (result), "=&r" (tmp) 86 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
87 : "r" (&v->counter), "Ir" (i) 87 : "r" (&v->counter), "Ir" (i)
88 : "cc"); 88 : "cc");
89} 89}
@@ -96,12 +96,12 @@ static inline int atomic_sub_return(int i, atomic_t *v)
96 smp_mb(); 96 smp_mb();
97 97
98 __asm__ __volatile__("@ atomic_sub_return\n" 98 __asm__ __volatile__("@ atomic_sub_return\n"
99"1: ldrex %0, [%2]\n" 99"1: ldrex %0, [%3]\n"
100" sub %0, %0, %3\n" 100" sub %0, %0, %4\n"
101" strex %1, %0, [%2]\n" 101" strex %1, %0, [%3]\n"
102" teq %1, #0\n" 102" teq %1, #0\n"
103" bne 1b" 103" bne 1b"
104 : "=&r" (result), "=&r" (tmp) 104 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
105 : "r" (&v->counter), "Ir" (i) 105 : "r" (&v->counter), "Ir" (i)
106 : "cc"); 106 : "cc");
107 107
@@ -118,11 +118,11 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
118 118
119 do { 119 do {
120 __asm__ __volatile__("@ atomic_cmpxchg\n" 120 __asm__ __volatile__("@ atomic_cmpxchg\n"
121 "ldrex %1, [%2]\n" 121 "ldrex %1, [%3]\n"
122 "mov %0, #0\n" 122 "mov %0, #0\n"
123 "teq %1, %3\n" 123 "teq %1, %4\n"
124 "strexeq %0, %4, [%2]\n" 124 "strexeq %0, %5, [%3]\n"
125 : "=&r" (res), "=&r" (oldval) 125 : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
126 : "r" (&ptr->counter), "Ir" (old), "r" (new) 126 : "r" (&ptr->counter), "Ir" (old), "r" (new)
127 : "cc"); 127 : "cc");
128 } while (res); 128 } while (res);
@@ -137,12 +137,12 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
137 unsigned long tmp, tmp2; 137 unsigned long tmp, tmp2;
138 138
139 __asm__ __volatile__("@ atomic_clear_mask\n" 139 __asm__ __volatile__("@ atomic_clear_mask\n"
140"1: ldrex %0, [%2]\n" 140"1: ldrex %0, [%3]\n"
141" bic %0, %0, %3\n" 141" bic %0, %0, %4\n"
142" strex %1, %0, [%2]\n" 142" strex %1, %0, [%3]\n"
143" teq %1, #0\n" 143" teq %1, #0\n"
144" bne 1b" 144" bne 1b"
145 : "=&r" (tmp), "=&r" (tmp2) 145 : "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
146 : "r" (addr), "Ir" (mask) 146 : "r" (addr), "Ir" (mask)
147 : "cc"); 147 : "cc");
148} 148}
@@ -249,7 +249,7 @@ static inline u64 atomic64_read(atomic64_t *v)
249 __asm__ __volatile__("@ atomic64_read\n" 249 __asm__ __volatile__("@ atomic64_read\n"
250" ldrexd %0, %H0, [%1]" 250" ldrexd %0, %H0, [%1]"
251 : "=&r" (result) 251 : "=&r" (result)
252 : "r" (&v->counter) 252 : "r" (&v->counter), "Qo" (v->counter)
253 ); 253 );
254 254
255 return result; 255 return result;
@@ -260,11 +260,11 @@ static inline void atomic64_set(atomic64_t *v, u64 i)
260 u64 tmp; 260 u64 tmp;
261 261
262 __asm__ __volatile__("@ atomic64_set\n" 262 __asm__ __volatile__("@ atomic64_set\n"
263"1: ldrexd %0, %H0, [%1]\n" 263"1: ldrexd %0, %H0, [%2]\n"
264" strexd %0, %2, %H2, [%1]\n" 264" strexd %0, %3, %H3, [%2]\n"
265" teq %0, #0\n" 265" teq %0, #0\n"
266" bne 1b" 266" bne 1b"
267 : "=&r" (tmp) 267 : "=&r" (tmp), "=Qo" (v->counter)
268 : "r" (&v->counter), "r" (i) 268 : "r" (&v->counter), "r" (i)
269 : "cc"); 269 : "cc");
270} 270}
@@ -275,13 +275,13 @@ static inline void atomic64_add(u64 i, atomic64_t *v)
275 unsigned long tmp; 275 unsigned long tmp;
276 276
277 __asm__ __volatile__("@ atomic64_add\n" 277 __asm__ __volatile__("@ atomic64_add\n"
278"1: ldrexd %0, %H0, [%2]\n" 278"1: ldrexd %0, %H0, [%3]\n"
279" adds %0, %0, %3\n" 279" adds %0, %0, %4\n"
280" adc %H0, %H0, %H3\n" 280" adc %H0, %H0, %H4\n"
281" strexd %1, %0, %H0, [%2]\n" 281" strexd %1, %0, %H0, [%3]\n"
282" teq %1, #0\n" 282" teq %1, #0\n"
283" bne 1b" 283" bne 1b"
284 : "=&r" (result), "=&r" (tmp) 284 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
285 : "r" (&v->counter), "r" (i) 285 : "r" (&v->counter), "r" (i)
286 : "cc"); 286 : "cc");
287} 287}
@@ -294,13 +294,13 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v)
294 smp_mb(); 294 smp_mb();
295 295
296 __asm__ __volatile__("@ atomic64_add_return\n" 296 __asm__ __volatile__("@ atomic64_add_return\n"
297"1: ldrexd %0, %H0, [%2]\n" 297"1: ldrexd %0, %H0, [%3]\n"
298" adds %0, %0, %3\n" 298" adds %0, %0, %4\n"
299" adc %H0, %H0, %H3\n" 299" adc %H0, %H0, %H4\n"
300" strexd %1, %0, %H0, [%2]\n" 300" strexd %1, %0, %H0, [%3]\n"
301" teq %1, #0\n" 301" teq %1, #0\n"
302" bne 1b" 302" bne 1b"
303 : "=&r" (result), "=&r" (tmp) 303 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
304 : "r" (&v->counter), "r" (i) 304 : "r" (&v->counter), "r" (i)
305 : "cc"); 305 : "cc");
306 306
@@ -315,13 +315,13 @@ static inline void atomic64_sub(u64 i, atomic64_t *v)
315 unsigned long tmp; 315 unsigned long tmp;
316 316
317 __asm__ __volatile__("@ atomic64_sub\n" 317 __asm__ __volatile__("@ atomic64_sub\n"
318"1: ldrexd %0, %H0, [%2]\n" 318"1: ldrexd %0, %H0, [%3]\n"
319" subs %0, %0, %3\n" 319" subs %0, %0, %4\n"
320" sbc %H0, %H0, %H3\n" 320" sbc %H0, %H0, %H4\n"
321" strexd %1, %0, %H0, [%2]\n" 321" strexd %1, %0, %H0, [%3]\n"
322" teq %1, #0\n" 322" teq %1, #0\n"
323" bne 1b" 323" bne 1b"
324 : "=&r" (result), "=&r" (tmp) 324 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
325 : "r" (&v->counter), "r" (i) 325 : "r" (&v->counter), "r" (i)
326 : "cc"); 326 : "cc");
327} 327}
@@ -334,13 +334,13 @@ static inline u64 atomic64_sub_return(u64 i, atomic64_t *v)
334 smp_mb(); 334 smp_mb();
335 335
336 __asm__ __volatile__("@ atomic64_sub_return\n" 336 __asm__ __volatile__("@ atomic64_sub_return\n"
337"1: ldrexd %0, %H0, [%2]\n" 337"1: ldrexd %0, %H0, [%3]\n"
338" subs %0, %0, %3\n" 338" subs %0, %0, %4\n"
339" sbc %H0, %H0, %H3\n" 339" sbc %H0, %H0, %H4\n"
340" strexd %1, %0, %H0, [%2]\n" 340" strexd %1, %0, %H0, [%3]\n"
341" teq %1, #0\n" 341" teq %1, #0\n"
342" bne 1b" 342" bne 1b"
343 : "=&r" (result), "=&r" (tmp) 343 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
344 : "r" (&v->counter), "r" (i) 344 : "r" (&v->counter), "r" (i)
345 : "cc"); 345 : "cc");
346 346
@@ -358,12 +358,12 @@ static inline u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old, u64 new)
358 358
359 do { 359 do {
360 __asm__ __volatile__("@ atomic64_cmpxchg\n" 360 __asm__ __volatile__("@ atomic64_cmpxchg\n"
361 "ldrexd %1, %H1, [%2]\n" 361 "ldrexd %1, %H1, [%3]\n"
362 "mov %0, #0\n" 362 "mov %0, #0\n"
363 "teq %1, %3\n" 363 "teq %1, %4\n"
364 "teqeq %H1, %H3\n" 364 "teqeq %H1, %H4\n"
365 "strexdeq %0, %4, %H4, [%2]" 365 "strexdeq %0, %5, %H5, [%3]"
366 : "=&r" (res), "=&r" (oldval) 366 : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
367 : "r" (&ptr->counter), "r" (old), "r" (new) 367 : "r" (&ptr->counter), "r" (old), "r" (new)
368 : "cc"); 368 : "cc");
369 } while (res); 369 } while (res);
@@ -381,11 +381,11 @@ static inline u64 atomic64_xchg(atomic64_t *ptr, u64 new)
381 smp_mb(); 381 smp_mb();
382 382
383 __asm__ __volatile__("@ atomic64_xchg\n" 383 __asm__ __volatile__("@ atomic64_xchg\n"
384"1: ldrexd %0, %H0, [%2]\n" 384"1: ldrexd %0, %H0, [%3]\n"
385" strexd %1, %3, %H3, [%2]\n" 385" strexd %1, %4, %H4, [%3]\n"
386" teq %1, #0\n" 386" teq %1, #0\n"
387" bne 1b" 387" bne 1b"
388 : "=&r" (result), "=&r" (tmp) 388 : "=&r" (result), "=&r" (tmp), "+Qo" (ptr->counter)
389 : "r" (&ptr->counter), "r" (new) 389 : "r" (&ptr->counter), "r" (new)
390 : "cc"); 390 : "cc");
391 391
@@ -402,16 +402,16 @@ static inline u64 atomic64_dec_if_positive(atomic64_t *v)
402 smp_mb(); 402 smp_mb();
403 403
404 __asm__ __volatile__("@ atomic64_dec_if_positive\n" 404 __asm__ __volatile__("@ atomic64_dec_if_positive\n"
405"1: ldrexd %0, %H0, [%2]\n" 405"1: ldrexd %0, %H0, [%3]\n"
406" subs %0, %0, #1\n" 406" subs %0, %0, #1\n"
407" sbc %H0, %H0, #0\n" 407" sbc %H0, %H0, #0\n"
408" teq %H0, #0\n" 408" teq %H0, #0\n"
409" bmi 2f\n" 409" bmi 2f\n"
410" strexd %1, %0, %H0, [%2]\n" 410" strexd %1, %0, %H0, [%3]\n"
411" teq %1, #0\n" 411" teq %1, #0\n"
412" bne 1b\n" 412" bne 1b\n"
413"2:" 413"2:"
414 : "=&r" (result), "=&r" (tmp) 414 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
415 : "r" (&v->counter) 415 : "r" (&v->counter)
416 : "cc"); 416 : "cc");
417 417
@@ -429,18 +429,18 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
429 smp_mb(); 429 smp_mb();
430 430
431 __asm__ __volatile__("@ atomic64_add_unless\n" 431 __asm__ __volatile__("@ atomic64_add_unless\n"
432"1: ldrexd %0, %H0, [%3]\n" 432"1: ldrexd %0, %H0, [%4]\n"
433" teq %0, %4\n" 433" teq %0, %5\n"
434" teqeq %H0, %H4\n" 434" teqeq %H0, %H5\n"
435" moveq %1, #0\n" 435" moveq %1, #0\n"
436" beq 2f\n" 436" beq 2f\n"
437" adds %0, %0, %5\n" 437" adds %0, %0, %6\n"
438" adc %H0, %H0, %H5\n" 438" adc %H0, %H0, %H6\n"
439" strexd %2, %0, %H0, [%3]\n" 439" strexd %2, %0, %H0, [%4]\n"
440" teq %2, #0\n" 440" teq %2, #0\n"
441" bne 1b\n" 441" bne 1b\n"
442"2:" 442"2:"
443 : "=&r" (val), "=&r" (ret), "=&r" (tmp) 443 : "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter)
444 : "r" (&v->counter), "r" (u), "r" (a) 444 : "r" (&v->counter), "r" (u), "r" (a)
445 : "cc"); 445 : "cc");
446 446
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 7ee48e7f8f3..3fd7861de4d 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -162,8 +162,6 @@ ENDPROC(__und_invalid)
162 @ r4 - orig_r0 (see pt_regs definition in ptrace.h) 162 @ r4 - orig_r0 (see pt_regs definition in ptrace.h)
163 @ 163 @
164 stmia r5, {r0 - r4} 164 stmia r5, {r0 - r4}
165
166 asm_trace_hardirqs_off
167 .endm 165 .endm
168 166
169 .align 5 167 .align 5
@@ -204,7 +202,7 @@ __dabt_svc:
204 @ 202 @
205 @ IRQs off again before pulling preserved data off the stack 203 @ IRQs off again before pulling preserved data off the stack
206 @ 204 @
207 disable_irq 205 disable_irq_notrace
208 206
209 @ 207 @
210 @ restore SPSR and restart the instruction 208 @ restore SPSR and restart the instruction
@@ -218,6 +216,9 @@ ENDPROC(__dabt_svc)
218__irq_svc: 216__irq_svc:
219 svc_entry 217 svc_entry
220 218
219#ifdef CONFIG_TRACE_IRQFLAGS
220 bl trace_hardirqs_off
221#endif
221#ifdef CONFIG_PREEMPT 222#ifdef CONFIG_PREEMPT
222 get_thread_info tsk 223 get_thread_info tsk
223 ldr r8, [tsk, #TI_PREEMPT] @ get preempt count 224 ldr r8, [tsk, #TI_PREEMPT] @ get preempt count
@@ -291,7 +292,7 @@ __und_svc:
291 @ 292 @
292 @ IRQs off again before pulling preserved data off the stack 293 @ IRQs off again before pulling preserved data off the stack
293 @ 294 @
2941: disable_irq 2951: disable_irq_notrace
295 296
296 @ 297 @
297 @ restore SPSR and restart the instruction 298 @ restore SPSR and restart the instruction
@@ -327,7 +328,7 @@ __pabt_svc:
327 @ 328 @
328 @ IRQs off again before pulling preserved data off the stack 329 @ IRQs off again before pulling preserved data off the stack
329 @ 330 @
330 disable_irq 331 disable_irq_notrace
331 332
332 @ 333 @
333 @ restore SPSR and restart the instruction 334 @ restore SPSR and restart the instruction
@@ -393,8 +394,6 @@ ENDPROC(__pabt_svc)
393 @ Clear FP to mark the first stack frame 394 @ Clear FP to mark the first stack frame
394 @ 395 @
395 zero_fp 396 zero_fp
396
397 asm_trace_hardirqs_off
398 .endm 397 .endm
399 398
400 .macro kuser_cmpxchg_check 399 .macro kuser_cmpxchg_check
@@ -465,9 +464,6 @@ __irq_usr:
465 THUMB( movne r0, #0 ) 464 THUMB( movne r0, #0 )
466 THUMB( strne r0, [r0] ) 465 THUMB( strne r0, [r0] )
467#endif 466#endif
468#ifdef CONFIG_TRACE_IRQFLAGS
469 bl trace_hardirqs_on
470#endif
471 467
472 mov why, #0 468 mov why, #0
473 b ret_to_user 469 b ret_to_user
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c
index da1f94906a4..8bccbfa693f 100644
--- a/arch/arm/kernel/kprobes-decode.c
+++ b/arch/arm/kernel/kprobes-decode.c
@@ -583,13 +583,14 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs)
583{ 583{
584 insn_llret_3arg_fn_t *i_fn = (insn_llret_3arg_fn_t *)&p->ainsn.insn[0]; 584 insn_llret_3arg_fn_t *i_fn = (insn_llret_3arg_fn_t *)&p->ainsn.insn[0];
585 kprobe_opcode_t insn = p->opcode; 585 kprobe_opcode_t insn = p->opcode;
586 long ppc = (long)p->addr + 8;
586 union reg_pair fnr; 587 union reg_pair fnr;
587 int rd = (insn >> 12) & 0xf; 588 int rd = (insn >> 12) & 0xf;
588 int rn = (insn >> 16) & 0xf; 589 int rn = (insn >> 16) & 0xf;
589 int rm = insn & 0xf; 590 int rm = insn & 0xf;
590 long rdv; 591 long rdv;
591 long rnv = regs->uregs[rn]; 592 long rnv = (rn == 15) ? ppc : regs->uregs[rn];
592 long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */ 593 long rmv = (rm == 15) ? ppc : regs->uregs[rm];
593 long cpsr = regs->ARM_cpsr; 594 long cpsr = regs->ARM_cpsr;
594 595
595 fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn); 596 fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn);
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index acf5e6fdb6d..a4a9cc88bec 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -351,17 +351,21 @@ EXPORT_SYMBOL(dump_fpu);
351 351
352/* 352/*
353 * Shuffle the argument into the correct register before calling the 353 * Shuffle the argument into the correct register before calling the
354 * thread function. r1 is the thread argument, r2 is the pointer to 354 * thread function. r4 is the thread argument, r5 is the pointer to
355 * the thread function, and r3 points to the exit function. 355 * the thread function, and r6 points to the exit function.
356 */ 356 */
357extern void kernel_thread_helper(void); 357extern void kernel_thread_helper(void);
358asm( ".pushsection .text\n" 358asm( ".pushsection .text\n"
359" .align\n" 359" .align\n"
360" .type kernel_thread_helper, #function\n" 360" .type kernel_thread_helper, #function\n"
361"kernel_thread_helper:\n" 361"kernel_thread_helper:\n"
362" mov r0, r1\n" 362#ifdef CONFIG_TRACE_IRQFLAGS
363" mov lr, r3\n" 363" bl trace_hardirqs_on\n"
364" mov pc, r2\n" 364#endif
365" msr cpsr_c, r7\n"
366" mov r0, r4\n"
367" mov lr, r6\n"
368" mov pc, r5\n"
365" .size kernel_thread_helper, . - kernel_thread_helper\n" 369" .size kernel_thread_helper, . - kernel_thread_helper\n"
366" .popsection"); 370" .popsection");
367 371
@@ -391,11 +395,12 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
391 395
392 memset(&regs, 0, sizeof(regs)); 396 memset(&regs, 0, sizeof(regs));
393 397
394 regs.ARM_r1 = (unsigned long)arg; 398 regs.ARM_r4 = (unsigned long)arg;
395 regs.ARM_r2 = (unsigned long)fn; 399 regs.ARM_r5 = (unsigned long)fn;
396 regs.ARM_r3 = (unsigned long)kernel_thread_exit; 400 regs.ARM_r6 = (unsigned long)kernel_thread_exit;
401 regs.ARM_r7 = SVC_MODE | PSR_ENDSTATE | PSR_ISETSTATE;
397 regs.ARM_pc = (unsigned long)kernel_thread_helper; 402 regs.ARM_pc = (unsigned long)kernel_thread_helper;
398 regs.ARM_cpsr = SVC_MODE | PSR_ENDSTATE | PSR_ISETSTATE; 403 regs.ARM_cpsr = regs.ARM_r7 | PSR_I_BIT;
399 404
400 return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); 405 return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
401} 406}
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index fe84b9021c7..0a1318fc8e2 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -131,7 +131,7 @@ EXPORT_SYMBOL(clk_disable);
131 */ 131 */
132static unsigned long clk_mtu_get_rate(struct clk *clk) 132static unsigned long clk_mtu_get_rate(struct clk *clk)
133{ 133{
134 void __iomem *addr = __io_address(U8500_PRCMU_BASE) 134 void __iomem *addr = __io_address(UX500_PRCMU_BASE)
135 + PRCM_TCR; 135 + PRCM_TCR;
136 u32 tcr = readl(addr); 136 u32 tcr = readl(addr);
137 int mtu = (int) clk->data; 137 int mtu = (int) clk->data;
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c
index 6a3ac4539f1..e9278f6d67a 100644
--- a/arch/arm/mach-ux500/cpu-db5500.c
+++ b/arch/arm/mach-ux500/cpu-db5500.c
@@ -21,6 +21,7 @@ static struct map_desc u5500_io_desc[] __initdata = {
21 __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K), 21 __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K),
22 __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K), 22 __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K),
23 __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K), 23 __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K),
24 __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
24}; 25};
25 26
26static struct platform_device *u5500_platform_devs[] __initdata = { 27static struct platform_device *u5500_platform_devs[] __initdata = {
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 9819869d2bc..df4955885b2 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -218,6 +218,9 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
218 cache_id = readl(l2x0_base + L2X0_CACHE_ID); 218 cache_id = readl(l2x0_base + L2X0_CACHE_ID);
219 aux = readl(l2x0_base + L2X0_AUX_CTRL); 219 aux = readl(l2x0_base + L2X0_AUX_CTRL);
220 220
221 aux &= aux_mask;
222 aux |= aux_val;
223
221 /* Determine the number of ways */ 224 /* Determine the number of ways */
222 switch (cache_id & L2X0_CACHE_ID_PART_MASK) { 225 switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
223 case L2X0_CACHE_ID_PART_L310: 226 case L2X0_CACHE_ID_PART_L310:
@@ -248,8 +251,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
248 if (!(readl(l2x0_base + L2X0_CTRL) & 1)) { 251 if (!(readl(l2x0_base + L2X0_CTRL) & 1)) {
249 252
250 /* l2x0 controller is disabled */ 253 /* l2x0 controller is disabled */
251 aux &= aux_mask;
252 aux |= aux_val;
253 writel(aux, l2x0_base + L2X0_AUX_CTRL); 254 writel(aux, l2x0_base + L2X0_AUX_CTRL);
254 255
255 l2x0_inv_all(); 256 l2x0_inv_all();
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 8f10d24ae62..48cbdcb6bbd 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Sat May 1 10:36:42 2010 15# Last update: Mon Jul 12 21:10:14 2010
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1994,7 +1994,7 @@ spark MACH_SPARK SPARK 2002
1994benzina MACH_BENZINA BENZINA 2003 1994benzina MACH_BENZINA BENZINA 2003
1995blaze MACH_BLAZE BLAZE 2004 1995blaze MACH_BLAZE BLAZE 2004
1996linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005 1996linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005
1997htckovsky MACH_HTCVENUS HTCVENUS 2006 1997htckovsky MACH_HTCKOVSKY HTCKOVSKY 2006
1998sony_prs505 MACH_SONY_PRS505 SONY_PRS505 2007 1998sony_prs505 MACH_SONY_PRS505 SONY_PRS505 2007
1999hanlin_v3 MACH_HANLIN_V3 HANLIN_V3 2008 1999hanlin_v3 MACH_HANLIN_V3 HANLIN_V3 2008
2000sapphira MACH_SAPPHIRA SAPPHIRA 2009 2000sapphira MACH_SAPPHIRA SAPPHIRA 2009
@@ -2609,7 +2609,7 @@ fujitsu_tvstbsoc1 MACH_FUJITSU_TVSTBSOC1 FUJITSU_TVSTBSOC1 2621
2609lexikon MACH_LEXIKON LEXIKON 2622 2609lexikon MACH_LEXIKON LEXIKON 2622
2610mini2440v2 MACH_MINI2440V2 MINI2440V2 2623 2610mini2440v2 MACH_MINI2440V2 MINI2440V2 2623
2611icontrol MACH_ICONTROL ICONTROL 2624 2611icontrol MACH_ICONTROL ICONTROL 2624
2612sheevad MACH_SHEEVAD SHEEVAD 2625 2612gplugd MACH_SHEEVAD SHEEVAD 2625
2613qsd8x50a_st1_1 MACH_QSD8X50A_ST1_1 QSD8X50A_ST1_1 2626 2613qsd8x50a_st1_1 MACH_QSD8X50A_ST1_1 QSD8X50A_ST1_1 2626
2614qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627 2614qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627
2615bee MACH_BEE BEE 2628 2615bee MACH_BEE BEE 2628
@@ -2804,3 +2804,149 @@ teton_bga MACH_TETON_BGA TETON_BGA 2816
2804snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817 2804snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817
2805tam3517 MACH_TAM3517 TAM3517 2818 2805tam3517 MACH_TAM3517 TAM3517 2818
2806pdc100 MACH_PDC100 PDC100 2819 2806pdc100 MACH_PDC100 PDC100 2819
2807eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820
2808eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821
2809eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822
2810eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823
2811p565 MACH_P565 P565 2824
2812acer_a4 MACH_ACER_A4 ACER_A4 2825
2813davinci_dm368_bip MACH_DAVINCI_DM368_BIP DAVINCI_DM368_BIP 2826
2814eshare MACH_ESHARE ESHARE 2827
2815hw_omapl138_europa MACH_HW_OMAPL138_EUROPA HW_OMAPL138_EUROPA 2828
2816wlbargn MACH_WLBARGN WLBARGN 2829
2817bm170 MACH_BM170 BM170 2830
2818netspace_mini_v2 MACH_NETSPACE_MINI_V2 NETSPACE_MINI_V2 2831
2819netspace_plug_v2 MACH_NETSPACE_PLUG_V2 NETSPACE_PLUG_V2 2832
2820siemens_l1 MACH_SIEMENS_L1 SIEMENS_L1 2833
2821elv_lcu1 MACH_ELV_LCU1 ELV_LCU1 2834
2822mcu1 MACH_MCU1 MCU1 2835
2823omap3_tao3530 MACH_OMAP3_TAO3530 OMAP3_TAO3530 2836
2824omap3_pcutouch MACH_OMAP3_PCUTOUCH OMAP3_PCUTOUCH 2837
2825smdkc210 MACH_SMDKC210 SMDKC210 2838
2826omap3_braillo MACH_OMAP3_BRAILLO OMAP3_BRAILLO 2839
2827spyplug MACH_SPYPLUG SPYPLUG 2840
2828ginger MACH_GINGER GINGER 2841
2829tny_t3530 MACH_TNY_T3530 TNY_T3530 2842
2830pca102 MACH_PCA102 PCA102 2843
2831spade MACH_SPADE SPADE 2844
2832mxc25_topaz MACH_MXC25_TOPAZ MXC25_TOPAZ 2845
2833t5325 MACH_T5325 T5325 2846
2834gw2361 MACH_GW2361 GW2361 2847
2835elog MACH_ELOG ELOG 2848
2836income MACH_INCOME INCOME 2849
2837bcm589x MACH_BCM589X BCM589X 2850
2838etna MACH_ETNA ETNA 2851
2839hawks MACH_HAWKS HAWKS 2852
2840meson MACH_MESON MESON 2853
2841xsbase255 MACH_XSBASE255 XSBASE255 2854
2842pvm2030 MACH_PVM2030 PVM2030 2855
2843mioa502 MACH_MIOA502 MIOA502 2856
2844vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857
2845vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858
2846vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859
2847htc_spv_m700 MACH_HTC_SPV_M700 HTC_SPV_M700 2860
2848mx257sx MACH_MX257SX MX257SX 2861
2849goni MACH_GONI GONI 2862
2850msm8x55_svlte_ffa MACH_MSM8X55_SVLTE_FFA MSM8X55_SVLTE_FFA 2863
2851msm8x55_svlte_surf MACH_MSM8X55_SVLTE_SURF MSM8X55_SVLTE_SURF 2864
2852quickstep MACH_QUICKSTEP QUICKSTEP 2865
2853dmw96 MACH_DMW96 DMW96 2866
2854hammerhead MACH_HAMMERHEAD HAMMERHEAD 2867
2855trident MACH_TRIDENT TRIDENT 2868
2856lightning MACH_LIGHTNING LIGHTNING 2869
2857iconnect MACH_ICONNECT ICONNECT 2870
2858autobot MACH_AUTOBOT AUTOBOT 2871
2859coconut MACH_COCONUT COCONUT 2872
2860durian MACH_DURIAN DURIAN 2873
2861cayenne MACH_CAYENNE CAYENNE 2874
2862fuji MACH_FUJI FUJI 2875
2863synology_6282 MACH_SYNOLOGY_6282 SYNOLOGY_6282 2876
2864em1sy MACH_EM1SY EM1SY 2877
2865m502 MACH_M502 M502 2878
2866matrix518 MACH_MATRIX518 MATRIX518 2879
2867tiny_gurnard MACH_TINY_GURNARD TINY_GURNARD 2880
2868spear1310 MACH_SPEAR1310 SPEAR1310 2881
2869bv07 MACH_BV07 BV07 2882
2870mxt_td61 MACH_MXT_TD61 MXT_TD61 2883
2871openrd_ultimate MACH_OPENRD_ULTIMATE OPENRD_ULTIMATE 2884
2872devixp MACH_DEVIXP DEVIXP 2885
2873miccpt MACH_MICCPT MICCPT 2886
2874mic256 MACH_MIC256 MIC256 2887
2875as1167 MACH_AS1167 AS1167 2888
2876omap3_ibiza MACH_OMAP3_IBIZA OMAP3_IBIZA 2889
2877u5500 MACH_U5500 U5500 2890
2878davinci_picto MACH_DAVINCI_PICTO DAVINCI_PICTO 2891
2879mecha MACH_MECHA MECHA 2892
2880bubba3 MACH_BUBBA3 BUBBA3 2893
2881pupitre MACH_PUPITRE PUPITRE 2894
2882tegra_harmony MACH_TEGRA_HARMONY TEGRA_HARMONY 2895
2883tegra_vogue MACH_TEGRA_VOGUE TEGRA_VOGUE 2896
2884tegra_e1165 MACH_TEGRA_E1165 TEGRA_E1165 2897
2885simplenet MACH_SIMPLENET SIMPLENET 2898
2886ec4350tbm MACH_EC4350TBM EC4350TBM 2899
2887pec_tc MACH_PEC_TC PEC_TC 2900
2888pec_hc2 MACH_PEC_HC2 PEC_HC2 2901
2889esl_mobilis_a MACH_ESL_MOBILIS_A ESL_MOBILIS_A 2902
2890esl_mobilis_b MACH_ESL_MOBILIS_B ESL_MOBILIS_B 2903
2891esl_wave_a MACH_ESL_WAVE_A ESL_WAVE_A 2904
2892esl_wave_b MACH_ESL_WAVE_B ESL_WAVE_B 2905
2893unisense_mmm MACH_UNISENSE_MMM UNISENSE_MMM 2906
2894blueshark MACH_BLUESHARK BLUESHARK 2907
2895e10 MACH_E10 E10 2908
2896app3k_robin MACH_APP3K_ROBIN APP3K_ROBIN 2909
2897pov15hd MACH_POV15HD POV15HD 2910
2898stella MACH_STELLA STELLA 2911
2899linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913
2900netwalker MACH_NETWALKER NETWALKER 2914
2901acsx106 MACH_ACSX106 ACSX106 2915
2902atlas5_c1 MACH_ATLAS5_C1 ATLAS5_C1 2916
2903nsb3ast MACH_NSB3AST NSB3AST 2917
2904gnet_slc MACH_GNET_SLC GNET_SLC 2918
2905af4000 MACH_AF4000 AF4000 2919
2906ark9431 MACH_ARK9431 ARK9431 2920
2907fs_s5pc100 MACH_FS_S5PC100 FS_S5PC100 2921
2908omap3505nova8 MACH_OMAP3505NOVA8 OMAP3505NOVA8 2922
2909omap3621_edp1 MACH_OMAP3621_EDP1 OMAP3621_EDP1 2923
2910oratisaes MACH_ORATISAES ORATISAES 2924
2911smdkv310 MACH_SMDKV310 SMDKV310 2925
2912siemens_l0 MACH_SIEMENS_L0 SIEMENS_L0 2926
2913ventana MACH_VENTANA VENTANA 2927
2914wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928
2915ec4350sdb MACH_EC4350SDB EC4350SDB 2929
2916mimas MACH_MIMAS MIMAS 2930
2917titan MACH_TITAN TITAN 2931
2918craneboard MACH_CRANEBOARD CRANEBOARD 2932
2919es2440 MACH_ES2440 ES2440 2933
2920najay_a9263 MACH_NAJAY_A9263 NAJAY_A9263 2934
2921htctornado MACH_HTCTORNADO HTCTORNADO 2935
2922dimm_mx257 MACH_DIMM_MX257 DIMM_MX257 2936
2923jigen301 MACH_JIGEN JIGEN 2937
2924smdk6450 MACH_SMDK6450 SMDK6450 2938
2925meno_qng MACH_MENO_QNG MENO_QNG 2939
2926ns2416 MACH_NS2416 NS2416 2940
2927rpc353 MACH_RPC353 RPC353 2941
2928tq6410 MACH_TQ6410 TQ6410 2942
2929sky6410 MACH_SKY6410 SKY6410 2943
2930dynasty MACH_DYNASTY DYNASTY 2944
2931vivo MACH_VIVO VIVO 2945
2932bury_bl7582 MACH_BURY_BL7582 BURY_BL7582 2946
2933bury_bps5270 MACH_BURY_BPS5270 BURY_BPS5270 2947
2934basi MACH_BASI BASI 2948
2935tn200 MACH_TN200 TN200 2949
2936c2mmi MACH_C2MMI C2MMI 2950
2937meson_6236m MACH_MESON_6236M MESON_6236M 2951
2938meson_8626m MACH_MESON_8626M MESON_8626M 2952
2939tube MACH_TUBE TUBE 2953
2940messina MACH_MESSINA MESSINA 2954
2941mx50_arm2 MACH_MX50_ARM2 MX50_ARM2 2955
2942cetus9263 MACH_CETUS9263 CETUS9263 2956
2943brownstone MACH_BROWNSTONE BROWNSTONE 2957
2944vmx25 MACH_VMX25 VMX25 2958
2945vmx51 MACH_VMX51 VMX51 2959
2946abacus MACH_ABACUS ABACUS 2960
2947cm4745 MACH_CM4745 CM4745 2961
2948oratislink MACH_ORATISLINK ORATISLINK 2962
2949davinci_dm365_dvr MACH_DAVINCI_DM365_DVR DAVINCI_DM365_DVR 2963
2950netviz MACH_NETVIZ NETVIZ 2964
2951flexibity MACH_FLEXIBITY FLEXIBITY 2965
2952wlan_computer MACH_WLAN_COMPUTER WLAN_COMPUTER 2966