Merge branch 'for-rmk-2.6.32' of git://git.pengutronix.de/git/ukl/linux-2.6 into...
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 15 Aug 2009 15:51:48 +0000 (16:51 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 15 Aug 2009 15:51:48 +0000 (16:51 +0100)
arch/arm/Kconfig
arch/arm/include/asm/assembler.h
arch/arm/include/asm/ftrace.h
arch/arm/kernel/armksyms.c
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/lib/bitops.h
arch/arm/mach-netx/include/mach/entry-macro.S

index dc70660fe6bd0b4555c3ba4c55560b46c1cf8469..9746667c197374755acbd1257afb1af308743845 100644 (file)
@@ -965,18 +965,7 @@ config LOCAL_TIMERS
          accounting to be spread across the timer interval, preventing a
          "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
        int
@@ -1395,107 +1384,7 @@ endmenu
 
 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"
 
index 2b60c7d05770754cd8055b7c25073c5f1de02a7e..00f46d9ce299310360ed89a8c19e2521db58e118 100644 (file)
  * Enable and disable interrupts
  */
 #if __LINUX_ARM_ARCH__ >= 6
-       .macro  disable_irq
+       .macro  disable_irq_notrace
        cpsid   i
        .endm
 
-       .macro  enable_irq
+       .macro  enable_irq_notrace
        cpsie   i
        .endm
 #else
-       .macro  disable_irq
+       .macro  disable_irq_notrace
        msr     cpsr_c, #PSR_I_BIT | SVC_MODE
        .endm
 
-       .macro  enable_irq
+       .macro  enable_irq_notrace
        msr     cpsr_c, #SVC_MODE
        .endm
 #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
  * assumes FIQs are enabled, and that the processor is in SVC mode.
  * Restore interrupt state previously stored in a register.  We don't
  * guarantee that this will preserve the flags.
  */
-       .macro  restore_irqs, oldcpsr
+       .macro  restore_irqs_notrace, oldcpsr
        msr     cpsr_c, \oldcpsr
        .endm
 
+       .macro restore_irqs, oldcpsr
+       tst     \oldcpsr, #PSR_I_BIT
+       asm_trace_hardirqs_on_cond eq
+       restore_irqs_notrace \oldcpsr
+       .endm
+
 #define USER(x...)                             \
 9999:  x;                                      \
        .section __ex_table,"a";                \
index 39c8bc1a006afbfbca896948ae86c4268e7ed52e..0d4c478e01b62829474ac487bcbe1cd09cecc379 100644 (file)
@@ -7,6 +7,7 @@
 
 #ifndef __ASSEMBLY__
 extern void mcount(void);
+extern void __gnu_mcount_nc(void);
 #endif
 
 #endif
index 531e1860e546dbf5e5a13016a16cf30aea061c96..0e627705f74632d9dab0ae5079bc5eb2910a83b3 100644 (file)
@@ -186,4 +186,5 @@ EXPORT_SYMBOL(_find_next_bit_be);
 
 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(mcount);
+EXPORT_SYMBOL(__gnu_mcount_nc);
 #endif
index 468425f937ddc9c9a5b8992f06ff79161debad5c..3d727a8a23bc8013749458c4a870da618ca7d772 100644 (file)
@@ -161,6 +161,8 @@ ENDPROC(__und_invalid)
        @  r4 - orig_r0 (see pt_regs definition in ptrace.h)
        @
        stmia   r5, {r0 - r4}
+
+       asm_trace_hardirqs_off
        .endm
 
        .align  5
@@ -215,9 +217,6 @@ ENDPROC(__dabt_svc)
 __irq_svc:
        svc_entry
 
-#ifdef CONFIG_TRACE_IRQFLAGS
-       bl      trace_hardirqs_off
-#endif
 #ifdef CONFIG_PREEMPT
        get_thread_info tsk
        ldr     r8, [tsk, #TI_PREEMPT]          @ get preempt count
@@ -391,6 +390,8 @@ ENDPROC(__pabt_svc)
        @ Clear FP to mark the first stack frame
        @
        zero_fp
+
+       asm_trace_hardirqs_off
        .endm
 
        .macro  kuser_cmpxchg_check
@@ -445,9 +446,6 @@ __irq_usr:
        usr_entry
        kuser_cmpxchg_check
 
-#ifdef CONFIG_TRACE_IRQFLAGS
-       bl      trace_hardirqs_off
-#endif
        get_thread_info tsk
 #ifdef CONFIG_PREEMPT
        ldr     r8, [tsk, #TI_PREEMPT]          @ get preempt count
index a0540c9f1f0c4491eaf9da0356941e393b60863d..df19e8bf2e4af00a9175383f6095504d87422c3f 100644 (file)
@@ -118,6 +118,25 @@ ftrace_call:
 
 #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)
        stmdb sp!, {r0-r3, lr}
        ldr r0, =ftrace_trace_function
index c7f2627385e719749a08241fcd0732e0d4e15996..d42252918bfb4e7b944dbda70e205ccb0ebcc87f 100644 (file)
@@ -60,8 +60,8 @@
        tst     r2, r0, lsl r3
        \instr  r2, r2, r0, lsl r3
        \store  r2, [r1]
-       restore_irqs ip
        moveq   r0, #0
+       restore_irqs ip
        mov     pc, lr
        .endm
 #endif
index a1952a0feda62535d44d288674f05e60e5eb0178..844f1f9acbdf09705f653563ed3a4052398d6a5e 100644 (file)
                .endm
 
                .macro  get_irqnr_preamble, base, tmp
+               ldr     \base, =io_p2v(0x001ff000)
                .endm
 
                .macro  arch_ret_to_user, tmp1, tmp2
                .endm
 
                .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-               mov     \base, #io_p2v(0x00100000)
-               add     \base, \base, #0x000ff000
-
                ldr     \irqstat, [\base, #0]
                clz     \irqnr, \irqstat
                rsb     \irqnr, \irqnr, #31
This page took 0.031604 seconds and 5 git commands to generate.