[PATCH 2/2] powerpc/book3s: Display task info for MCE error in user mode.

Nicholas Piggin npiggin at gmail.com
Thu Mar 30 11:09:47 AEDT 2017


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()) {


> @@ -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