Blackfin: add support for irqflags tracing
authorYi Li <yi.li@analog.com>
Tue, 19 Jan 2010 04:35:28 +0000 (04:35 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 9 Mar 2010 05:30:49 +0000 (00:30 -0500)
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/include/asm/context.S
arch/blackfin/mach-common/entry.S
arch/blackfin/mach-common/interrupt.S

index fada8e974a734189c2115317a7582c143d596d00..1f9060395a0a7f767e53bcea97f6f83fa6a787f1 100644 (file)
        sti r0;
 #else
        cli r0;
+#endif
+#ifdef CONFIG_TRACE_IRQFLAGS
+       sp += -12;
+       call _trace_hardirqs_off;
+       sp += 12;
 #endif
        [--sp] = RETI;  /*orig_pc*/
        /* Clear all L registers.  */
        RETN = [sp++];
        RETX = [sp++];
        RETI = [sp++];
+
+#ifdef CONFIG_TRACE_IRQFLAGS
+       sp += -12;
+       call _trace_hardirqs_on;
+       sp += 12;
+#endif
+
        RETS = [sp++];
 
 #ifdef CONFIG_SMP
index ccfa7c490ff9a43cdc5d370b9c549901651b5bac..1fa414f7852f60ced715366e5852a311a6d5b06e 100644 (file)
@@ -965,6 +965,13 @@ ENTRY(_evt_evt14)
        sti r0;
 #else
        cli r0;
+#endif
+#ifdef CONFIG_TRACE_IRQFLAGS
+       [--sp] = rets;
+       sp += -12;
+       call _trace_hardirqs_off;
+       sp += 12;
+       rets = [sp++];
 #endif
        [--sp] = RETI;
        SP += 4;
@@ -989,6 +996,14 @@ ENTRY(_schedule_and_signal_from_int)
        p1 = rets;
        [sp + PT_RESERVED] = p1;
 
+#ifdef CONFIG_TRACE_IRQFLAGS
+       /* trace_hardirqs_on() checks if all irqs are disabled. But here IRQ 15
+        * is turned on, so disable all irqs. */
+       cli r0;
+       sp += -12;
+       call _trace_hardirqs_on;
+       sp += 12;
+#endif
 #ifdef CONFIG_SMP
        GET_PDA(p0, r0);        /* Fetch current PDA (can't migrate to other CPU here) */
        r0 = [p0 + PDA_IRQFLAGS];
index df984960cf9008ab1c5916f0dcdea47b9216d203..0a0c088ead8ce1074c4aa6deeb5c1c78ddc6b552 100644 (file)
@@ -87,6 +87,13 @@ __common_int_entry:
        sti r1;
 #else
        cli r1;
+#endif
+#ifdef CONFIG_TRACE_IRQFLAGS
+       [--sp] = r0;
+       sp += -12;
+       call _trace_hardirqs_off;
+       sp += 12;
+       r0 = [sp++];
 #endif
        [--sp] = RETI;  /* orig_pc */
        /* Clear all L registers.  */