Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip: mips-cpu: Replace magic 0x100 with IE_SW0

Replace use of the magic number 0x100 (ie. bit 8) with the more
explanatory IE_SW0 (ie. interrupt enable for software interrupt 0) or
C_SW0 (ie. cause bit for software interrupt 0) as appropriate.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15834/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Paul Burton and committed by
Ralf Baechle
c0cfbe69 ca452b95

+4 -4
+4 -4
drivers/irqchip/irq-mips-cpu.c
··· 41 41 42 42 static inline void unmask_mips_irq(struct irq_data *d) 43 43 { 44 - set_c0_status(0x100 << (d->irq - MIPS_CPU_IRQ_BASE)); 44 + set_c0_status(IE_SW0 << (d->irq - MIPS_CPU_IRQ_BASE)); 45 45 irq_enable_hazard(); 46 46 } 47 47 48 48 static inline void mask_mips_irq(struct irq_data *d) 49 49 { 50 - clear_c0_status(0x100 << (d->irq - MIPS_CPU_IRQ_BASE)); 50 + clear_c0_status(IE_SW0 << (d->irq - MIPS_CPU_IRQ_BASE)); 51 51 irq_disable_hazard(); 52 52 } 53 53 ··· 70 70 { 71 71 unsigned int vpflags = dvpe(); 72 72 73 - clear_c0_cause(0x100 << (d->irq - MIPS_CPU_IRQ_BASE)); 73 + clear_c0_cause(C_SW0 << (d->irq - MIPS_CPU_IRQ_BASE)); 74 74 evpe(vpflags); 75 75 unmask_mips_irq(d); 76 76 return 0; ··· 83 83 static void mips_mt_cpu_irq_ack(struct irq_data *d) 84 84 { 85 85 unsigned int vpflags = dvpe(); 86 - clear_c0_cause(0x100 << (d->irq - MIPS_CPU_IRQ_BASE)); 86 + clear_c0_cause(C_SW0 << (d->irq - MIPS_CPU_IRQ_BASE)); 87 87 evpe(vpflags); 88 88 mask_mips_irq(d); 89 89 }