Received: by 10.223.164.221 with SMTP id h29csp696990wrb; Wed, 11 Oct 2017 07:39:47 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAkrhNbkY7Xun1DM+sij2GkDHVytpsjIiGYfbD+3fljqh/oD/qX4HXd5WTdIRF1u5coSXH2 X-Received: by 10.84.248.144 with SMTP id q16mr15703707pll.345.1507732787667; Wed, 11 Oct 2017 07:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507732787; cv=none; d=google.com; s=arc-20160816; b=sNL+CUMbDmBKYzxX6+lFtamogftdXeb5U3IrwxryPcKqRUQ+BVCw7YbI5O20kDDhJ6 rgEOoPSHxRqVcjski8Bz6zi6HP+dSFztvTe1KOknMJPsZIBiCQDguGYE1tYbXeVx4bVJ J6AoEWt2JmZ8pxSacDdaSw06+6QVjEJyZ0N1oqsLgV36UyG7GdnG6wwvRHP1ZXpSF7vC ImMZlZ9LzNFtd7OOxKIaHEzSdn5GqNsOhFoBz9xaLYxcFtCHBAYvingENUi5SVjchNCj 8NmyXzxOvX71FlU18isgd/4h1D3PPJ2eAQBY4XQwgBFJANFgH5vI43lDMch8sawKJytY 7Izg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=VaiMmLdR6sGtGVEhUDmYhiNGMMcUQpDGSLV3m/YniuU=; b=qXDXIVo3Rw1nYFsGXPu9hjGOa3/u/Xm1kmkb2Bz4lmOlHweMyvL3DmH25nJvAS4wKe 9vMh8+Vidnpe/4xYxxukQ/kACUBoDY+ZB+4iGztEgGNL127nDYH6NURQWCccqx2SDUxx YqQPqQ8gKZJXaw3N1hMk7pyX5KDNTPBdsLXrhusDLPKjPjImy3aQ7nTIdXNWIVKdVtx/ SGDiR0ioKDfCr7Lqrqb3ES+ZoeFey4PglfaHdj+ZmDvmpNq/KJ2IRXeDhG0KZ8Pa3046 hRkbO4FAl9vX8sWTd9VdxKyP9bPSLbXd7PmC5x5Y7ebGQ3LWGcFpS2yjFwJQvA20teLt AIXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=bxAURMag; dkim=pass header.i=@codeaurora.org header.s=default header.b=ej1Bdd3E; 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 t17si5631485plo.623.2017.10.11.07.39.32; Wed, 11 Oct 2017 07:39:47 -0700 (PDT) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=bxAURMag; dkim=pass header.i=@codeaurora.org header.s=default header.b=ej1Bdd3E; 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 S1752532AbdJKOhy (ORCPT + 99 others); Wed, 11 Oct 2017 10:37:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34316 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbdJKOhw (ORCPT ); Wed, 11 Oct 2017 10:37:52 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C9B796021A; Wed, 11 Oct 2017 14:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1507732672; bh=J/PROnAIB5OiEakWIS6lghayXkTzoUJgexig9UyYqJM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=bxAURMagR7BGjCPgH/OSvV9LQmuhk7pqFdSh+Ry52T0pUshTj50i2icwca/oEULWC kahCxZzqsmn7YLl64xzHHXygL4t5bHeBVsKE8iimi3up0/GNVeErACRbMvOmux8iCK OxPHIqIl9rzV15CaQNkewXq2TegzGnHBHWtnL0DE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.144] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tbaicar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 13B956021A; Wed, 11 Oct 2017 14:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1507732669; bh=J/PROnAIB5OiEakWIS6lghayXkTzoUJgexig9UyYqJM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ej1Bdd3ESfybDc9zIXeyP1N1YIls7cUSSVYK9ZoPpc01azhsFVhJuo7g80w4rHjdK SQh0Dj6HxpfE2vTlGJoVKn2vCDkgncxqjVAGCpXYvAqUhVd302BOp8KddSbadYFsHA Ygp+GX+G4Rlw0CadHdBO/ju9o71EpvoS4KKEwajI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 13B956021A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org Subject: Re: [PATCH] PCI/AER: don't call recovery process for correctable errors To: Bjorn Helgaas Cc: bhelgaas@google.com, jonathan.derrick@intel.com, keith.busch@intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <1503940184-29423-1-git-send-email-tbaicar@codeaurora.org> <20171002231903.GE5407@bhelgaas-glaptop.roam.corp.google.com> From: Tyler Baicar Message-ID: Date: Wed, 11 Oct 2017 10:37:47 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171002231903.GE5407@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). > > But I want to converge the APEI path and the "native" AER path, so as > one tiny step in that direction, can you look into doing this test > once, e.g., move the test from handle_error_source() into > do_recovery(), where one test will handle both paths? Hello Bjorn, Thank you for the input! I've looked into this and it seems there is still going to need to be two versions of this check. The native AER path goes through handle_error_source() and for correctable errors requires the write to PCI_ERR_COR_STATUS, but the APEI path does not require this write. I could move this check to the beginning of do_recovery() so it returns right away for correctable errors and remove the else line in handle_error_source() so it always calls into do_recovery(). That doesn't seem like a very clean solution though since then there are still two checks for correctable errors and now we're calling into do_recovery() in both cases for nothing :) Thanks, Tyler From 1580189754897847351@xxx Mon Oct 02 23:19:44 +0000 2017 X-GM-THRID: 1576995657442027352 X-Gmail-Labels: Inbox,Category Forums