Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1175130pxb; Wed, 13 Apr 2022 23:24:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd5FLA/30m9tbU0f1iQHPrLP9Th2O778VnI0Bhs/dRBRR3ofMkikxJ/NvxuD/albOFqG4a X-Received: by 2002:a17:907:6d03:b0:6e8:d292:6b60 with SMTP id sa3-20020a1709076d0300b006e8d2926b60mr1100333ejc.38.1649917499528; Wed, 13 Apr 2022 23:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649917499; cv=none; d=google.com; s=arc-20160816; b=U33PTVl2bQfjsE1XuEG4AfVoEiAOTSO5MaV9Hz8S39xrgEO/kIMXAxzEKHA5V7ffJG qZmpqPngOLDnoM8e7ww2lrqKnt2kjt7cur6nCkvlOre0CR5AebIi2xc2rbpIIAD6I2kl Ad8URyCje28HtU8ua0sK4m2adFzgVVZ/Mthq+CNdpO4kIaCH2J8XMkkM4MWokGSZa2Ni RqK3MkspR0rRFMyz8th5r0sU3OPituNQBa8lCDFWOvccppmZfaa8UP26h79QwtB+oHzp YPwS7VyKQHffkTTrFrgC+GG/iomZDSVoIZhiLvG2F1kpDNqjXn5Z6Rpv6T6jDZ2CuyRf g5JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=neQem7fKi9M5h9rSgqoXTBfJOT2GNcD3uDfFn4ZsxEE=; b=y+VjzZQ1SNv1GzCyvf+SVUB8o7gYO02thu7w5/6JnH7DhnjA67fmO2UGqgrjWCReBn EBsJgNq7VfhsKj+ONB0jSgPwNed5reaeb9f1G5KH1TMMnYBAqcgY9O42GbxhIq9o0FkQ yEr8O3LMh6BhOaabTPptSZW0tjOaovBXghXVzZ919X0ZP84YpmbS6J0EDEBcydPTG2t2 0vKPrXQqjzNvAPl2UYkTrh7gMcpuaI6dFehnjjRv+EEqLGeEth7hoZZOu6fnQlMpfOS2 uSW9lT7n5v7MsasQtqZ/vIFA+v4AD/66z5VPTgdvSwTpiAEnyf/AP++Z2jdKwh0xCuEN 1ksQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cIfCKeaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a056402124600b0041d61b09f51si3067648edw.362.2022.04.13.23.24.34; Wed, 13 Apr 2022 23:24:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cIfCKeaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233758AbiDMQCH (ORCPT + 99 others); Wed, 13 Apr 2022 12:02:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbiDMQCG (ORCPT ); Wed, 13 Apr 2022 12:02:06 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B3D7BC0F; Wed, 13 Apr 2022 08:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649865584; x=1681401584; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=IOuTa9C4rsATqdYchXRtejTgep66H9EsizaX+99YlhU=; b=cIfCKeaSBsEVu3uR8roEDnz3fosyM+MPaZhWOYB+ddqKtWn0UHHUDwXL /H1aS9Nd2qKBfSyz4QbC27TurefQQJbuWdaYw0A1iwobgWHaWh5fUxL1x CjUauUiq4w5BgyuLaZ+lICZ5Eivhg69dBA6KYrclEyU56MYtjbexetVg3 hHgPQbiaDE53Uo90bmzx6MA+wFlhxE2zvSUVQsmNfhVt5XomXVpWL+e0t I4wRKrJ9wJvnEpUNAhxSmkP4VOeidup8roieIBdJTJ5PiwXrp5KQHOEvq BEee7ZkdDPCudrUMpTB9o484LtHwwVoP/iHD5KavVaysME4nk7Ct6cTzo A==; X-IronPort-AV: E=McAfee;i="6400,9594,10316"; a="325612082" X-IronPort-AV: E=Sophos;i="5.90,257,1643702400"; d="scan'208";a="325612082" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 08:59:43 -0700 X-IronPort-AV: E=Sophos;i="5.90,257,1643702400"; d="scan'208";a="590805753" Received: from agluck-desk3.sc.intel.com ([172.25.222.78]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 08:59:43 -0700 Date: Wed, 13 Apr 2022 08:59:41 -0700 From: "Luck, Tony" To: Borislav Petkov Cc: Yazen Ghannam , Smita Koralahalli , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, Dave Hansen Subject: Re: [PATCH v5 2/2] x86/mce: Add support for Extended Physical Address MCA changes Message-ID: References: <20220412154038.261750-1-Smita.KoralahalliChannabasappa@amd.com> <20220412154038.261750-3-Smita.KoralahalliChannabasappa@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2022 at 04:54:00PM +0200, Borislav Petkov wrote: > + if (!mca_cfg.bootlog) > + m_fl = MCP_DONTLOG; > > -/* > - * Do a final check to see if there are any unused/RAZ banks. > - * > - * This must be done after the banks have been initialized and any quirks have > - * been applied. > - * > - * Do not call this from any user-initiated flows, e.g. CPU hotplug or sysfs. > - * Otherwise, a user who disables a bank will not be able to re-enable it > - * without a system reboot. > - */ > -static void __mcheck_cpu_check_banks(void) > -{ > - struct mce_bank *mce_banks = this_cpu_ptr(mce_banks_array); > - u64 msrval; > - int i; > + /* > + * Log the machine checks left over from the previous reset. Log them > + * only, do not start processing them. That will happen in mcheck_late_init() > + * when all consumers have been registered on the notifier chain. > + */ > + bitmap_fill(all_banks, MAX_NR_BANKS); > + machine_check_poll(MCP_UC | MCP_QUEUE_LOG | m_fl, &all_banks); If MCP_DONTLOG bit is set, then this does little. It will find banks with valid records, NOT log them, clear them. But then we loop and clear all banks. So maybe do: if (mca_cfg.bootlog) { bitmap_fill(all_banks, MAX_NR_BANKS); machine_check_poll(MCP_UC | MCP_QUEUE_LOG, &all_banks); } > __mcheck_cpu_init_clear_banks(); This will a new name to indicate that it is logging as well as init & clear. Otherwise seeems fine. -Tony