[PATCH 2/2] powerpc/book3s: Display task info for MCE error in user mode.
Mahesh Jagannath Salgaonkar
mahesh at linux.vnet.ibm.com
Thu Mar 30 18:04:55 AEDT 2017
On 03/30/2017 05:39 AM, Nicholas Piggin wrote:
> On Tue, 28 Mar 2017 19:15:28 +0530
> Mahesh J Salgaonkar <mahesh at linux.vnet.ibm.com> wrote:
>
>> From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
>>
>> For MCE that hit while in use mode MSR(HV=1,PR=1), print the task info on the
>> console MCE error log. This will help to identify application that stumbled
>> upon MCE error.
>
> I think you may still want these details for a task currently in
> kernel. How about something like if (!in_interrupt()) {
We queue up the MCE event to delay the printing of recovered MCEs in the
kernel. We may have to hook up the task details in the MCE event.
>
>
>> @@ -311,8 +312,13 @@ void machine_check_print_event_info(struct machine_check_event *evt)
>> printk("%s%s Machine check interrupt [%s]\n", level, sevstr,
>> evt->disposition == MCE_DISPOSITION_RECOVERED ?
>> "Recovered" : "Not recovered");
>> - printk("%s NIP [%016llx]: %pS\n", level, evt->srr0,
>> + if (user_mode) {
>> + printk("%s NIP: [%016llx] PID: %d Comm: %s\n", level,
>> + evt->srr0, current->pid, current->comm);
>> + } else {
>> + printk("%s NIP [%016llx]: %pS\n", level, evt->srr0,
>> (void *)evt->srr0);
>> + }
>> printk("%s Initiator: %s\n", level,
>> evt->initiator == MCE_INITIATOR_CPU ? "CPU" : "Unknown");
>> switch (evt->error_type) {
>
More information about the Linuxppc-dev
mailing list