mce.c (81b61fa7a065e639d097b09c303e3212e4264fac) | mce.c (ba41e1e1ccb9771ce41a3b8e2121f95486e76ac9) |
---|---|
1/* 2 * Machine check exception handling. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 68 unchanged lines hidden (view full) --- 77} 78 79/* 80 * Decode and save high level MCE information into per cpu buffer which 81 * is an array of machine_check_event structure. 82 */ 83void save_mce_event(struct pt_regs *regs, long handled, 84 struct mce_error_info *mce_err, | 1/* 2 * Machine check exception handling. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 68 unchanged lines hidden (view full) --- 77} 78 79/* 80 * Decode and save high level MCE information into per cpu buffer which 81 * is an array of machine_check_event structure. 82 */ 83void save_mce_event(struct pt_regs *regs, long handled, 84 struct mce_error_info *mce_err, |
85 uint64_t nip, uint64_t addr) | 85 uint64_t nip, uint64_t addr, uint64_t phys_addr) |
86{ 87 int index = __this_cpu_inc_return(mce_nest_count) - 1; 88 struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]); 89 90 /* 91 * Return if we don't have enough space to log mce event. 92 * mce_nest_count may go beyond MAX_MC_EVT but that's ok, 93 * the check below will stop buffer overrun. --- 41 unchanged lines hidden (view full) --- 135 mce->u.ra_error.effective_address_provided = true; 136 mce->u.ra_error.effective_address = addr; 137 } else if (mce->error_type == MCE_ERROR_TYPE_LINK) { 138 mce->u.link_error.effective_address_provided = true; 139 mce->u.link_error.effective_address = addr; 140 } else if (mce->error_type == MCE_ERROR_TYPE_UE) { 141 mce->u.ue_error.effective_address_provided = true; 142 mce->u.ue_error.effective_address = addr; | 86{ 87 int index = __this_cpu_inc_return(mce_nest_count) - 1; 88 struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]); 89 90 /* 91 * Return if we don't have enough space to log mce event. 92 * mce_nest_count may go beyond MAX_MC_EVT but that's ok, 93 * the check below will stop buffer overrun. --- 41 unchanged lines hidden (view full) --- 135 mce->u.ra_error.effective_address_provided = true; 136 mce->u.ra_error.effective_address = addr; 137 } else if (mce->error_type == MCE_ERROR_TYPE_LINK) { 138 mce->u.link_error.effective_address_provided = true; 139 mce->u.link_error.effective_address = addr; 140 } else if (mce->error_type == MCE_ERROR_TYPE_UE) { 141 mce->u.ue_error.effective_address_provided = true; 142 mce->u.ue_error.effective_address = addr; |
143 if (phys_addr != ULONG_MAX) { 144 mce->u.ue_error.physical_address_provided = true; 145 mce->u.ue_error.physical_address = phys_addr; 146 } |
|
143 } 144 return; 145} 146 147/* 148 * get_mce_event: 149 * mce Pointer to machine_check_event structure to be filled. 150 * release Flag to indicate whether to free the event slot or not. --- 320 unchanged lines hidden --- | 147 } 148 return; 149} 150 151/* 152 * get_mce_event: 153 * mce Pointer to machine_check_event structure to be filled. 154 * release Flag to indicate whether to free the event slot or not. --- 320 unchanged lines hidden --- |