]> Pileus Git - ~andy/linux/commitdiff
[MIPS] SMTC: Interrupt mask backstop hack
authorKevin D. Kissell <kevink@mips.com>
Thu, 12 Jul 2007 15:21:08 +0000 (16:21 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 12 Jul 2007 16:41:17 +0000 (17:41 +0100)
To support multiple TC microthreads acting as "CPUs" within a VPE,
VPE-wide interrupt mask bits must be specially manipulated during
interrupt handling. To support legacy drivers and interrupt controller
management code, SMTC has a "backstop" to track and if necessary restore
the interrupt mask. This has some performance impact on interrupt service
overhead. Disable it only if you know what you are doing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/kernel/entry.S
arch/mips/kernel/genex.S
include/asm-mips/irq.h

index a00fabe2e4e04d6a175eca5077081ab41e8fe847..49f02e3512445dddbfc9e0fa68e00513b1797adc 100644 (file)
@@ -1404,6 +1404,19 @@ config MIPS_MT_SMTC_INSTANT_REPLAY
          it off), but ensures that IPIs are handled promptly even under
          heavy I/O interrupt load.
 
+config MIPS_MT_SMTC_IM_BACKSTOP
+       bool "Use per-TC register bits as backstop for inhibited IM bits"
+       depends on MIPS_MT_SMTC
+       default y
+       help
+         To support multiple TC microthreads acting as "CPUs" within
+         a VPE, VPE-wide interrupt mask bits must be specially manipulated
+         during interrupt handling. To support legacy drivers and interrupt
+         controller management code, SMTC has a "backstop" to track and
+         if necessary restore the interrupt mask. This has some performance
+         impact on interrupt service overhead. Disable it only if you know
+         what you are doing.
+
 config MIPS_VPE_LOADER_TOM
        bool "Load VPE program into memory hidden from linux"
        depends on MIPS_VPE_LOADER
index 686249c5c328a34c105e1c50d458b71effa033f7..e29598ae939d21b7d8e7442300a8741ce612f24a 100644 (file)
@@ -84,6 +84,7 @@ FEXPORT(restore_all)                  # restore full frame
        LONG_S  sp, TI_REGS($28)
        jal     deferred_smtc_ipi
        LONG_S  s0, TI_REGS($28)
+#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
 /* Re-arm any temporarily masked interrupts not explicitly "acked" */
        mfc0    v0, CP0_TCSTATUS
        ori     v1, v0, TCSTATUS_IXMT
@@ -110,6 +111,7 @@ FEXPORT(restore_all)                        # restore full frame
        _ehb
        xor     t0, t0, t3
        mtc0    t0, CP0_TCCONTEXT
+#endif /* CONFIG_MIPS_MT_SMTC_IM_BACKSTOP */
 #endif /* CONFIG_MIPS_MT_SMTC */
        .set    noat
        RESTORE_TEMP
index 297bd56c23471facbd75cbb31b460707c5bf13ba..c0f19d638b986c4f5be93b801a90b4e6717c6419 100644 (file)
@@ -243,9 +243,11 @@ NESTED(except_vec_vi_handler, 0, sp)
         */
        mfc0    t1, CP0_STATUS
        and     t0, a0, t1
+#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
        mfc0    t2, CP0_TCCONTEXT
        or      t0, t0, t2
        mtc0    t0, CP0_TCCONTEXT
+#endif /* CONFIG_MIPS_MT_SMTC_IM_BACKSTOP */
        xor     t1, t1, t0
        mtc0    t1, CP0_STATUS
        _ehb
index 3ca6a076124d745c163aaf918872507a7b4bccfd..97102ebc54b19d44137945dcac23833eceec6ada 100644 (file)
@@ -24,7 +24,7 @@ static inline int irq_canonicalize(int irq)
 #define irq_canonicalize(irq) (irq)    /* Sane hardware, sane code ... */
 #endif
 
-#ifdef CONFIG_MIPS_MT_SMTC
+#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
 /*
  * Clear interrupt mask handling "backstop" if irq_hwmask
  * entry so indicates. This implies that the ack() or end()