3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-12 10:15:54 +00:00
Brooklyn/arch/powerpc/platforms/4xx/machine_check.c

24 lines
411 B
C
Raw Normal View History

2021-05-27 00:09:36 +05:00
// 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_4xx(struct pt_regs *regs)
{
2021-10-02 21:09:28 +05:00
unsigned long reason = regs->esr;
2021-05-27 00:09:36 +05:00
if (reason & ESR_IMCP) {
printk("Instruction");
mtspr(SPRN_ESR, reason & ~ESR_IMCP);
} else
printk("Data");
printk(" machine check in kernel mode.\n");
return 0;
}