Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932303AbXLOBEP (ORCPT ); Fri, 14 Dec 2007 20:04:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754408AbXLOBEA (ORCPT ); Fri, 14 Dec 2007 20:04:00 -0500 Received: from gateway-1237.mvista.com ([63.81.120.158]:45424 "EHLO gateway-1237.mvista.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753256AbXLOBD7 (ORCPT ); Fri, 14 Dec 2007 20:03:59 -0500 Subject: [PATCH] arch/x86/kernel/cpu/mcheck/p4.c, kernel 2.6.24-rc5 From: Min Zhang Reply-To: mzhang@mvista.com To: linux-kernel@vger.kernel.org Content-Type: text/plain Organization: Monta Vista Date: Fri, 14 Dec 2007 17:03:56 -0800 Message-Id: <1197680636.24198.59.camel@dhcp140.mvista.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 (2.8.2.1-3.fc6) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Consolidate printk and insert CPU id to cleanup SMP interleaved output. In SMP, the machine check exception dispatches all logical processors within a physical package to the machine-check exception handler, so the printk within each handler outputs concurrently and makes the output unreadable. Refer to Intel system programming guide Part 1 Section 7.8.5 http://developer.intel.com/design/processor/manuals/253668.pdf Signed-off-by: Min Zhang Index: linux-2.6.24-rc5/arch/x86/kernel/cpu/mcheck/p4.c =================================================================== --- linux-2.6.24-rc5.orig/arch/x86/kernel/cpu/mcheck/p4.c +++ linux-2.6.24-rc5/arch/x86/kernel/cpu/mcheck/p4.c @@ -158,32 +158,35 @@ static fastcall void intel_machine_check if (mce_num_extended_msrs > 0) { struct intel_mce_extended_msrs dbg; intel_get_extended_msrs(&dbg); - printk (KERN_DEBUG "CPU %d: EIP: %08x EFLAGS: %08x\n", - smp_processor_id(), dbg.eip, dbg.eflags); - printk (KERN_DEBUG "\teax: %08x ebx: %08x ecx: %08x edx: %08x\n", - dbg.eax, dbg.ebx, dbg.ecx, dbg.edx); - printk (KERN_DEBUG "\tesi: %08x edi: %08x ebp: %08x esp: %08x\n", + printk (KERN_DEBUG "CPU %d: EIP: %08x EFLAGS: %08x\n" + "\teax: %08x ebx: %08x ecx: %08x edx: %08x\n" + "\tesi: %08x edi: %08x ebp: %08x esp: %08x\n", + smp_processor_id(), dbg.eip, dbg.eflags, + dbg.eax, dbg.ebx, dbg.ecx, dbg.edx, dbg.esi, dbg.edi, dbg.ebp, dbg.esp); } for (i=0; i