[rfc 2/3] powerpc/mce: Extract physical_address for UE errors
Balbir Singh
bsingharora at gmail.com
Thu Sep 7 11:52:14 AEST 2017
On Thu, Sep 7, 2017 at 8:56 AM, Benjamin Herrenschmidt <benh at au1.ibm.com> wrote:
> On Tue, 2017-09-05 at 14:15 +1000, Balbir Singh wrote:
>> void save_mce_event(struct pt_regs *regs, long handled,
>> struct mce_error_info *mce_err,
>> - uint64_t nip, uint64_t addr)
>> + uint64_t nip, uint64_t addr, uint64_t phys_addr)
>> {
>> int index = __this_cpu_inc_return(mce_nest_count) - 1;
>> struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]);
>> @@ -140,6 +140,10 @@ void save_mce_event(struct pt_regs *regs, long handled,
>> } else if (mce->error_type == MCE_ERROR_TYPE_UE) {
>> mce->u.ue_error.effective_address_provided = true;
>> mce->u.ue_error.effective_address = addr;
>> + if (phys_addr != ULONG_MAX) {
>> + mce->u.ue_error.physical_address_provided = true;
>> + mce->u.ue_error.physical_address = phys_addr;
>> + }
>> }
>> return;
>
> Where is "addr" coming from ? Keep in mind that on P9 at least, a UE
> will *not* give you an EA in DAR in most cases.
The EA is derived in mce_handle_derror() via page table walk and
analyse_instr(), its the best
we can do FWIK
Balbir Singh.
More information about the Linuxppc-dev
mailing list