Browse Source

Merge branch 'for-rmk-2.6.32' of git://git.pengutronix.de/git/ukl/linux-2.6 into devel-stable

Russell King 15 years ago
parent
commit
9b2616c2e8

+ 2 - 113
arch/arm/Kconfig

@@ -965,18 +965,7 @@ config LOCAL_TIMERS
 	  accounting to be spread across the timer interval, preventing a
 	  accounting to be spread across the timer interval, preventing a
 	  "thundering herd" at every timer tick.
 	  "thundering herd" at every timer tick.
 
 
-config PREEMPT
-	bool "Preemptible Kernel (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
-	help
-	  This option reduces the latency of the kernel when reacting to
-	  real-time or interactive events by allowing a low priority process to
-	  be preempted even if it is in kernel mode executing a system call.
-	  This allows applications to run more reliably even when the system is
-	  under load.
-
-	  Say Y here if you are building a kernel for a desktop, embedded
-	  or real-time system.  Say N if you are unsure.
+source kernel/Kconfig.preempt
 
 
 config HZ
 config HZ
 	int
 	int
@@ -1395,107 +1384,7 @@ endmenu
 
 
 source "net/Kconfig"
 source "net/Kconfig"
 
 
-menu "Device Drivers"
-
-source "drivers/base/Kconfig"
-
-source "drivers/connector/Kconfig"
-
-if ALIGNMENT_TRAP || !CPU_CP15_MMU
-source "drivers/mtd/Kconfig"
-endif
-
-source "drivers/parport/Kconfig"
-
-source "drivers/pnp/Kconfig"
-
-source "drivers/block/Kconfig"
-
-# misc before ide - BLK_DEV_SGIIOC4 depends on SGI_IOC4
-
-source "drivers/misc/Kconfig"
-
-source "drivers/ide/Kconfig"
-
-source "drivers/scsi/Kconfig"
-
-source "drivers/ata/Kconfig"
-
-source "drivers/md/Kconfig"
-
-source "drivers/message/fusion/Kconfig"
-
-source "drivers/ieee1394/Kconfig"
-
-source "drivers/message/i2o/Kconfig"
-
-source "drivers/net/Kconfig"
-
-source "drivers/isdn/Kconfig"
-
-# input before char - char/joystick depends on it. As does USB.
-
-source "drivers/input/Kconfig"
-
-source "drivers/char/Kconfig"
-
-source "drivers/i2c/Kconfig"
-
-source "drivers/spi/Kconfig"
-
-source "drivers/gpio/Kconfig"
-
-source "drivers/w1/Kconfig"
-
-source "drivers/power/Kconfig"
-
-source "drivers/hwmon/Kconfig"
-
-source "drivers/thermal/Kconfig"
-
-source "drivers/watchdog/Kconfig"
-
-source "drivers/ssb/Kconfig"
-
-#source "drivers/l3/Kconfig"
-
-source "drivers/mfd/Kconfig"
-
-source "drivers/media/Kconfig"
-
-source "drivers/video/Kconfig"
-
-source "sound/Kconfig"
-
-source "drivers/hid/Kconfig"
-
-source "drivers/usb/Kconfig"
-
-source "drivers/uwb/Kconfig"
-
-source "drivers/mmc/Kconfig"
-
-source "drivers/memstick/Kconfig"
-
-source "drivers/accessibility/Kconfig"
-
-source "drivers/leds/Kconfig"
-
-source "drivers/rtc/Kconfig"
-
-source "drivers/dma/Kconfig"
-
-source "drivers/dca/Kconfig"
-
-source "drivers/auxdisplay/Kconfig"
-
-source "drivers/regulator/Kconfig"
-
-source "drivers/uio/Kconfig"
-
-source "drivers/staging/Kconfig"
-
-endmenu
+source "drivers/Kconfig"
 
 
 source "fs/Kconfig"
 source "fs/Kconfig"
 
 

+ 44 - 5
arch/arm/include/asm/assembler.h

@@ -74,23 +74,56 @@
  * Enable and disable interrupts
  * Enable and disable interrupts
  */
  */
 #if __LINUX_ARM_ARCH__ >= 6
 #if __LINUX_ARM_ARCH__ >= 6
-	.macro	disable_irq
+	.macro	disable_irq_notrace
 	cpsid	i
 	cpsid	i
 	.endm
 	.endm
 
 
-	.macro	enable_irq
+	.macro	enable_irq_notrace
 	cpsie	i
 	cpsie	i
 	.endm
 	.endm
 #else
 #else
-	.macro	disable_irq
+	.macro	disable_irq_notrace
 	msr	cpsr_c, #PSR_I_BIT | SVC_MODE
 	msr	cpsr_c, #PSR_I_BIT | SVC_MODE
 	.endm
 	.endm
 
 
-	.macro	enable_irq
+	.macro	enable_irq_notrace
 	msr	cpsr_c, #SVC_MODE
 	msr	cpsr_c, #SVC_MODE
 	.endm
 	.endm
 #endif
 #endif
 
 
+	.macro asm_trace_hardirqs_off
+#if defined(CONFIG_TRACE_IRQFLAGS)
+	stmdb   sp!, {r0-r3, ip, lr}
+	bl	trace_hardirqs_off
+	ldmia	sp!, {r0-r3, ip, lr}
+#endif
+	.endm
+
+	.macro asm_trace_hardirqs_on_cond, cond
+#if defined(CONFIG_TRACE_IRQFLAGS)
+	/*
+	 * actually the registers should be pushed and pop'd conditionally, but
+	 * after bl the flags are certainly clobbered
+	 */
+	stmdb   sp!, {r0-r3, ip, lr}
+	bl\cond	trace_hardirqs_on
+	ldmia	sp!, {r0-r3, ip, lr}
+#endif
+	.endm
+
+	.macro asm_trace_hardirqs_on
+	asm_trace_hardirqs_on_cond al
+	.endm
+
+	.macro disable_irq
+	disable_irq_notrace
+	asm_trace_hardirqs_off
+	.endm
+
+	.macro enable_irq
+	asm_trace_hardirqs_on
+	enable_irq_notrace
+	.endm
 /*
 /*
  * Save the current IRQ state and disable IRQs.  Note that this macro
  * Save the current IRQ state and disable IRQs.  Note that this macro
  * assumes FIQs are enabled, and that the processor is in SVC mode.
  * assumes FIQs are enabled, and that the processor is in SVC mode.
@@ -104,10 +137,16 @@
  * Restore interrupt state previously stored in a register.  We don't
  * Restore interrupt state previously stored in a register.  We don't
  * guarantee that this will preserve the flags.
  * guarantee that this will preserve the flags.
  */
  */
-	.macro	restore_irqs, oldcpsr
+	.macro	restore_irqs_notrace, oldcpsr
 	msr	cpsr_c, \oldcpsr
 	msr	cpsr_c, \oldcpsr
 	.endm
 	.endm
 
 
+	.macro restore_irqs, oldcpsr
+	tst	\oldcpsr, #PSR_I_BIT
+	asm_trace_hardirqs_on_cond eq
+	restore_irqs_notrace \oldcpsr
+	.endm
+
 #define USER(x...)				\
 #define USER(x...)				\
 9999:	x;					\
 9999:	x;					\
 	.section __ex_table,"a";		\
 	.section __ex_table,"a";		\

+ 1 - 0
arch/arm/include/asm/ftrace.h

@@ -7,6 +7,7 @@
 
 
 #ifndef __ASSEMBLY__
 #ifndef __ASSEMBLY__
 extern void mcount(void);
 extern void mcount(void);
+extern void __gnu_mcount_nc(void);
 #endif
 #endif
 
 
 #endif
 #endif

+ 1 - 0
arch/arm/kernel/armksyms.c

@@ -186,4 +186,5 @@ EXPORT_SYMBOL(_find_next_bit_be);
 
 
 #ifdef CONFIG_FUNCTION_TRACER
 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(mcount);
 EXPORT_SYMBOL(mcount);
+EXPORT_SYMBOL(__gnu_mcount_nc);
 #endif
 #endif

+ 4 - 6
arch/arm/kernel/entry-armv.S

@@ -161,6 +161,8 @@ ENDPROC(__und_invalid)
 	@  r4 - orig_r0 (see pt_regs definition in ptrace.h)
 	@  r4 - orig_r0 (see pt_regs definition in ptrace.h)
 	@
 	@
 	stmia	r5, {r0 - r4}
 	stmia	r5, {r0 - r4}
+
+	asm_trace_hardirqs_off
 	.endm
 	.endm
 
 
 	.align	5
 	.align	5
@@ -215,9 +217,6 @@ ENDPROC(__dabt_svc)
 __irq_svc:
 __irq_svc:
 	svc_entry
 	svc_entry
 
 
-#ifdef CONFIG_TRACE_IRQFLAGS
-	bl	trace_hardirqs_off
-#endif
 #ifdef CONFIG_PREEMPT
 #ifdef CONFIG_PREEMPT
 	get_thread_info tsk
 	get_thread_info tsk
 	ldr	r8, [tsk, #TI_PREEMPT]		@ get preempt count
 	ldr	r8, [tsk, #TI_PREEMPT]		@ get preempt count
@@ -391,6 +390,8 @@ ENDPROC(__pabt_svc)
 	@ Clear FP to mark the first stack frame
 	@ Clear FP to mark the first stack frame
 	@
 	@
 	zero_fp
 	zero_fp
+
+	asm_trace_hardirqs_off
 	.endm
 	.endm
 
 
 	.macro	kuser_cmpxchg_check
 	.macro	kuser_cmpxchg_check
@@ -445,9 +446,6 @@ __irq_usr:
 	usr_entry
 	usr_entry
 	kuser_cmpxchg_check
 	kuser_cmpxchg_check
 
 
-#ifdef CONFIG_TRACE_IRQFLAGS
-	bl	trace_hardirqs_off
-#endif
 	get_thread_info tsk
 	get_thread_info tsk
 #ifdef CONFIG_PREEMPT
 #ifdef CONFIG_PREEMPT
 	ldr	r8, [tsk, #TI_PREEMPT]		@ get preempt count
 	ldr	r8, [tsk, #TI_PREEMPT]		@ get preempt count

+ 19 - 0
arch/arm/kernel/entry-common.S

@@ -118,6 +118,25 @@ ftrace_call:
 
 
 #else
 #else
 
 
+ENTRY(__gnu_mcount_nc)
+	stmdb sp!, {r0-r3, lr}
+	ldr r0, =ftrace_trace_function
+	ldr r2, [r0]
+	adr r0, ftrace_stub
+	cmp r0, r2
+	bne gnu_trace
+	ldmia sp!, {r0-r3, ip, lr}
+	bx ip
+
+gnu_trace:
+	ldr r1, [sp, #20]			@ lr of instrumented routine
+	mov r0, lr
+	sub r0, r0, #MCOUNT_INSN_SIZE
+	mov lr, pc
+	mov pc, r2
+	ldmia sp!, {r0-r3, ip, lr}
+	bx ip
+
 ENTRY(mcount)
 ENTRY(mcount)
 	stmdb sp!, {r0-r3, lr}
 	stmdb sp!, {r0-r3, lr}
 	ldr r0, =ftrace_trace_function
 	ldr r0, =ftrace_trace_function

+ 1 - 1
arch/arm/lib/bitops.h

@@ -60,8 +60,8 @@
 	tst	r2, r0, lsl r3
 	tst	r2, r0, lsl r3
 	\instr	r2, r2, r0, lsl r3
 	\instr	r2, r2, r0, lsl r3
 	\store	r2, [r1]
 	\store	r2, [r1]
-	restore_irqs ip
 	moveq	r0, #0
 	moveq	r0, #0
+	restore_irqs ip
 	mov	pc, lr
 	mov	pc, lr
 	.endm
 	.endm
 #endif
 #endif

+ 1 - 3
arch/arm/mach-netx/include/mach/entry-macro.S

@@ -24,15 +24,13 @@
 		.endm
 		.endm
 
 
 		.macro  get_irqnr_preamble, base, tmp
 		.macro  get_irqnr_preamble, base, tmp
+		ldr	\base, =io_p2v(0x001ff000)
 		.endm
 		.endm
 
 
 		.macro  arch_ret_to_user, tmp1, tmp2
 		.macro  arch_ret_to_user, tmp1, tmp2
 		.endm
 		.endm
 
 
 		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	\base, #io_p2v(0x00100000)
-		add	\base, \base, #0x000ff000
-
 		ldr	\irqstat, [\base, #0]
 		ldr	\irqstat, [\base, #0]
 		clz	\irqnr, \irqstat
 		clz	\irqnr, \irqstat
 		rsb     \irqnr, \irqnr, #31
 		rsb     \irqnr, \irqnr, #31