diff options
author | Borislav Petkov <bp@suse.de> | 2015-03-18 09:52:39 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2015-04-27 21:21:46 +0200 |
commit | e10be03f603d521d5c8ac0bb0f48e5723ce19d58 (patch) | |
tree | f18b07e36a5e877b27dc34abff63b840128eb801 /drivers/acpi/apei | |
parent | 115684961a335a1c97074158e8f789118ac8b00d (diff) | |
download | blackbird-op-linux-e10be03f603d521d5c8ac0bb0f48e5723ce19d58.tar.gz blackbird-op-linux-e10be03f603d521d5c8ac0bb0f48e5723ce19d58.zip |
GHES: Carve out the panic functionality
... into another function for more clarity. No functionality change.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index fe1e41bf5609..712ed95b1dca 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -823,6 +823,18 @@ static void __process_error(struct ghes *ghes) #endif } +static void __ghes_panic(struct ghes *ghes) +{ + oops_begin(); + ghes_print_queued_estatus(); + __ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus); + + /* reboot to log the error! */ + if (panic_timeout == 0) + panic_timeout = ghes_panic_timeout; + panic("Fatal hardware error!"); +} + static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) { struct ghes *ghes, *ghes_global = NULL; @@ -846,16 +858,8 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) if (ret == NMI_DONE) goto out; - if (sev_global >= GHES_SEV_PANIC) { - oops_begin(); - ghes_print_queued_estatus(); - __ghes_print_estatus(KERN_EMERG, ghes_global->generic, - ghes_global->estatus); - /* reboot to log the error! */ - if (panic_timeout == 0) - panic_timeout = ghes_panic_timeout; - panic("Fatal hardware error!"); - } + if (sev_global >= GHES_SEV_PANIC) + __ghes_panic(ghes_global); list_for_each_entry_rcu(ghes, &ghes_nmi, list) { if (!(ghes->flags & GHES_TO_CLEAR)) |