Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934282AbbHKOqg (ORCPT ); Tue, 11 Aug 2015 10:46:36 -0400 Received: from mail.skyhub.de ([78.46.96.112]:40906 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933364AbbHKOqf (ORCPT ); Tue, 11 Aug 2015 10:46:35 -0400 Date: Tue, 11 Aug 2015 16:46:37 +0200 From: Borislav Petkov To: Xie XiuQi Cc: tony.luck@intel.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, zhangliguang@huawei.com Subject: Re: [PATCH] x86/mce: fix failed to reenable cmci when swiching to interrupt mode Message-ID: <20150811144637.GA5573@nazgul.tnic> References: <1439287777-8270-1-git-send-email-xiexiuqi@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1439287777-8270-1-git-send-email-xiexiuqi@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 48 On Tue, Aug 11, 2015 at 06:09:37PM +0800, Xie XiuQi wrote: > Zhang Liguang report a bug as bellow: > 1) system detected cmci storm on current cpu > 2) disable cmci interrupt on banks ownd by current cpu, then swiching to poll mode > 3) a few minites later, system swiching to interrupt mode on current cpu > 4) we expect system to reenable cmci interrupt on banks ownd by current cpu > mce_intel_adjust_timer > |-> cmci_reenable > |-> cmci_discover # but, ownd banks is ignore here > > > static void cmci_discover(int banks) > > ... > > for (i = 0; i < banks; i++) { > > ... > > if (test_bit(i, owned)) # ownd banks is ignore here > > continue; > > In this patch, we add a func cmci_storm_enable_banks(), just to enable banks > which ownd by current cpu without clean the ownd flags. We call this func > instead of cmci_reenble() when swiching to interrupt mode. Hmm, and we cannot clear the owned bit because those banks won't be polled otherwise, see: 27f6c573e0f7 ("x86, CMCI: Add proper detection of end of CMCI storms") Yuck. Well, ok, but do it differently, please: rename cmci_storm_disable_banks() to cmci_storm_switch_banks(bool on) which turns them on and off. Unless Tony has a better suggestion... > Reported-by: Zhang Liguang > Cc: stable@vger.kernel.org # v4.1+ Why 4.1 only? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/