From: Yi Li Date: Tue, 19 Jan 2010 04:35:28 +0000 (+0000) Subject: Blackfin: add support for irqflags tracing X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=441504df6b81302c06010083c8d63b1465ead405;p=linux-beck.git Blackfin: add support for irqflags tracing Signed-off-by: Yi Li Signed-off-by: Mike Frysinger --- diff --git a/arch/blackfin/include/asm/context.S b/arch/blackfin/include/asm/context.S index fada8e974a73..1f9060395a0a 100644 --- a/arch/blackfin/include/asm/context.S +++ b/arch/blackfin/include/asm/context.S @@ -72,6 +72,11 @@ 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. */ @@ -279,6 +284,13 @@ RETN = [sp++]; RETX = [sp++]; RETI = [sp++]; + +#ifdef CONFIG_TRACE_IRQFLAGS + sp += -12; + call _trace_hardirqs_on; + sp += 12; +#endif + RETS = [sp++]; #ifdef CONFIG_SMP diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index ccfa7c490ff9..1fa414f7852f 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S @@ -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]; diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index df984960cf90..0a0c088ead8c 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S @@ -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. */