Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbaKDBkd (ORCPT ); Mon, 3 Nov 2014 20:40:33 -0500 Received: from mail-pd0-f176.google.com ([209.85.192.176]:44683 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbaKDBka (ORCPT ); Mon, 3 Nov 2014 20:40:30 -0500 Message-ID: <1415065194.24825.13.camel@debian> Subject: Re: [PATCH 2/2] x86, mce, amd: extend mce-inject for support threshold interrupt event injection on AMD platform From: Chen Yucong To: Aravind Gopalakrishnan Cc: Borislav Petkov , tony.luck@intel.com, ak@linux.intel.com, gong.chen@linux.intel.com, linux-edac@vger.kernel.org, LKML Date: Tue, 04 Nov 2014 09:39:54 +0800 In-Reply-To: <5457C0B3.30007@amd.com> References: <1414718648-7766-1-git-send-email-slaoub@gmail.com> <1414718648-7766-3-git-send-email-slaoub@gmail.com> <5457C0B3.30007@amd.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-11-03 at 11:51 -0600, Aravind Gopalakrishnan wrote: > On 11/3/2014 11:05 AM, Aravind Gopalakrishnan wrote: > > > > There are three ways that have been used to report machine check event. > > And they are MCE, CMCI/Threshold Interrupt, and POLL. On the Intel > > platform, CMCI/Threshold Interrupt and POLL share the same event handler > > - machine_check_poll(). However, on the AMD platform, they have a > > separate event handler. amd_threshold_interrupt() is used for handling > > Threshold Interrupt event. And machine_check_poll() has been used for > > polling other events. > > > > This patch introduces a new flag MCJ_INTERRUPT that will be used to > > separate CMCI/Threshold Interrupt and POLL handler in mce-inject. > > > > Signed-off-by: Chen Yucong > > > --- > > arch/x86/include/asm/mce.h | 5 +++-- > > arch/x86/kernel/cpu/mcheck/mce-inject.c | 16 ++++++++++++++++ > > arch/x86/kernel/cpu/mcheck/threshold.c | 1 + > > 3 files changed, 20 insertions(+), 2 deletions(-) > > > > > We currently test decoding logic on AMD by performing mce injections > using edac/mce_amd_inj.c, > So instead of modifying mce-inject just for testing > amd_threshold_interrupt(), > Why not put it under mce_amd_inj? (It's AMD specific code anyway) > Until now, edac/mce_amd_inj.c is just used for testing EDAC decoding logic on AMD. But there are some tools that can be also used to decode machine check error information, such as `rasdaemon' and `mcelog'. If we want to use mce_amd_inj.c for error injection, we may need to move it. In addition, EDAC decoding logic does not need to access machine check specific `MSRs', so edac/mce_amd_inj.c can work well for error injection. Finally, amd_threshold_interrupt is AMD specific code, intel_threshold_interrupt is also Intel specific code. thx! cyc -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/