Title: [8190] trunk/arch/blackfin: As Mike points out, in some places it is not necessary to save/restore all registers.
- Revision
- 8190
- Author
- adamliyi
- Date
- 2010-01-19 05:13:19 -0500 (Tue, 19 Jan 2010)
Log Message
As Mike points out, in some places it is not necessary to save/restore all registers.
Modified Paths
Diff
Modified: trunk/arch/blackfin/include/asm/context.S (8189 => 8190)
--- trunk/arch/blackfin/include/asm/context.S 2010-01-19 10:07:34 UTC (rev 8189)
+++ trunk/arch/blackfin/include/asm/context.S 2010-01-19 10:13:19 UTC (rev 8190)
@@ -4,8 +4,6 @@
* Licensed under the GPL-2 or later.
*/
-#include <asm/irqflags.h>
-
/*
* NOTE! The single-stepping code assumes that all interrupt handlers
* start by saving SYSCFG on the stack with their first instruction.
@@ -75,7 +73,11 @@
#else
cli r0;
#endif
- TRACE_IRQS_OFF
+#ifdef CONFIG_TRACE_IRQFLAGS
+ sp += -12;
+ call _trace_hardirqs_off;
+ sp += 12;
+#endif
[--sp] = RETI; /*orig_pc*/
/* Clear all L registers. */
r0 = 0 (x);
@@ -282,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
@@ -292,7 +301,6 @@
p0.l = _bfin_irq_flags;
r0 = [p0];
#endif
- TRACE_IRQS_ON
sti r0;
sp += 4; /* Skip Reserved */
Modified: trunk/arch/blackfin/include/asm/irqflags.h (8189 => 8190)
--- trunk/arch/blackfin/include/asm/irqflags.h 2010-01-19 10:07:34 UTC (rev 8189)
+++ trunk/arch/blackfin/include/asm/irqflags.h 2010-01-19 10:13:19 UTC (rev 8190)
@@ -8,8 +8,6 @@
#ifndef __ASM_BFIN_IRQFLAGS_H__
#define __ASM_BFIN_IRQFLAGS_H__
-#ifndef __ASSEMBLY__
-
#include <mach/blackfin.h>
#ifdef CONFIG_SMP
@@ -219,37 +217,4 @@
raw_local_irq_enable();
}
-#else /* __ASSEMBLY__ */
-
-#ifdef CONFIG_TRACE_IRQFLAGS
-
-.macro bfin_trace_hardirqs_on
- [--sp] = rets;
- [--sp] = (r7:0, p5:0);
- sp += -12;
- call _trace_hardirqs_on;
- sp += 12;
- (r7:0, p5:0) = [sp++];
- rets = [sp++];
-.endm
-
-.macro bfin_trace_hardirqs_off
- [--sp] = rets;
- [--sp] = (r7:0, p5:0);
- sp += -12;
- call _trace_hardirqs_off;
- sp += 12;
- (r7:0, p5:0) = [sp++];
- rets = [sp++];
-.endm
-
-# define TRACE_IRQS_ON bfin_trace_hardirqs_on
-# define TRACE_IRQS_OFF bfin_trace_hardirqs_off
-#else
-# define TRACE_IRQS_ON
-# define TRACE_IRQS_OFF
#endif
-
-#endif /* __ASSEMBLY__ */
-
-#endif
Modified: trunk/arch/blackfin/mach-common/entry.S (8189 => 8190)
--- trunk/arch/blackfin/mach-common/entry.S 2010-01-19 10:07:34 UTC (rev 8189)
+++ trunk/arch/blackfin/mach-common/entry.S 2010-01-19 10:13:19 UTC (rev 8190)
@@ -966,7 +966,13 @@
#else
cli r0;
#endif
- TRACE_IRQS_OFF
+#ifdef CONFIG_TRACE_IRQFLAGS
+ [--sp] = rets;
+ sp += -12;
+ call _trace_hardirqs_off;
+ sp += 12;
+ rets = [sp++];
+#endif
[--sp] = RETI;
SP += 4;
rts;
@@ -990,6 +996,11 @@
p1 = rets;
[sp + PT_RESERVED] = p1;
+#ifdef CONFIG_TRACE_IRQFLAGS
+ 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];
@@ -998,7 +1009,6 @@
p0.h = _bfin_irq_flags;
r0 = [p0];
#endif
- TRACE_IRQS_ON
sti r0;
/* finish the userspace "atomic" functions for it */
Modified: trunk/arch/blackfin/mach-common/interrupt.S (8189 => 8190)
--- trunk/arch/blackfin/mach-common/interrupt.S 2010-01-19 10:07:34 UTC (rev 8189)
+++ trunk/arch/blackfin/mach-common/interrupt.S 2010-01-19 10:13:19 UTC (rev 8190)
@@ -88,7 +88,13 @@
#else
cli r1;
#endif
- TRACE_IRQS_OFF
+#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. */
r1 = 0 (x);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits