diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-01-19 19:18:01 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-01-23 13:26:47 -0500 |
commit | ac8be955049dab828a68b9c68a75144832f8289f (patch) | |
tree | c9992cccbc6bcb2f099395ef614ebc96b91a2598 /include/asm-mips | |
parent | 9ee79a3d372fcb6729893437f4923c5efd1f85db (diff) |
[MIPS] SMTC: Instant IPI replay.
SMTC pseudo-interrupts between TCs are deferred and queued if the target
TC is interrupt-inhibited (IXMT). In the first SMTC prototypes, these
queued IPIs were serviced on return to user mode, or on entry into the
kernel idle loop. The INSTANT_REPLAY option dispatches them as part of
local_irq_restore() processing, which adds runtime overhead (hence the
option to turn it off), but ensures that IPIs are handled promptly even
under heavy I/O interrupt load.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/irqflags.h | 22 |
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 @@ | |||
15 | 15 | ||
16 | #include <asm/hazards.h> | 16 | #include <asm/hazards.h> |
17 | 17 | ||
18 | /* | ||
19 | * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred IPIs, | ||
20 | * at the cost of branch and call overhead on each local_irq_restore() | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY | ||
24 | |||
25 | extern void smtc_ipi_replay(void); | ||
26 | |||
27 | #define irq_restore_epilog(flags) \ | ||
28 | do { \ | ||
29 | if (!(flags & 0x0400)) \ | ||
30 | smtc_ipi_replay(); \ | ||
31 | } while (0) | ||
32 | |||
33 | #else | ||
34 | |||
35 | #define irq_restore_epilog(ignore) do { } while (0) | ||
36 | |||
37 | #endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */ | ||
38 | |||
18 | __asm__ ( | 39 | __asm__ ( |
19 | " .macro raw_local_irq_enable \n" | 40 | " .macro raw_local_irq_enable \n" |
20 | " .set push \n" | 41 | " .set push \n" |
@@ -193,6 +214,7 @@ do { \ | |||
193 | : "=r" (__tmp1) \ | 214 | : "=r" (__tmp1) \ |
194 | : "0" (flags) \ | 215 | : "0" (flags) \ |
195 | : "memory"); \ | 216 | : "memory"); \ |
217 | irq_restore_epilog(flags); \ | ||
196 | } while(0) | 218 | } while(0) |
197 | 219 | ||
198 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 220 | static inline int raw_irqs_disabled_flags(unsigned long flags) |