提交 d275fbb1 编写于 作者: J Julien Thierry 提交者: Xie XiuQi

irqchip/gic-v3: Remove acknowledge loop

mainline inclusion
from mainline-v4.20-rc1
commit 342677d70ab92142b483fc68bcade74cdf969785
category: bugfix
bugzilla: 9291
CVE: NA

--------------------------------

Multiple interrupts pending for a CPU is actually rare. Doing an
acknowledge loop does not give much better performance or even can
deteriorate them.

Do not loop when an interrupt has been acknowledged, just return
from interrupt and wait for another one to be raised.
Tested-by: NDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: NJulien Thierry <julien.thierry@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4cd3de99
...@@ -348,7 +348,6 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs ...@@ -348,7 +348,6 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
{ {
u32 irqnr; u32 irqnr;
do {
irqnr = gic_read_iar(); irqnr = gic_read_iar();
if (likely(irqnr > 15 && irqnr < 1020) || irqnr >= 8192) { if (likely(irqnr > 15 && irqnr < 1020) || irqnr >= 8192) {
...@@ -369,7 +368,7 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs ...@@ -369,7 +368,7 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
gic_write_eoir(irqnr); gic_write_eoir(irqnr);
} }
} }
continue; return;
} }
if (irqnr < 16) { if (irqnr < 16) {
gic_write_eoir(irqnr); gic_write_eoir(irqnr);
...@@ -387,9 +386,7 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs ...@@ -387,9 +386,7 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
#else #else
WARN_ONCE(true, "Unexpected SGI received!\n"); WARN_ONCE(true, "Unexpected SGI received!\n");
#endif #endif
continue;
} }
} while (irqnr != ICC_IAR1_EL1_SPURIOUS);
} }
static void __init gic_dist_init(void) static void __init gic_dist_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册