ras.c (209e9d500e25eada096b2c09a34093bc458166f3) | ras.c (74c3354bc1d89d53e8da2dcc6f9f6bfc28b2900f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2001 Dave Engebretsen IBM Corporation 4 */ 5 6#include <linux/sched.h> 7#include <linux/interrupt.h> 8#include <linux/irq.h> --- 703 unchanged lines hidden (view full) --- 712 return disposition; 713} 714 715static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp) 716{ 717 struct pseries_errorlog *pseries_log; 718 struct pseries_mc_errorlog *mce_log = NULL; 719 int disposition = rtas_error_disposition(errp); | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2001 Dave Engebretsen IBM Corporation 4 */ 5 6#include <linux/sched.h> 7#include <linux/interrupt.h> 8#include <linux/irq.h> --- 703 unchanged lines hidden (view full) --- 712 return disposition; 713} 714 715static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp) 716{ 717 struct pseries_errorlog *pseries_log; 718 struct pseries_mc_errorlog *mce_log = NULL; 719 int disposition = rtas_error_disposition(errp); |
720 unsigned long msr; |
|
720 u8 error_type; 721 722 if (!rtas_error_extended(errp)) 723 goto out; 724 725 pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE); 726 if (!pseries_log) 727 goto out; --- 9 unchanged lines hidden (view full) --- 737 * leave it enabled because subsequently we will be queuing work 738 * to workqueues where again per-cpu variables accessed, besides 739 * fwnmi_release_errinfo() crashes when called in realmode on 740 * pseries. 741 * Note: All the realmode handling like flushing SLB entries for 742 * SLB multihit is done by now. 743 */ 744out: | 721 u8 error_type; 722 723 if (!rtas_error_extended(errp)) 724 goto out; 725 726 pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE); 727 if (!pseries_log) 728 goto out; --- 9 unchanged lines hidden (view full) --- 738 * leave it enabled because subsequently we will be queuing work 739 * to workqueues where again per-cpu variables accessed, besides 740 * fwnmi_release_errinfo() crashes when called in realmode on 741 * pseries. 742 * Note: All the realmode handling like flushing SLB entries for 743 * SLB multihit is done by now. 744 */ 745out: |
745 mtmsr(mfmsr() | MSR_IR | MSR_DR); | 746 msr = mfmsr(); 747 mtmsr(msr | MSR_IR | MSR_DR); 748 |
746 disposition = mce_handle_err_virtmode(regs, errp, mce_log, 747 disposition); | 749 disposition = mce_handle_err_virtmode(regs, errp, mce_log, 750 disposition); |
751 752 /* 753 * Queue irq work to log this rtas event later. 754 * irq_work_queue uses per-cpu variables, so do this in virt 755 * mode as well. 756 */ 757 irq_work_queue(&mce_errlog_process_work); 758 759 mtmsr(msr); 760 |
|
748 return disposition; 749} 750 751/* 752 * Process MCE rtas errlog event. 753 */ 754static void mce_process_errlog_event(struct irq_work *work) 755{ --- 99 unchanged lines hidden (view full) --- 855 if (fwnmi_active) { 856 errp = fwnmi_get_errinfo(regs); 857 /* 858 * Call to fwnmi_release_errinfo() in real mode causes kernel 859 * to panic. Hence we will call it as soon as we go into 860 * virtual mode. 861 */ 862 disposition = mce_handle_error(regs, errp); | 761 return disposition; 762} 763 764/* 765 * Process MCE rtas errlog event. 766 */ 767static void mce_process_errlog_event(struct irq_work *work) 768{ --- 99 unchanged lines hidden (view full) --- 868 if (fwnmi_active) { 869 errp = fwnmi_get_errinfo(regs); 870 /* 871 * Call to fwnmi_release_errinfo() in real mode causes kernel 872 * to panic. Hence we will call it as soon as we go into 873 * virtual mode. 874 */ 875 disposition = mce_handle_error(regs, errp); |
876 |
|
863 fwnmi_release_errinfo(); 864 | 877 fwnmi_release_errinfo(); 878 |
865 /* Queue irq work to log this rtas event later. */ 866 irq_work_queue(&mce_errlog_process_work); 867 | |
868 if (disposition == RTAS_DISP_FULLY_RECOVERED) 869 return 1; 870 } 871 872 return 0; 873} | 879 if (disposition == RTAS_DISP_FULLY_RECOVERED) 880 return 1; 881 } 882 883 return 0; 884} |