diff options
author | Borislav Petkov <bp@suse.de> | 2015-03-18 10:12:35 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2015-04-27 21:27:35 +0200 |
commit | 2383844d4850888cfdf6d202563d2ddb4125a4e9 (patch) | |
tree | 279614f1102aee6e753be680b83dbf25ae032348 /drivers/acpi/apei | |
parent | 6169ddf846c528509e66a0fe7804393aa330a970 (diff) | |
download | lwn-2383844d4850888cfdf6d202563d2ddb4125a4e9.tar.gz lwn-2383844d4850888cfdf6d202563d2ddb4125a4e9.zip |
GHES: Elliminate double-loop in the NMI handler
There's no real need to iterate twice over the HW error sources in the
NMI handler. With the previous cleanups, elliminating the second loop is
almost trivial.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 0de3adcca03e..94a44bad5576 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -851,25 +851,18 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) if (sev >= GHES_SEV_PANIC) __ghes_panic(ghes); - ret = NMI_HANDLED; - } - - if (ret == NMI_DONE) - goto out; - - list_for_each_entry_rcu(ghes, &ghes_nmi, list) { if (!(ghes->flags & GHES_TO_CLEAR)) continue; __process_error(ghes); ghes_clear_estatus(ghes); + + ret = NMI_HANDLED; } #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG irq_work_queue(&ghes_proc_irq_work); #endif - -out: raw_spin_unlock(&ghes_nmi_lock); return ret; } |