summaryrefslogtreecommitdiff
path: root/include/asm-mips/irqflags.h
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-31 11:24:00 -0600
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-31 11:24:00 -0600
commit30716e07ef511ec7525c07eb1e8060ba8943c2a2 (patch)
treeeb6a47cae63d3587fa773cc5a16781eaa2c7810b /include/asm-mips/irqflags.h
parent03c79cc56e4497cbd09d74a73c1bd0d1d9a8a16c (diff)
parentf56df2f4db6e4af87fb8e941cff69f4501a111df (diff)
downloadlinux-30716e07ef511ec7525c07eb1e8060ba8943c2a2.tar.gz
linux-30716e07ef511ec7525c07eb1e8060ba8943c2a2.tar.xz
Merge branch 'linus'
Diffstat (limited to 'include/asm-mips/irqflags.h')
-rw-r--r--include/asm-mips/irqflags.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/irqflags.h
index 46bf5de5ac72..af3b07dfad4b 100644
--- a/include/asm-mips/irqflags.h
+++ b/include/asm-mips/irqflags.h
@@ -15,6 +15,27 @@
#include <asm/hazards.h>
+/*
+ * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred IPIs,
+ * at the cost of branch and call overhead on each local_irq_restore()
+ */
+
+#ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY
+
+extern void smtc_ipi_replay(void);
+
+#define irq_restore_epilog(flags) \
+do { \
+ if (!(flags & 0x0400)) \
+ smtc_ipi_replay(); \
+} while (0)
+
+#else
+
+#define irq_restore_epilog(ignore) do { } while (0)
+
+#endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */
+
__asm__ (
" .macro raw_local_irq_enable \n"
" .set push \n"
@@ -193,6 +214,7 @@ do { \
: "=r" (__tmp1) \
: "0" (flags) \
: "memory"); \
+ irq_restore_epilog(flags); \
} while(0)
static inline int raw_irqs_disabled_flags(unsigned long flags)