sevki
c9e1dba412
setup CI/CD for kernel development - added CodeQL for code scanning - every pr is built as an image and is available for 30days on https://oklinux.dev - tagged and released on github for now Signed-off-by: sevki <s@sevki.io>
23 lines
411 B
C
23 lines
411 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_4xx(struct pt_regs *regs)
|
|
{
|
|
unsigned long reason = regs->esr;
|
|
|
|
if (reason & ESR_IMCP) {
|
|
printk("Instruction");
|
|
mtspr(SPRN_ESR, reason & ~ESR_IMCP);
|
|
} else
|
|
printk("Data");
|
|
printk(" machine check in kernel mode.\n");
|
|
|
|
return 0;
|
|
}
|