Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2243577ybv; Fri, 14 Feb 2020 14:30:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzuvttRiziCtA2+cLL38ptGI/zNcWOJ5hGZ5cVhExQshAW1GgOcjih7JCE3MKGOrOfCmyC2 X-Received: by 2002:a05:6830:99:: with SMTP id a25mr4194229oto.130.1581719410525; Fri, 14 Feb 2020 14:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581719410; cv=none; d=google.com; s=arc-20160816; b=lwmy3QaMJaTNVmIhi9cvMDsH8D5lQ6hntzTHwOPcPepdIm6RZ+EPREUgZqHGqzFf7Y P4+EIXDs6TCpacGvlzIQm2dt242t8IsBqp37LusTn2UTsAUKdPhbgXIlkW3bjwP1vYsy Fogn8MGunJympYn8A8tqhHW2Uf2Uzb/qVsCJYb/Tj7UIkSOLhyJ+TZ95wg1HAJUPQg3a 4Hyh9gTT6H+ZR+Tdx0BirdTuQh4srfz73jK8+sAFPteBO39c6be9DXvgZMu1B3uAZrg+ cyOhZeAuKuxvAqdVW0sVz29So9jz3sWzspdqJtkJI3Bgw0Wt0HWLdhH2qK4fnD9PXFFi AUJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TeMNK2sPtuBi2tjWDEB2Yp3utPU2n7LXo+nyh+dNEOY=; b=yH2nM4Ioc8vzXT7ZfncEqA7hdk/143T/JFzBgN5Y4f255bvV+MH2j7ni5iebB8/SK0 j0mnN9rxwJUWUpDGw1CUU4MjH9LvyVXFt7ZP8FiKDy/qvoSw8SF0J31Zi77zrNByYd/J L3aYnGdE8rrhhrelxPt6H76ULW+EDLLSTqcHF4yVBttkdK0S7Z+Ix4bN6/eRubZ7eu1Y 4Bn5FCWnW0Vf8SpcI+NI0ohYUVafuA0WurTCPS2HMH2N7zoXl5runU9A1BpRQU0/WEQo HmwNwDhmn43XpeIZ3sq02ECykc14KZBm7GGoprW7bIRTbU/FtLhsIrbau1F49WeK17JB MkNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k205si3382598oib.64.2020.02.14.14.29.57; Fri, 14 Feb 2020 14:30:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbgBNW2h (ORCPT + 99 others); Fri, 14 Feb 2020 17:28:37 -0500 Received: from mga05.intel.com ([192.55.52.43]:5118 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727928AbgBNW1W (ORCPT ); Fri, 14 Feb 2020 17:27:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 14:27:21 -0800 X-IronPort-AV: E=Sophos;i="5.70,442,1574150400"; d="scan'208";a="227756426" Received: from agluck-desk2.sc.intel.com ([10.3.52.68]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 14:27:21 -0800 From: Tony Luck To: Borislav Petkov Cc: Tony Luck , x86@kernel.org, Andy Lutomirski , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/7] New way to track mce notifier chain actions Date: Fri, 14 Feb 2020 14:27:13 -0800 Message-Id: <20200214222720.13168-1-tony.luck@intel.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200212204652.1489-1-tony.luck@intel.com> References: <20200212204652.1489-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Parts 1 & 2 are just cleanup. CEC should follow the same rules as everyone else who wants to be on the mce notifier chain. No real reason for it to have direct hooks into mce/core.c [No substantive change since RFC version 1, but note that I have kept the change to make CEC a "normal" user of the mce notifier chain. Result is a few checks for if (mce->kflags & MCE_HANDLED_CEC) in EDAC etc. drivers.] Part 3 adds a field to struct mce, and defines the BIT fields for each class of notifier. All EDAC drivers share the same BIT since only one of them should be active. [Boris: Changed name of new field to "kflags" and made it __u64, so plenty of space for possible future other uses] Part 4 Re-done since draft based on Luto and Tglx comments that we should kill of all usage of NOTIFY_STOP. This patch now gets rid of all but one. That's an AMD case where it looks like they don't want to decode some particular errors on a specific platform. The right fix for that is to take Luto's advice and filter out before that item gets to the notifier chain. We even already have a filter function (filter_mce) to do that! But that change needs to be handled by someone with the appropriate h/w. Part 5 Now just checks for mce->kflags in the default handler at the end of the chain to decide whether to print. Part 6 NEW - add mce=print_all option to override default and print everything to the console. Intended for debug, or desperation scenarios where other logs are lost. Part 7 NEW - Delete the code that tries to make sure only one out of acpi_extlog and the current loaded EDAC driver deals with an error. Tony Luck (7): x86/mce: Rename "first" function as "early" x86/mce: Convert corrected error collector to use mce notifier x86/mce: Add new "kflags" field to "struct mce" x86/mce: Fix all mce notifiers to update the mce->kflags bitmask x86/mce: Change default mce logger to check mce->kflags x86/mce: Add mce=print_all option x86/mce: Drop the EDAC report status checks arch/x86/include/asm/mce.h | 15 +++---- arch/x86/include/uapi/asm/mce.h | 9 ++++ arch/x86/kernel/cpu/mce/core.c | 58 ++++++++------------------ arch/x86/kernel/cpu/mce/dev-mcelog.c | 5 +++ arch/x86/kernel/cpu/mce/internal.h | 1 + drivers/acpi/acpi_extlog.c | 19 ++------- drivers/acpi/nfit/mce.c | 1 + drivers/edac/edac_mc.c | 61 ---------------------------- drivers/edac/i7core_edac.c | 5 ++- drivers/edac/mce_amd.c | 9 +++- drivers/edac/pnd2_edac.c | 8 ++-- drivers/edac/sb_edac.c | 7 ++-- drivers/edac/skx_common.c | 3 +- drivers/ras/cec.c | 29 +++++++++++++ include/linux/edac.h | 8 ---- 15 files changed, 91 insertions(+), 147 deletions(-) base-commit: b19e8c68470385dd2c5440876591fddb02c8c402 -- 2.21.1