Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758370AbZJEDIu (ORCPT ); Sun, 4 Oct 2009 23:08:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758275AbZJEDIt (ORCPT ); Sun, 4 Oct 2009 23:08:49 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:48628 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754304AbZJEDIs (ORCPT ); Sun, 4 Oct 2009 23:08:48 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Message-ID: <4AC9630D.70106@jp.fujitsu.com> Date: Mon, 05 Oct 2009 12:07:57 +0900 From: Hidetoshi Seto User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Huang Ying CC: Ingo Molnar , "H. Peter Anvin" , Andi Kleen , "linux-kernel@vger.kernel.org" Subject: [PATCH 4/6] mce-inject: allow injecting status=0 to poll handler References: <1254100882.15717.1312.camel@yhuang-dev.sh.intel.com> <4AC95F5A.4000708@jp.fujitsu.com> In-Reply-To: <4AC95F5A.4000708@jp.fujitsu.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1583 Lines: 50 We can inject void data to exception handler by writing data with status=0 and flag=MCE_INJ_EXCEPTION. But without this patch we cannot do same to poll handler by status=0 and flag=!MCE_INJ_EXCEPTION. This change will allow us to test behavior of poll handler with no data. Signed-off-by: Hidetoshi Seto --- arch/x86/kernel/cpu/mcheck/mce-inject.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index e9379b6..105e527 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c @@ -87,7 +87,7 @@ static int mce_raise_notify(struct notifier_block *self, cpu_clear(cpu, mce_inject_cpumask); if (m->inject_flags & MCE_INJ_EXCEPTION) raise_exception(m, args->regs); - else if (m->status) + else raise_poll(m); return NOTIFY_STOP; } @@ -123,13 +123,12 @@ static int raise_local(void) ret = -EINVAL; } printk(KERN_INFO "MCE exception done on CPU %d\n", cpu); - } else if (m->status) { + } else { printk(KERN_INFO "Starting machine check poll CPU %d\n", cpu); raise_poll(m); mce_notify_irq(); printk(KERN_INFO "Machine check poll done on CPU %d\n", cpu); - } else - m->finished = 0; + } return ret; } -- 1.6.4.3 -- 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/