diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-08-15 11:51:48 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-08-15 11:51:48 -0400 |
commit | 9b2616c2e8cc98ca98bbb40cad83a8d3d859e840 (patch) | |
tree | 5a971fa57298d58529d3ae82b68cbfc7139bde7b /arch | |
parent | 590a94d93475fa6cca257f161ae268ed3a2395b5 (diff) | |
parent | ac25150f2c55ea26447af0fa1d4e2bb07f97384d (diff) |
Merge branch 'for-rmk-2.6.32' of git://git.pengutronix.de/git/ukl/linux-2.6 into devel-stable
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 115 | ||||
-rw-r--r-- | arch/arm/include/asm/assembler.h | 49 | ||||
-rw-r--r-- | arch/arm/include/asm/ftrace.h | 1 | ||||
-rw-r--r-- | arch/arm/kernel/armksyms.c | 1 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 10 | ||||
-rw-r--r-- | arch/arm/kernel/entry-common.S | 19 | ||||
-rw-r--r-- | arch/arm/lib/bitops.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-netx/include/mach/entry-macro.S | 4 |
8 files changed, 73 insertions, 128 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dc70660fe6bd..9746667c1973 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -965,18 +965,7 @@ config LOCAL_TIMERS | |||
965 | accounting to be spread across the timer interval, preventing a | 965 | accounting to be spread across the timer interval, preventing a |
966 | "thundering herd" at every timer tick. | 966 | "thundering herd" at every timer tick. |
967 | 967 | ||
968 | config PREEMPT | 968 | source kernel/Kconfig.preempt |
969 | bool "Preemptible Kernel (EXPERIMENTAL)" | ||
970 | depends on EXPERIMENTAL | ||
971 | help | ||
972 | This option reduces the latency of the kernel when reacting to | ||
973 | real-time or interactive events by allowing a low priority process to | ||
974 | be preempted even if it is in kernel mode executing a system call. | ||
975 | This allows applications to run more reliably even when the system is | ||
976 | under load. | ||
977 | |||
978 | Say Y here if you are building a kernel for a desktop, embedded | ||
979 | or real-time system. Say N if you are unsure. | ||
980 | 969 | ||
981 | config HZ | 970 | config HZ |
982 | int | 971 | int |
@@ -1395,107 +1384,7 @@ endmenu | |||
1395 | 1384 | ||
1396 | source "net/Kconfig" | 1385 | source "net/Kconfig" |
1397 | 1386 | ||
1398 | menu "Device Drivers" | 1387 | source "drivers/Kconfig" |
1399 | |||
1400 | source "drivers/base/Kconfig" | ||
1401 | |||
1402 | source "drivers/connector/Kconfig" | ||
1403 | |||
1404 | if ALIGNMENT_TRAP || !CPU_CP15_MMU | ||
1405 | source "drivers/mtd/Kconfig" | ||
1406 | endif | ||
1407 | |||
1408 | source "drivers/parport/Kconfig" | ||
1409 | |||
1410 | source "drivers/pnp/Kconfig" | ||
1411 | |||
1412 | source "drivers/block/Kconfig" | ||
1413 | |||
1414 | # misc before ide - BLK_DEV_SGIIOC4 depends on SGI_IOC4 | ||
1415 | |||
1416 | source "drivers/misc/Kconfig" | ||
1417 | |||
1418 | source "drivers/ide/Kconfig" | ||
1419 | |||
1420 | source "drivers/scsi/Kconfig" | ||
1421 | |||
1422 | source "drivers/ata/Kconfig" | ||
1423 | |||
1424 | source "drivers/md/Kconfig" | ||
1425 | |||
1426 | source "drivers/message/fusion/Kconfig" | ||
1427 | |||
1428 | source "drivers/ieee1394/Kconfig" | ||
1429 | |||
1430 | source "drivers/message/i2o/Kconfig" | ||
1431 | |||
1432 | source "drivers/net/Kconfig" | ||
1433 | |||
1434 | source "drivers/isdn/Kconfig" | ||
1435 | |||
1436 | # input before char - char/joystick depends on it. As does USB. | ||
1437 | |||
1438 | source "drivers/input/Kconfig" | ||
1439 | |||
1440 | source "drivers/char/Kconfig" | ||
1441 | |||
1442 | source "drivers/i2c/Kconfig" | ||
1443 | |||
1444 | source "drivers/spi/Kconfig" | ||
1445 | |||
1446 | source "drivers/gpio/Kconfig" | ||
1447 | |||
1448 | source "drivers/w1/Kconfig" | ||
1449 | |||
1450 | source "drivers/power/Kconfig" | ||
1451 | |||
1452 | source "drivers/hwmon/Kconfig" | ||
1453 | |||
1454 | source "drivers/thermal/Kconfig" | ||
1455 | |||
1456 | source "drivers/watchdog/Kconfig" | ||
1457 | |||
1458 | source "drivers/ssb/Kconfig" | ||
1459 | |||
1460 | #source "drivers/l3/Kconfig" | ||
1461 | |||
1462 | source "drivers/mfd/Kconfig" | ||
1463 | |||
1464 | source "drivers/media/Kconfig" | ||
1465 | |||
1466 | source "drivers/video/Kconfig" | ||
1467 | |||
1468 | source "sound/Kconfig" | ||
1469 | |||
1470 | source "drivers/hid/Kconfig" | ||
1471 | |||
1472 | source "drivers/usb/Kconfig" | ||
1473 | |||
1474 | source "drivers/uwb/Kconfig" | ||
1475 | |||
1476 | source "drivers/mmc/Kconfig" | ||
1477 | |||
1478 | source "drivers/memstick/Kconfig" | ||
1479 | |||
1480 | source "drivers/accessibility/Kconfig" | ||
1481 | |||
1482 | source "drivers/leds/Kconfig" | ||
1483 | |||
1484 | source "drivers/rtc/Kconfig" | ||
1485 | |||
1486 | source "drivers/dma/Kconfig" | ||
1487 | |||
1488 | source "drivers/dca/Kconfig" | ||
1489 | |||
1490 | source "drivers/auxdisplay/Kconfig" | ||
1491 | |||
1492 | source "drivers/regulator/Kconfig" | ||
1493 | |||
1494 | source "drivers/uio/Kconfig" | ||
1495 | |||
1496 | source "drivers/staging/Kconfig" | ||
1497 | |||
1498 | endmenu | ||
1499 | 1388 | ||
1500 | source "fs/Kconfig" | 1389 | source "fs/Kconfig" |
1501 | 1390 | ||
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 2b60c7d05770..00f46d9ce299 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -74,23 +74,56 @@ | |||
74 | * Enable and disable interrupts | 74 | * Enable and disable interrupts |
75 | */ | 75 | */ |
76 | #if __LINUX_ARM_ARCH__ >= 6 | 76 | #if __LINUX_ARM_ARCH__ >= 6 |
77 | .macro disable_irq | 77 | .macro disable_irq_notrace |
78 | cpsid i | 78 | cpsid i |
79 | .endm | 79 | .endm |
80 | 80 | ||
81 | .macro enable_irq | 81 | .macro enable_irq_notrace |
82 | cpsie i | 82 | cpsie i |
83 | .endm | 83 | .endm |
84 | #else | 84 | #else |
85 | .macro disable_irq | 85 | .macro disable_irq_notrace |
86 | msr cpsr_c, #PSR_I_BIT | SVC_MODE | 86 | msr cpsr_c, #PSR_I_BIT | SVC_MODE |
87 | .endm | 87 | .endm |
88 | 88 | ||
89 | .macro enable_irq | 89 | .macro enable_irq_notrace |
90 | msr cpsr_c, #SVC_MODE | 90 | msr cpsr_c, #SVC_MODE |
91 | .endm | 91 | .endm |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | .macro asm_trace_hardirqs_off | ||
95 | #if defined(CONFIG_TRACE_IRQFLAGS) | ||
96 | stmdb sp!, {r0-r3, ip, lr} | ||
97 | bl trace_hardirqs_off | ||
98 | ldmia sp!, {r0-r3, ip, lr} | ||
99 | #endif | ||
100 | .endm | ||
101 | |||
102 | .macro asm_trace_hardirqs_on_cond, cond | ||
103 | #if defined(CONFIG_TRACE_IRQFLAGS) | ||
104 | /* | ||
105 | * actually the registers should be pushed and pop'd conditionally, but | ||
106 | * after bl the flags are certainly clobbered | ||
107 | */ | ||
108 | stmdb sp!, {r0-r3, ip, lr} | ||
109 | bl\cond trace_hardirqs_on | ||
110 | ldmia sp!, {r0-r3, ip, lr} | ||
111 | #endif | ||
112 | .endm | ||
113 | |||
114 | .macro asm_trace_hardirqs_on | ||
115 | asm_trace_hardirqs_on_cond al | ||
116 | .endm | ||
117 | |||
118 | .macro disable_irq | ||
119 | disable_irq_notrace | ||
120 | asm_trace_hardirqs_off | ||
121 | .endm | ||
122 | |||
123 | .macro enable_irq | ||
124 | asm_trace_hardirqs_on | ||
125 | enable_irq_notrace | ||
126 | .endm | ||
94 | /* | 127 | /* |
95 | * Save the current IRQ state and disable IRQs. Note that this macro | 128 | * Save the current IRQ state and disable IRQs. Note that this macro |
96 | * assumes FIQs are enabled, and that the processor is in SVC mode. | 129 | * assumes FIQs are enabled, and that the processor is in SVC mode. |
@@ -104,10 +137,16 @@ | |||
104 | * Restore interrupt state previously stored in a register. We don't | 137 | * Restore interrupt state previously stored in a register. We don't |
105 | * guarantee that this will preserve the flags. | 138 | * guarantee that this will preserve the flags. |
106 | */ | 139 | */ |
107 | .macro restore_irqs, oldcpsr | 140 | .macro restore_irqs_notrace, oldcpsr |
108 | msr cpsr_c, \oldcpsr | 141 | msr cpsr_c, \oldcpsr |
109 | .endm | 142 | .endm |
110 | 143 | ||
144 | .macro restore_irqs, oldcpsr | ||
145 | tst \oldcpsr, #PSR_I_BIT | ||
146 | asm_trace_hardirqs_on_cond eq | ||
147 | restore_irqs_notrace \oldcpsr | ||
148 | .endm | ||
149 | |||
111 | #define USER(x...) \ | 150 | #define USER(x...) \ |
112 | 9999: x; \ | 151 | 9999: x; \ |
113 | .section __ex_table,"a"; \ | 152 | .section __ex_table,"a"; \ |
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index 39c8bc1a006a..0d4c478e01b6 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
9 | extern void mcount(void); | 9 | extern void mcount(void); |
10 | extern void __gnu_mcount_nc(void); | ||
10 | #endif | 11 | #endif |
11 | 12 | ||
12 | #endif | 13 | #endif |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 531e1860e546..0e627705f746 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -186,4 +186,5 @@ EXPORT_SYMBOL(_find_next_bit_be); | |||
186 | 186 | ||
187 | #ifdef CONFIG_FUNCTION_TRACER | 187 | #ifdef CONFIG_FUNCTION_TRACER |
188 | EXPORT_SYMBOL(mcount); | 188 | EXPORT_SYMBOL(mcount); |
189 | EXPORT_SYMBOL(__gnu_mcount_nc); | ||
189 | #endif | 190 | #endif |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 468425f937dd..3d727a8a23bc 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -161,6 +161,8 @@ ENDPROC(__und_invalid) | |||
161 | @ r4 - orig_r0 (see pt_regs definition in ptrace.h) | 161 | @ r4 - orig_r0 (see pt_regs definition in ptrace.h) |
162 | @ | 162 | @ |
163 | stmia r5, {r0 - r4} | 163 | stmia r5, {r0 - r4} |
164 | |||
165 | asm_trace_hardirqs_off | ||
164 | .endm | 166 | .endm |
165 | 167 | ||
166 | .align 5 | 168 | .align 5 |
@@ -215,9 +217,6 @@ ENDPROC(__dabt_svc) | |||
215 | __irq_svc: | 217 | __irq_svc: |
216 | svc_entry | 218 | svc_entry |
217 | 219 | ||
218 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
219 | bl trace_hardirqs_off | ||
220 | #endif | ||
221 | #ifdef CONFIG_PREEMPT | 220 | #ifdef CONFIG_PREEMPT |
222 | get_thread_info tsk | 221 | get_thread_info tsk |
223 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | 222 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count |
@@ -391,6 +390,8 @@ ENDPROC(__pabt_svc) | |||
391 | @ Clear FP to mark the first stack frame | 390 | @ Clear FP to mark the first stack frame |
392 | @ | 391 | @ |
393 | zero_fp | 392 | zero_fp |
393 | |||
394 | asm_trace_hardirqs_off | ||
394 | .endm | 395 | .endm |
395 | 396 | ||
396 | .macro kuser_cmpxchg_check | 397 | .macro kuser_cmpxchg_check |
@@ -445,9 +446,6 @@ __irq_usr: | |||
445 | usr_entry | 446 | usr_entry |
446 | kuser_cmpxchg_check | 447 | kuser_cmpxchg_check |
447 | 448 | ||
448 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
449 | bl trace_hardirqs_off | ||
450 | #endif | ||
451 | get_thread_info tsk | 449 | get_thread_info tsk |
452 | #ifdef CONFIG_PREEMPT | 450 | #ifdef CONFIG_PREEMPT |
453 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | 451 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index a0540c9f1f0c..df19e8bf2e4a 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -118,6 +118,25 @@ ftrace_call: | |||
118 | 118 | ||
119 | #else | 119 | #else |
120 | 120 | ||
121 | ENTRY(__gnu_mcount_nc) | ||
122 | stmdb sp!, {r0-r3, lr} | ||
123 | ldr r0, =ftrace_trace_function | ||
124 | ldr r2, [r0] | ||
125 | adr r0, ftrace_stub | ||
126 | cmp r0, r2 | ||
127 | bne gnu_trace | ||
128 | ldmia sp!, {r0-r3, ip, lr} | ||
129 | bx ip | ||
130 | |||
131 | gnu_trace: | ||
132 | ldr r1, [sp, #20] @ lr of instrumented routine | ||
133 | mov r0, lr | ||
134 | sub r0, r0, #MCOUNT_INSN_SIZE | ||
135 | mov lr, pc | ||
136 | mov pc, r2 | ||
137 | ldmia sp!, {r0-r3, ip, lr} | ||
138 | bx ip | ||
139 | |||
121 | ENTRY(mcount) | 140 | ENTRY(mcount) |
122 | stmdb sp!, {r0-r3, lr} | 141 | stmdb sp!, {r0-r3, lr} |
123 | ldr r0, =ftrace_trace_function | 142 | ldr r0, =ftrace_trace_function |
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index c7f2627385e7..d42252918bfb 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h | |||
@@ -60,8 +60,8 @@ | |||
60 | tst r2, r0, lsl r3 | 60 | tst r2, r0, lsl r3 |
61 | \instr r2, r2, r0, lsl r3 | 61 | \instr r2, r2, r0, lsl r3 |
62 | \store r2, [r1] | 62 | \store r2, [r1] |
63 | restore_irqs ip | ||
64 | moveq r0, #0 | 63 | moveq r0, #0 |
64 | restore_irqs ip | ||
65 | mov pc, lr | 65 | mov pc, lr |
66 | .endm | 66 | .endm |
67 | #endif | 67 | #endif |
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S index a1952a0feda6..844f1f9acbdf 100644 --- a/arch/arm/mach-netx/include/mach/entry-macro.S +++ b/arch/arm/mach-netx/include/mach/entry-macro.S | |||
@@ -24,15 +24,13 @@ | |||
24 | .endm | 24 | .endm |
25 | 25 | ||
26 | .macro get_irqnr_preamble, base, tmp | 26 | .macro get_irqnr_preamble, base, tmp |
27 | ldr \base, =io_p2v(0x001ff000) | ||
27 | .endm | 28 | .endm |
28 | 29 | ||
29 | .macro arch_ret_to_user, tmp1, tmp2 | 30 | .macro arch_ret_to_user, tmp1, tmp2 |
30 | .endm | 31 | .endm |
31 | 32 | ||
32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 33 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
33 | mov \base, #io_p2v(0x00100000) | ||
34 | add \base, \base, #0x000ff000 | ||
35 | |||
36 | ldr \irqstat, [\base, #0] | 34 | ldr \irqstat, [\base, #0] |
37 | clz \irqnr, \irqstat | 35 | clz \irqnr, \irqstat |
38 | rsb \irqnr, \irqnr, #31 | 36 | rsb \irqnr, \irqnr, #31 |