Received: by 10.223.164.202 with SMTP id h10csp1267639wrb; Fri, 17 Nov 2017 17:40:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMauvjnGGoWLhf5zCJiSQg9RwhpwUJhB6NYndSq6RTFkMu2hjU4Dmb7ZaQrlHpTcFgdjDIh1 X-Received: by 10.98.152.147 with SMTP id d19mr3875910pfk.95.1510969235212; Fri, 17 Nov 2017 17:40:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510969235; cv=none; d=google.com; s=arc-20160816; b=s3ijsgnpVqidqs43vtP7rO7YWlZKwHJGdBTznNHoz/L4L1GhcCPQeVdp5jM1ik5PE1 JLHzDIQx9HPwl5PzUbDlGuLz8W6XWZHvzX6TKzTrcmQZNvHuyfVPjhCqpFLrWEj87hJw JDqLLzHPWuTgnUoShaoL0uvtfcNKiRKs2YUrRTJlSL3JVZ7oZLDfPClJxw9pg5BtTTA3 ubUq6xfI0YVn/qf11X0cDQnemP/OOkz8H+WKwQVpnjMM5grz7EBTH0Oefk2aqkvAyuVn MfjaX0H6ImTtyCAy59rlbLweDRMxjvzruR/MH9s+5vSwRl7zcK2kDqMtqMgPDKonzOJF 0BgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=fWdGBiaF1PqlFhxC0+bDI43ulxkUF+J1rs7SbaQL6hU=; b=AVtQtut4Ua9SYElFI6NLZRncHfrZz3BJnWflfZku+yxkYD56V6HkIC/kNxX2djdgd2 O4G3t6QkITAd0R5QSgRNE9ZZyJClnQXA+3JBOoLR/aH9ubQuC96yXEvnESVJueURlo5H l/9Z4iY/oInrdOKLbonBgJco0EHMQarYUTKeM25fdWJHtMGGekeI+/EjjGKMuvNXyeM8 CJf+XpAerR224WMYBAxcwL0loA97hvInYFlPpejQoEPnRkwv34OPrDXJp6MEofKsFtdZ KRFPxIxftbRRiHGeSGesnqjKD5upBwvjrLY6Erbcpd7J4W3tj9Y9AMsgW360zJILLuyE /kAw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si3739557plb.644.2017.11.17.17.40.21; Fri, 17 Nov 2017 17:40:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbdKQSXO (ORCPT + 93 others); Fri, 17 Nov 2017 13:23:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:46118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbdKQSXA (ORCPT ); Fri, 17 Nov 2017 13:23:00 -0500 Received: from localhost (unknown [69.71.4.159]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20523218B2; Fri, 17 Nov 2017 18:22:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20523218B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Fri, 17 Nov 2017 12:22:56 -0600 From: Bjorn Helgaas To: Tyler Baicar Cc: bhelgaas@google.com, jonathan.derrick@intel.com, keith.busch@intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI/AER: don't call recovery process for correctable errors Message-ID: <20171117182256.GA16907@bhelgaas-glaptop.roam.corp.google.com> References: <1503940184-29423-1-git-send-email-tbaicar@codeaurora.org> <20171002231903.GE5407@bhelgaas-glaptop.roam.corp.google.com> <86882a99-ef54-a71b-3e97-8ecc46d8d14b@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86882a99-ef54-a71b-3e97-8ecc46d8d14b@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 15, 2017 at 09:46:42AM -0500, Tyler Baicar wrote: > On 10/2/2017 7:19 PM, Bjorn Helgaas wrote: > >On Mon, Aug 28, 2017 at 11:09:44AM -0600, Tyler Baicar wrote: > >>Correctable errors do not need any software intervention, so > >>avoid calling into the software recovery process for correctable > >>errors. > >> > >>Signed-off-by: Tyler Baicar > >>--- > >> drivers/pci/pcie/aer/aerdrv_core.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >>diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c > >>index b1303b3..4765c11 100644 > >>--- a/drivers/pci/pcie/aer/aerdrv_core.c > >>+++ b/drivers/pci/pcie/aer/aerdrv_core.c > >>@@ -626,7 +626,8 @@ static void aer_recover_work_func(struct work_struct *work) > >> continue; > >> } > >> cper_print_aer(pdev, entry.severity, entry.regs); > >>- do_recovery(pdev, entry.severity); > >>+ if (entry.severity != AER_CORRECTABLE) > >>+ do_recovery(pdev, entry.severity); > >I think this is fine, and it mirrors what is done in > >handle_error_source(). > > > Hello, > > Will this patch be pulled into 4.15? Sorry, I didn't get to this in time for v4.15, but I put it on pci/aer for v4.16. I expanded the changelog to note that this means we won't call the driver's callbacks or emit the "recovery successful" message for correctable errors from APEI, and that this matches what we already do for the non-APEI path. Bjorn commit 72761170e6d5519c91136fd6cc80805a74ef9cfd Author: Tyler Baicar Date: Mon Aug 28 11:09:44 2017 -0600 PCI/AER: Skip recovery callbacks for correctable errors from ACPI APEI PCIe correctable errors are corrected by hardware. Software may log them, but no other software intervention is required. There are two paths to enter the AER recovery code: (1) the native path where Linux fields the AER interrupt and reads the AER registers directly, and (2) the ACPI path where firmware reads the AER registers and hands them off to Linux via the ACPI APEI path. The AER do_recovery() function calls driver error reporting callbacks (error_detected(), mmio_enabled(), resume(), etc), attempts recovery (for fatal errors), and logs a "AER: Device recovery successful" message. Since there's nothing to recover for correctable errors, the native path already skips do_recovery(), so it doesn't call the driver callbacks and or emit the message. Make the APEI path do the same. Signed-off-by: Tyler Baicar [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 744805232155..3e354f224422 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -633,7 +633,8 @@ static void aer_recover_work_func(struct work_struct *work) continue; } cper_print_aer(pdev, entry.severity, entry.regs); - do_recovery(pdev, entry.severity); + if (entry.severity != AER_CORRECTABLE) + do_recovery(pdev, entry.severity); pci_dev_put(pdev); } } From 1584143803622234034@xxx Wed Nov 15 14:47:39 +0000 2017 X-GM-THRID: 1576995657442027352 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread