···5252 mask_msc_irq(irq);5353 if (!cpu_has_veic)5454 MSCIC_WRITE(MSC01_IC_EOI, 0);5555-#ifdef CONFIG_MIPS_MT_SMTC5655 /* This actually needs to be a call into platform code */5757- if (irq_hwmask[irq] & ST0_IM)5858- set_c0_status(irq_hwmask[irq] & ST0_IM);5959-#endif /* CONFIG_MIPS_MT_SMTC */5656+ smtc_im_ack_irq(irq);6057}61586259/*···7073 MSCIC_WRITE(MSC01_IC_SUP+irq*8, r | ~MSC01_IC_SUP_EDGE_BIT);7174 MSCIC_WRITE(MSC01_IC_SUP+irq*8, r);7275 }7373-#ifdef CONFIG_MIPS_MT_SMTC7474- if (irq_hwmask[irq] & ST0_IM)7575- set_c0_status(irq_hwmask[irq] & ST0_IM);7676-#endif /* CONFIG_MIPS_MT_SMTC */7676+ smtc_im_ack_irq(irq);7777}78787979/*
+1-9
arch/mips/kernel/irq.c
···7474 */7575void ack_bad_irq(unsigned int irq)7676{7777+ smtc_im_ack_irq(irq);7778 printk("unexpected IRQ # %d\n", irq);7879}79808081atomic_t irq_err_count;8181-8282-#ifdef CONFIG_MIPS_MT_SMTC8383-/*8484- * SMTC Kernel needs to manipulate low-level CPU interrupt mask8585- * in do_IRQ. These are passed in setup_irq_smtc() and stored8686- * in this table.8787- */8888-unsigned long irq_hwmask[NR_IRQS];8989-#endif /* CONFIG_MIPS_MT_SMTC */90829183/*9284 * Generic, controller-independent functions:
+4-1
arch/mips/kernel/smtc.c
···2525#include <asm/smtc_proc.h>26262727/*2828- * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set.2828+ * SMTC Kernel needs to manipulate low-level CPU interrupt mask2929+ * in do_IRQ. These are passed in setup_irq_smtc() and stored3030+ * in this table.2931 */3232+unsigned long irq_hwmask[NR_IRQS];30333134#define LOCK_MT_PRA() \3235 local_irq_save(flags); \
+24-8
include/asm-mips/irq.h
···2424#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */2525#endif26262727+#ifdef CONFIG_MIPS_MT_SMTC2828+2929+struct irqaction;3030+3131+extern unsigned long irq_hwmask[];3232+extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,3333+ unsigned long hwmask);3434+3535+static inline void smtc_im_ack_irq(unsigned int irq)3636+{3737+ if (irq_hwmask[irq] & ST0_IM)3838+ set_c0_status(irq_hwmask[irq] & ST0_IM);3939+}4040+4141+#else4242+4343+static inline void smtc_im_ack_irq(unsigned int irq)4444+{4545+}4646+4747+#endif /* CONFIG_MIPS_MT_SMTC */4848+2749#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP5050+2851/*2952 * Clear interrupt mask handling "backstop" if irq_hwmask3053 * entry so indicates. This implies that the ack() or end()···6138 ~(irq_hwmask[irq] & 0x0000ff00)); \6239} while (0)6340#else4141+6442#define __DO_IRQ_SMTC_HOOK(irq) do { } while (0)6543#endif6644···83598460extern void arch_init_irq(void);8561extern void spurious_interrupt(void);8686-8787-#ifdef CONFIG_MIPS_MT_SMTC8888-struct irqaction;8989-9090-extern unsigned long irq_hwmask[];9191-extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,9292- unsigned long hwmask);9393-#endif /* CONFIG_MIPS_MT_SMTC */94629563extern int allocate_irqno(void);9664extern void alloc_legacy_irqno(void);