Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933487AbbHLCHe (ORCPT ); Tue, 11 Aug 2015 22:07:34 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:20639 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933111AbbHLCHc (ORCPT ); Tue, 11 Aug 2015 22:07:32 -0400 Subject: Re: [PATCH] x86/mce: fix failed to reenable cmci when swiching to interrupt mode To: Borislav Petkov References: <1439287777-8270-1-git-send-email-xiexiuqi@huawei.com> <20150811144637.GA5573@nazgul.tnic> CC: , , , , , , , From: Xie XiuQi Message-ID: <55CAAA51.8030901@huawei.com> Date: Wed, 12 Aug 2015 10:07:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:42.0) Gecko/20100101 Thunderbird/42.0a1 MIME-Version: 1.0 In-Reply-To: <20150811144637.GA5573@nazgul.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.210] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1740 Lines: 53 On 2015/8/11 22:46, Borislav Petkov wrote: > 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") OK, thanks. > > 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? My fault, it's v3.15+. Thanks, Xie XiuQi > -- 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/