Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp910495imm; Wed, 23 May 2018 07:24:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomIqadkP3jrB7cjdoT77VOD63UjPrGNOKm3KYMROA54WsfS+rAL+7QMXrZj5ONNIpWpDBE X-Received: by 2002:a17:902:8494:: with SMTP id c20-v6mr3250060plo.66.1527085494140; Wed, 23 May 2018 07:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527085494; cv=none; d=google.com; s=arc-20160816; b=j5kOhtnYl+KUecKpG7D9UPdlUMTjictPlE0bZwdcxJrm/Ive5inrr6ekXvtJlDYmo9 9NAsnBLaH3NFUY1zyBEzzB9ndphprGTIN4cnxvcaptifBbxzYMMaB/iFZTWtiPSUWf2W N5HiOy+rJiwO5tpiHQ3NdAdGF48FZTULKxTOCNQAPdKWi4qM34qLpjuUMjXPbDLWHeQr cqEvXATNUbUSG+IePQUbnOSDPZMDcEOhml+tE/PmGj+Zgd46HtIBVHD/u8Kf2avyfusZ krRb2PzAQT/pZOPbzLfW6UyGYAXVxlCLIZcv5BVKZXIzjKGG3dod4+JN6zwARl6Gbn0C ZLtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature :arc-authentication-results; bh=qBuTGEbfYcgqR4+19PH2c+1KF6drIRHa+vBdOd/QE14=; b=jEhfJohpEalBmgNodPf7sjEHuit48F4nrxgM2ndTAP56nF93mmuXi1p3mBrECrNnjc to7bqsJ6uA7+9BXqqxqebvVwSsY/w55ZwoRK5pBXxz4UsgKe+NFsGgUS1C2aCryEFSHE Wd1Lfq5O1HUnXvPeLoqRauOLlQFNlqefhd2rs4rRzfkFnLt+YHOMIo05bCFR0M8KoE5N 9S/GsHRZ7jUTSdXpLchPmES40jE2yFXSSz2QRf1+nVi3ca9IGyS4EtrjBahWfZM/nULY 7AUuUyHHyhgj8Dj8EljLBr7Ki2obdH8tMCzFFn+0d66dwPtjm4Af1Tdd/+PY70gZ+/73 KLvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=NVXAOo7P; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=U+Q6Hny9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20-v6si4519635pgo.93.2018.05.23.07.24.36; Wed, 23 May 2018 07:24:54 -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=@fb.com header.s=facebook header.b=NVXAOo7P; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=U+Q6Hny9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933268AbeEWOYU (ORCPT + 99 others); Wed, 23 May 2018 10:24:20 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:20767 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932564AbeEWOYP (ORCPT ); Wed, 23 May 2018 10:24:15 -0400 Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4NEMotb007329; Wed, 23 May 2018 07:23:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=qBuTGEbfYcgqR4+19PH2c+1KF6drIRHa+vBdOd/QE14=; b=NVXAOo7P2qe4JXenOrh/fGcKDWNM2sqB6tGGLjlFQp6ZiKWLcLZJ1dz8NqVsBXiaASDz lXujuWLCfBxlL1DnFQLYWgJjWgXFPF/mnrRJ7VEMl/iPNwCIq+vI3F5F4buKqr296Yvt MmhCol5nTGnIYjgNMZRbEja4Mw5F5xjKPqs= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2j56burjd3-8 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 23 May 2018 07:23:03 -0700 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.21) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 23 May 2018 10:20:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qBuTGEbfYcgqR4+19PH2c+1KF6drIRHa+vBdOd/QE14=; b=U+Q6Hny9fISlMWnC3BuDWp9swTTpflI9zhgLyjalUuDeuSuqBSo4gx/QdZ9Xuy1nUK7haxzfivRm2JbEyBnB3pcwzarzWvgx+XAP2u2SdXewiq2e22nq+OxmzLgebF2rMjWHS+aQNEJ602ik92RWFJEoBsTNV2e0akQRq5R5jHU= Received: from [IPv6:2620:10d:c0a3:10fb::15b] (2620:10d:c091:200::2:5b8b) by DM5PR1501MB1958.namprd15.prod.outlook.com (2603:10b6:4:a1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.16; Wed, 23 May 2018 14:20:13 +0000 Subject: Re: [PATCH 1/5] PCI/AER: Define and allocate aer_stats structure for AER capable devices To: Rajat Jain , Bjorn Helgaas , Jonathan Corbet , Philippe Ombredanne , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , Frederick Lawler , Oza Pawandeep , Keith Busch , Gabriele Paoloni , Alexandru Gagniuc , Thomas Tai , "Steven Rostedt (VMware)" , , , , Kyle McMartin CC: References: <20180522222805.80314-1-rajatja@google.com> <20180522222805.80314-2-rajatja@google.com> From: Jes Sorensen Message-ID: <62fae8eb-aaed-65b2-19ad-7c57b3a9bfdc@fb.com> Date: Wed, 23 May 2018 10:20:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180522222805.80314-2-rajatja@google.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c091:200::2:5b8b] X-ClientProxiedBy: BN6PR0101CA0006.prod.exchangelabs.com (2603:10b6:405:2a::19) To DM5PR1501MB1958.namprd15.prod.outlook.com (2603:10b6:4:a1::24) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DM5PR1501MB1958; X-Microsoft-Exchange-Diagnostics: 1;DM5PR1501MB1958;3:VMhA8vuA5tDvWQd6iCpa4ARBB6AjiAGxtS49UcnOvRouLj7aSFZehhby+fbbbZGw34s7FQ8IT05mS7hxDcJNmmfVHZhpj3fW4syDbw9dae+4JkdDGaFxSUKjba2D9xvlwh5q1xd/w2XYvKMXcVEZJz3+2dL4R0cjaLZa/neBkq/SvqqxdBLWue/+Fr+viR/F7Ttjt5MmpDMOshP5tetvh3XkhexSgBs+DqRldNrjDTXihs66Qbk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Sq2R8QSpmOA3EjtjKquQUAEj/m9OGM1A3LYcBFh3yU17b86IuMPIRQw+GXwt1q+7RK9fz6FSgLwdyciFF2pArdojvXSoN5p7q8UJbtko;4:5cODjwo7ohClOc2IgZBaGvrGrjwxEp25cmxL0GaGbKTGUFwRg2l8uuUzDxDlIXrSRXto1MuQG9pgbbSm6u0UaK8kta3p4HYggx2DLVtK6EbsjL76sJFQfSpatjGXIussZCo4HuEjPay+t6nE38lqKh8hjEph7ydmx6ezWGE0lNc+oeKYimiVQySnb1TNI6gAOdrIu8wtkDTLl6qPhbBpldZSd6QTWrk0tjH1Qy3Dttw2AGB2F/t7bUwCzl+plbqEDYOzOXaJRe9HMabm1Wma0pRDpxtIP49W3FI36jeNtpvdvYjpkdlz2bMNFl2rkS40qoCF1xor+UaZtaH1zA0kPY+NgKy67UcovEqvzbWc+/A= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211936372134217)(153496737603132); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231254)(11241501184)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM5PR1501MB1958;BCL:0;PCL:0;RULEID:;SRVR:DM5PR1501MB1958; X-Forefront-PRVS: 06818431B9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(366004)(39860400002)(376002)(396003)(189003)(199004)(64126003)(316002)(6246003)(186003)(65806001)(476003)(11346002)(5660300001)(53936002)(65826007)(36756003)(39060400002)(7416002)(110136005)(446003)(16526019)(4326008)(65956001)(97736004)(2616005)(47776003)(46003)(58126008)(6636002)(86362001)(305945005)(7736002)(31686004)(25786009)(31696002)(478600001)(76176011)(230700001)(6486002)(50466002)(105586002)(23676004)(2486003)(386003)(8936002)(6116002)(106356001)(486006)(81166006)(52116002)(52396003)(8676002)(68736007)(81156014)(59450400001)(1706002)(2906002)(53546011)(52146003)(229853002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR1501MB1958;H:[IPv6:2620:10d:c0a3:10fb::15b];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjE1MDFNQjE5NTg7MjM6MjJkcXBOU2UvK3gxK2k0eVRVYllSSHdP?= =?utf-8?B?aVF2d29ON25IWUhIbldwRjBNbGJqZStkOVpKRFUzcEVUUUpvVTl6SGliSzli?= =?utf-8?B?SmNWdFJIRXFSRXVOR2srdVFSOGNzOXZXdTg5YUtHYWI1dEQrVkhyRmN5RkZs?= =?utf-8?B?VjVUK0wraEdMdlFZcFVWNnptZGkyQ0dGNS9PY3FXdVlZNHQ1Vno2anBRS2FX?= =?utf-8?B?THdHMURXd0ExOVVOWTB1cVlBZXRMK0hETWRBZEVJa2FkSy9yOEUxWDk4L3Ja?= =?utf-8?B?SkZCd29vVmpiMktsaGxPSWwvUUV1d2JCY29ndDhWaGJ1dUlENHQxWWVGUEFq?= =?utf-8?B?VlZEZE9hbEY5M3VZUUMrMjN1cXhvd2I0ZmtnK29hVE1yTkZiYUg5K3ArZlhR?= =?utf-8?B?OTdhM0VSMVNkdzJmSSt6aS9qazFndnlaaytaMGgzcnJseXdZeXRnRzZhazk1?= =?utf-8?B?cHNjbWhHNTRzbHhyYVpoM3lKWTdVOWZnWEJWWXRNdHVsSldWbnIxWXZTaDZE?= =?utf-8?B?YlVDRnp3b0ZFL21naVNOWi9TYlhyWjJaVzcwWFFBYWtzYVM4RG4xV2NTRFV6?= =?utf-8?B?Nm1TVWpZZ3VNclA2Wmk0RTB0ZHJEUnNtR0hWekRRSW43d0dRblNZOH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NelDKcPnYTeGw98mKg954phwHSvbfuvxKspAae1HCdpoItDUzzCgy4ZVko9+U01CMnO+7heiIuLJM4oC7tvrkO4Wz9i7vvWDInB9J0B62CkeHp4+6/UUzf2Nc2Km3OPlZ/eV5ALMc4Z0S2XCqDAZDIr7CjufzEmzKf5t5Ii38fgg==;5:v58pIaKYuoT0cPfjQ7rwSiboLUUkNbsdXi1OTEjWYpkJDEPFb2zs6gd3ZQ9s6kk+evRkAmLnpFcfk4a4KTEmRJ75kzAXMdZmRneb160hb/84doTwF78YmLtnhp9FM4HNdLIVEDkDJxVri9ZdKUNNoS4sLmYXDWxLFs/upSFSH+Y=;24:pGZLY+2J2pOz66J0E54ewXVLqjoepdRRjsvixe9qDwYxEzJjxfJ8TT9Uo4y3NKG8A22yHpFoZlFQblmPnw9WY4BPJzG+JZezSfzLj27iGfA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR1501MB1958;7:tG5S7ixO/9oJRwO5VJruwwYcaWWx+6T5EYKZeUefJp4SZLWoavy5hmOx1S7bIA/zwu+Uv0o0GmdtI/LT6JLXcqzCYyda30qB0I2NwQW7dtvd5/XSzFx3yz0xOYkh3Z0ngBhE3Rbm9k8yNpv5l4sphuOqzSiE0znQC3m5Q2txlAd7FGtKgxmbm/Kccgd9SUx2TAzh66Fk+syvG11dj7Cv7KR4ISrO3x0wqOdcOm1C4SCqhKOQZ+1N6HERxaArMBGe;20:+7WgcAc6sY28dmb7kypV6kwpSJsOsi853InBUS+XVTzxf4wZu0qLYqPT5o7RGQlz9R/+O4rjxYek5GJUqfMdCWQ2u8xv3kQLZ3QIyjagpswztpvzr9UBUsgvkgNcbyQQ3Ux5g7zZJRpCCH+M3ZoI/3cZe3cPTGpOwn/8Op/7+yk= X-MS-Office365-Filtering-Correlation-Id: a43e26d7-03b5-458e-e31d-08d5c0b84de7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2018 14:20:13.9476 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a43e26d7-03b5-458e-e31d-08d5c0b84de7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1501MB1958 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-23_06:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/2018 06:28 PM, Rajat Jain wrote: > Define a structure to hold the AER statistics. There are 2 groups > of statistics: dev_* counters that are to be collected for all AER > capable devices and rootport_* counters that are collected for all > (AER capable) rootports only. Allocate and free this structure when > device is added or released (thus counters survive the lifetime of the > device). > > Add a new file aerdrv_stats.c to hold the AER stats collection logic. > > Signed-off-by: Rajat Jain > --- > drivers/pci/pcie/aer/Makefile | 2 +- > drivers/pci/pcie/aer/aerdrv.h | 6 +++ > drivers/pci/pcie/aer/aerdrv_core.c | 9 ++++ > drivers/pci/pcie/aer/aerdrv_stats.c | 64 +++++++++++++++++++++++++++++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 3 ++ > 6 files changed, 84 insertions(+), 1 deletion(-) > create mode 100644 drivers/pci/pcie/aer/aerdrv_stats.c > > diff --git a/drivers/pci/pcie/aer/Makefile b/drivers/pci/pcie/aer/Makefile > > -aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o > +aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o aerdrv_stats.o > aerdriver-$(CONFIG_ACPI) += aerdrv_acpi.o > > obj-$(CONFIG_PCIEAER_INJECT) += aer_inject.o > diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h > index b4c950683cc7..d8b9fba536ed 100644 > --- a/drivers/pci/pcie/aer/aerdrv.h > +++ b/drivers/pci/pcie/aer/aerdrv.h > @@ -33,6 +33,10 @@ > PCI_ERR_UNC_MALF_TLP) > > #define AER_MAX_MULTI_ERR_DEVICES 5 /* Not likely to have more */ > + > +#define AER_MAX_TYPEOF_CORRECTABLE_ERRS 16 /* as per PCI_ERR_COR_STATUS */ > +#define AER_MAX_TYPEOF_UNCORRECTABLE_ERRS 26 /* as per PCI_ERR_UNCOR_STATUS*/ > + > struct aer_err_info { > struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES]; > int error_dev_num; > @@ -81,6 +85,8 @@ void aer_isr(struct work_struct *work); > void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); > void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info); > irqreturn_t aer_irq(int irq, void *context); > +int pci_aer_stats_init(struct pci_dev *pdev); > +void pci_aer_stats_exit(struct pci_dev *pdev); > > #ifdef CONFIG_ACPI_APEI > int pcie_aer_get_firmware_first(struct pci_dev *pci_dev); > diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c > index 36e622d35c48..42a6f913069a 100644 > --- a/drivers/pci/pcie/aer/aerdrv_core.c > +++ b/drivers/pci/pcie/aer/aerdrv_core.c > @@ -95,9 +95,18 @@ int pci_cleanup_aer_error_status_regs(struct pci_dev *dev) > int pci_aer_init(struct pci_dev *dev) > { > dev->aer_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); > + > + if (!dev->aer_cap || pci_aer_stats_init(dev)) > + return -EIO; > + > return pci_cleanup_aer_error_status_regs(dev); > } > > +void pci_aer_exit(struct pci_dev *dev) > +{ > + pci_aer_stats_exit(dev); > +} > + > /** > * add_error_device - list device to be handled > * @e_info: pointer to error info > diff --git a/drivers/pci/pcie/aer/aerdrv_stats.c b/drivers/pci/pcie/aer/aerdrv_stats.c > new file mode 100644 > index 000000000000..b9f251992209 > --- /dev/null > +++ b/drivers/pci/pcie/aer/aerdrv_stats.c > @@ -0,0 +1,64 @@ > +// SPDX-License-Identifier: GPL-2.0 Fix the formatting please - that gross // gibberish doesn't belong there. Jes