Path: blob/master/arch/powerpc/platforms/8xx/machine_check.c
26481 views
// SPDX-License-Identifier: GPL-2.0-or-later1/*2*/34#include <linux/kernel.h>5#include <linux/printk.h>6#include <linux/ptrace.h>78#include <asm/reg.h>910int machine_check_8xx(struct pt_regs *regs)11{12unsigned long reason = regs->msr;1314pr_err("Machine check in kernel mode.\n");15pr_err("Caused by (from SRR1=%lx): ", reason);16if (reason & 0x40000000)17pr_cont("Fetch error at address %lx\n", regs->nip);18else19pr_cont("Data access error at address %lx\n", regs->dar);2021#ifdef CONFIG_PCI22/* the qspan pci read routines can cause machine checks -- Cort23*24* yuck !!! that totally needs to go away ! There are better ways25* to deal with that than having a wart in the mcheck handler.26* -- BenH27*/28bad_page_fault(regs, SIGBUS);29return 1;30#else31return 0;32#endif33}343536