mce.c (98817a84ff1c755c347ac633ff017a623a631fad) mce.c (c37a63afc429ce959402168f67e4f094ab639ace)
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

--- 35 unchanged lines hidden (view full) ---

44};
45
46static struct irq_work mce_ue_event_irq_work = {
47 .func = machine_check_ue_irq_work,
48};
49
50DECLARE_WORK(mce_ue_event_work, machine_process_ue_event);
51
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

--- 35 unchanged lines hidden (view full) ---

44};
45
46static struct irq_work mce_ue_event_irq_work = {
47 .func = machine_check_ue_irq_work,
48};
49
50DECLARE_WORK(mce_ue_event_work, machine_process_ue_event);
51
52static BLOCKING_NOTIFIER_HEAD(mce_notifier_list);
53
54int mce_register_notifier(struct notifier_block *nb)
55{
56 return blocking_notifier_chain_register(&mce_notifier_list, nb);
57}
58EXPORT_SYMBOL_GPL(mce_register_notifier);
59
60int mce_unregister_notifier(struct notifier_block *nb)
61{
62 return blocking_notifier_chain_unregister(&mce_notifier_list, nb);
63}
64EXPORT_SYMBOL_GPL(mce_unregister_notifier);
65
52static void mce_set_error_info(struct machine_check_event *mce,
53 struct mce_error_info *mce_err)
54{
55 mce->error_type = mce_err->error_type;
56 switch (mce_err->error_type) {
57 case MCE_ERROR_TYPE_UE:
58 mce->u.ue_error.ue_error_type = mce_err->u.ue_error_type;
59 break;

--- 213 unchanged lines hidden (view full) ---

273static void machine_process_ue_event(struct work_struct *work)
274{
275 int index;
276 struct machine_check_event *evt;
277
278 while (__this_cpu_read(mce_ue_count) > 0) {
279 index = __this_cpu_read(mce_ue_count) - 1;
280 evt = this_cpu_ptr(&mce_ue_event_queue[index]);
66static void mce_set_error_info(struct machine_check_event *mce,
67 struct mce_error_info *mce_err)
68{
69 mce->error_type = mce_err->error_type;
70 switch (mce_err->error_type) {
71 case MCE_ERROR_TYPE_UE:
72 mce->u.ue_error.ue_error_type = mce_err->u.ue_error_type;
73 break;

--- 213 unchanged lines hidden (view full) ---

287static void machine_process_ue_event(struct work_struct *work)
288{
289 int index;
290 struct machine_check_event *evt;
291
292 while (__this_cpu_read(mce_ue_count) > 0) {
293 index = __this_cpu_read(mce_ue_count) - 1;
294 evt = this_cpu_ptr(&mce_ue_event_queue[index]);
295 blocking_notifier_call_chain(&mce_notifier_list, 0, evt);
281#ifdef CONFIG_MEMORY_FAILURE
282 /*
283 * This should probably queued elsewhere, but
284 * oh! well
285 *
286 * Don't report this machine check because the caller has a
287 * asked us to ignore the event, it has a fixup handler which
288 * will do the appropriate error handling and reporting.

--- 440 unchanged lines hidden ---
296#ifdef CONFIG_MEMORY_FAILURE
297 /*
298 * This should probably queued elsewhere, but
299 * oh! well
300 *
301 * Don't report this machine check because the caller has a
302 * asked us to ignore the event, it has a fixup handler which
303 * will do the appropriate error handling and reporting.

--- 440 unchanged lines hidden ---