Thread (9 messages) flat view 9 messages, 4 authors, 2017-09-08

Re: [rfc 2/3] powerpc/mce: Extract physical_address for UE errors

From: Benjamin Herrenschmidt <hidden>
Date: 2017-09-06 22:56:21

On Tue, 2017-09-05 at 14:15 +1000, Balbir Singh wrote:
quoted hunk ↗ jump to hunk
 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.

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help