Received: by 10.192.165.148 with SMTP id m20csp2410433imm; Thu, 26 Apr 2018 10:29:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx482QtVIaEYyJdzvXGp8SVh3J7UO8ozPhyOjRTG6KwiTtOlwf51ZpRyEWJyYq916tgq3y8dk X-Received: by 10.99.114.78 with SMTP id c14mr27224540pgn.199.1524763776514; Thu, 26 Apr 2018 10:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524763776; cv=none; d=google.com; s=arc-20160816; b=RanexL4/a2gw0JxjHsUfIwZhQm8Z/5pcOyvG9W5JfW0T8Eg/8E1ISRsZssuHc5DvJo H9yS92DznkWuxb9hfkV94Q1wrFEAo8p8FYbhUSfYkeVNKl+1GfxAHtwMO9PtJSeqCA7K /Qe+5QNyY8Jz7C+WVD3H4VO71eILkUTI1is2cyNKTmFcmgEo/s8kj0zjObUBEOCNTY+d xYgi8yVCze/FTzqu3tSreqG45AfsW8fDKRI6ZUjAy+SVqyQ07lUczINRzpfVMCunWru7 kCt/yyjTZk/x2t+SUtNHCavuP8qoSYJHaRJLIAVzB/B4d/NO09H+gylyOoxFOmcPB5Xu rWEg== 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=ExaoLP6BzlUaofr04NmtWm2AD6PQO0u2W6PQJ/rpFxo=; b=mMgg4+knpaK31AThy/fMCm7N0+u86tGkanerLEhrs1I/ZsQKrAIMHe+cS0cNlKVugn x9GZyBzNaZOPeMagwLs53ypJUToPb0+i8ETe2Wrf5ypoY3hvEL5laL31wsO2jqDrfTKd 4oyuVd7uHgW+WMiM+U63OE4PUcunh+doVvqRM6Xpx+1zffR8mlDb2IkyQETRw/7jEe6c mZrINRYG75s8VFqjmB5Ut+aF3dtIRWUV7+FSUJlKmX1gz3MkJ/O8/+npIdvwnpHeAXMO hG9zSZ2ES8vBlQOPFTuuoTWZlVsLDTt3pUkTnBZkgTXustpTetW8z1ttnqrtCMPBVY7z iJ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=XNNpWcFX; dkim=pass header.i=@codeaurora.org header.s=default header.b=WXO4jM1Z; 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 e6si2559767pgr.374.2018.04.26.10.29.22; Thu, 26 Apr 2018 10:29:36 -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=XNNpWcFX; dkim=pass header.i=@codeaurora.org header.s=default header.b=WXO4jM1Z; 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 S1756911AbeDZR2C (ORCPT + 99 others); Thu, 26 Apr 2018 13:28:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53224 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756885AbeDZR1v (ORCPT ); Thu, 26 Apr 2018 13:27:51 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 99ACF60F8E; Thu, 26 Apr 2018 17:27:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524763670; bh=YHqyGIKI/AJpVvU9q2yixQRDESOsqrFpvM165VtyVoo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=XNNpWcFXq84gbJHTzMvUThmvO6bDrC+PlIzINaGhavWuMxsWd48Uz0VcK9mYOHPzO EBYBAPwW/ykaiEXp4EBMPjO58bso/JsGgQCjGD+dhWgB8OkQdMTKn6MVXK6Izeu7kE SXjNXTpRrGL+1xEbSYVCM1ssfoMBGNW+Bl0U7EV0= 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.93] (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 DB35760C64; Thu, 26 Apr 2018 17:27:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524763669; bh=YHqyGIKI/AJpVvU9q2yixQRDESOsqrFpvM165VtyVoo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WXO4jM1ZmnwltyFPEWrSafHv41Py4vWoySSyspjXxRe+CbxjgWmgIE0wHMhEfbBWC Y5HCh0Cwa2AZHXnwHpqTvnJrOutATRg6u6yv3YpT2AJ2lBJ0rHzjIjWzarVhbwPaKq v3AK5HNG8N/FsSb2vTLp4JJeF13gJLa+IrLJdOg8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DB35760C64 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 RESEND] PCI/AER: Use a common function to print AER error bits To: Alexandru Gagniuc , bhelgaas@google.com, linux-pci@vger.kernel.org Cc: gregkh@linuxfoundation.org, fred@fredlawl.com, linux-kernel@vger.kernel.org, alex_gagniuc@dellteam.com, austin_bolen@dell.com, keith.busch@intel.com References: <20180417170943.1767-1-mr.nuke.me@gmail.com> From: Tyler Baicar Message-ID: Date: Thu, 26 Apr 2018 13:27:47 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180417170943.1767-1-mr.nuke.me@gmail.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 4/17/2018 1:09 PM, Alexandru Gagniuc wrote: > On errors reported from CPER, cper_print_bits() was used to log the > AER bits. This resulted in hard-to-understand messages, without a > prefix. Instead use __aer_print_error() for both native AER and CPER > to provide a more consistent log format. > > Signed-off-by: Alexandru Gagniuc Tested-by: Tyler Baicar Thanks! > --- > drivers/pci/pcie/aer/aerdrv_errprint.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c > index cfc89dd57831..cfae4d52f848 100644 > --- a/drivers/pci/pcie/aer/aerdrv_errprint.c > +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c > @@ -216,28 +216,30 @@ EXPORT_SYMBOL_GPL(cper_severity_to_aer); > void cper_print_aer(struct pci_dev *dev, int aer_severity, > struct aer_capability_regs *aer) > { > - int layer, agent, status_strs_size, tlp_header_valid = 0; > + int layer, agent, tlp_header_valid = 0; > u32 status, mask; > - const char **status_strs; > + struct aer_err_info info; > > if (aer_severity == AER_CORRECTABLE) { > status = aer->cor_status; > mask = aer->cor_mask; > - status_strs = aer_correctable_error_string; > - status_strs_size = ARRAY_SIZE(aer_correctable_error_string); > } else { > status = aer->uncor_status; > mask = aer->uncor_mask; > - status_strs = aer_uncorrectable_error_string; > - status_strs_size = ARRAY_SIZE(aer_uncorrectable_error_string); > tlp_header_valid = status & AER_LOG_TLP_MASKS; > } > > layer = AER_GET_LAYER_ERROR(aer_severity, status); > agent = AER_GET_AGENT(aer_severity, status); > > + memset(&info, 0, sizeof(info)); > + info.severity = aer_severity; > + info.status = status; > + info.mask = mask; > + info.first_error = 0x1f; > + > pci_err(dev, "aer_status: 0x%08x, aer_mask: 0x%08x\n", status, mask); > - cper_print_bits("", status, status_strs, status_strs_size); > + __aer_print_error(dev, &info); > pci_err(dev, "aer_layer=%s, aer_agent=%s\n", > aer_error_layer[layer], aer_agent_string[agent]); > -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.