mce.c (976e3645923bdd2fe7893aae33fd7a21098bfb28) | mce.c (efbc4303b255bb80ab1283794b36dd5fe1fb0ec3) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Machine check exception handling. 4 * 5 * Copyright 2013 IBM Corporation 6 * Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> 7 */ 8 9#undef DEBUG 10#define pr_fmt(fmt) "mce: " fmt 11 12#include <linux/hardirq.h> 13#include <linux/types.h> 14#include <linux/ptrace.h> 15#include <linux/percpu.h> 16#include <linux/export.h> 17#include <linux/irq_work.h> | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Machine check exception handling. 4 * 5 * Copyright 2013 IBM Corporation 6 * Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> 7 */ 8 9#undef DEBUG 10#define pr_fmt(fmt) "mce: " fmt 11 12#include <linux/hardirq.h> 13#include <linux/types.h> 14#include <linux/ptrace.h> 15#include <linux/percpu.h> 16#include <linux/export.h> 17#include <linux/irq_work.h> |
18#include <linux/extable.h> |
|
18 19#include <asm/machdep.h> 20#include <asm/mce.h> 21#include <asm/nmi.h> 22 23static DEFINE_PER_CPU(int, mce_nest_count); 24static DEFINE_PER_CPU(struct machine_check_event[MAX_MC_EVT], mce_event); 25 --- 220 unchanged lines hidden (view full) --- 246 __this_cpu_dec(mce_queue_count); 247 return; 248 } 249 memcpy(this_cpu_ptr(&mce_event_queue[index]), &evt, sizeof(evt)); 250 251 /* Queue irq work to process this event later. */ 252 irq_work_queue(&mce_event_process_work); 253} | 19 20#include <asm/machdep.h> 21#include <asm/mce.h> 22#include <asm/nmi.h> 23 24static DEFINE_PER_CPU(int, mce_nest_count); 25static DEFINE_PER_CPU(struct machine_check_event[MAX_MC_EVT], mce_event); 26 --- 220 unchanged lines hidden (view full) --- 247 __this_cpu_dec(mce_queue_count); 248 return; 249 } 250 memcpy(this_cpu_ptr(&mce_event_queue[index]), &evt, sizeof(evt)); 251 252 /* Queue irq work to process this event later. */ 253 irq_work_queue(&mce_event_process_work); 254} |
255 256void mce_common_process_ue(struct pt_regs *regs, 257 struct mce_error_info *mce_err) 258{ 259 const struct exception_table_entry *entry; 260 261 entry = search_kernel_exception_table(regs->nip); 262 if (entry) { 263 mce_err->ignore_event = true; 264 regs->nip = extable_fixup(entry); 265 } 266} 267 |
|
254/* 255 * process pending MCE event from the mce event queue. This function will be 256 * called during syscall exit. 257 */ 258static void machine_process_ue_event(struct work_struct *work) 259{ 260 int index; 261 struct machine_check_event *evt; --- 439 unchanged lines hidden --- | 268/* 269 * process pending MCE event from the mce event queue. This function will be 270 * called during syscall exit. 271 */ 272static void machine_process_ue_event(struct work_struct *work) 273{ 274 int index; 275 struct machine_check_event *evt; --- 439 unchanged lines hidden --- |