提交 e0288a0a 编写于 作者: T Thomas Gleixner 提交者: Ralf Baechle

MIPS: alchemy: Remove pointless irqdisable/enable

bcsr_csc_handler() is a cascading interrupt handler. It has a
disable_irq_nosync()/enable_irq() pair around the generic_handle_irq()
call. The value of this disable/enable is zero because its a complete
noop:

disable_irq_nosync() merily increments the disable count without
actually masking the interrupt. enable_irq() soleley decrements the
disable count without touching the interrupt chip. The interrupt
cannot arrive again because the complete call chain runs with
interrupts disabled.

Remove it.

[ralf@linux-mips.org: Fold in followup fix from Thomas Gleixner.]
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Patchwork: https://patchwork.linux-mips.org/patch/10702/
Patchwork: https://patchwork.linux-mips.org/patch/10708/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 9154566e
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/irq.h> #include <linux/irq.h>
...@@ -88,10 +89,11 @@ EXPORT_SYMBOL_GPL(bcsr_mod); ...@@ -88,10 +89,11 @@ EXPORT_SYMBOL_GPL(bcsr_mod);
static void bcsr_csc_handler(unsigned int irq, struct irq_desc *d) static void bcsr_csc_handler(unsigned int irq, struct irq_desc *d)
{ {
unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT); unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT);
struct irq_chip *chip = irq_desc_get_chip(d);
disable_irq_nosync(irq); chained_irq_enter(chip, d);
generic_handle_irq(bcsr_csc_base + __ffs(bisr)); generic_handle_irq(bcsr_csc_base + __ffs(bisr));
enable_irq(irq); chained_irq_exit(chip, d);
} }
static void bcsr_irq_mask(struct irq_data *d) static void bcsr_irq_mask(struct irq_data *d)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册