mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 04:45:23 +07:00
2874c5fd28
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35 lines
789 B
C
35 lines
789 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/printk.h>
|
|
#include <linux/ptrace.h>
|
|
|
|
#include <asm/reg.h>
|
|
|
|
int machine_check_8xx(struct pt_regs *regs)
|
|
{
|
|
unsigned long reason = regs->msr;
|
|
|
|
pr_err("Machine check in kernel mode.\n");
|
|
pr_err("Caused by (from SRR1=%lx): ", reason);
|
|
if (reason & 0x40000000)
|
|
pr_cont("Fetch error at address %lx\n", regs->nip);
|
|
else
|
|
pr_cont("Data access error at address %lx\n", regs->dar);
|
|
|
|
#ifdef CONFIG_PCI
|
|
/* the qspan pci read routines can cause machine checks -- Cort
|
|
*
|
|
* yuck !!! that totally needs to go away ! There are better ways
|
|
* to deal with that than having a wart in the mcheck handler.
|
|
* -- BenH
|
|
*/
|
|
bad_page_fault(regs, regs->dar, SIGBUS);
|
|
return 1;
|
|
#else
|
|
return 0;
|
|
#endif
|
|
}
|