Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1145668imm; Wed, 23 May 2018 11:00:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4ntxyfy5gwfQSotzGp3EQ6fzNCb6lOvD4FkKCkmuOTZdgF8CLnWYUXeqA0JDxW3tkFbFq X-Received: by 2002:a65:6085:: with SMTP id t5-v6mr3172431pgu.362.1527098432900; Wed, 23 May 2018 11:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527098432; cv=none; d=google.com; s=arc-20160816; b=qG4jKayaoRY7WslxwW+vtnQc7uqoBI/ig7P0wR0bJtKSsF4sVWeTWJbWgSd/Hm6XbF xq1QZLpBTiEkmla7nhW0klhxkAJUjPogvM5mpYJgrcAVCjvJJTo3nRRNuifOwdAkW/S/ eIzyC57OINbX8yM4aw4RYVbuTWZvht/lnXQb4CZl9Qw+RyWO59FXBtcFG8VcBE8b4iRq LipRWq9+MbCwaXujWI4R8s74qcdDSfkpHvvf08A+d2mWFGVPfOWFMwkaFO0NzRt4O4mq fnMs/0pRI/V2tvNLn05J2oFgVshdQd82Ave1NFOH/PpEEdw+GEaof3CAo1Cec6QHVEZi 8X1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=IEAutE9cxB7orHhpJxLdqD0h2W4Uzw4lit8J9lEs0MM=; b=x77wAcA3xPj6yk5IlptFMrmdsbPz/3rH7inpM0b4UQ60Kurihvji5K3+yvX1heDlHq diZAY11Y2bhQX8OqqO7yUotnkz1rhMSTiOoau72OnbvD0uGkdhAPHjPLdCoJt1orPwWT Jr9vHRFmGSsoV1Lrhjj6MIBcx6f2z3ITHFkW+0OApxeg1DngAjDRuOUI+pndg98TZZxn T7dhJ6evQFx0FAPJ7Fi0zf4PM4CM9/g48ztZl0ve1Z6PX5/a6B9zl5ZcoRQ/sdSqE4/G yv6CIkQuVZc8yfx9m9jAFOZ7eX2tz/CeAmJ2dubNtyafDRxJKOF+jMC72SRlCbjFTFUK 9xbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VKUBl2Dy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si18392477plr.483.2018.05.23.11.00.18; Wed, 23 May 2018 11:00:32 -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=@google.com header.s=20161025 header.b=VKUBl2Dy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933847AbeEWR6q (ORCPT + 99 others); Wed, 23 May 2018 13:58:46 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:41697 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933800AbeEWR6l (ORCPT ); Wed, 23 May 2018 13:58:41 -0400 Received: by mail-pl0-f67.google.com with SMTP id az12-v6so13480380plb.8 for ; Wed, 23 May 2018 10:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IEAutE9cxB7orHhpJxLdqD0h2W4Uzw4lit8J9lEs0MM=; b=VKUBl2Dy4JUWpxpdT/o6e9f+mmpFVTExBm0kaOonR3O+ZQMw1vJr0JxJWDBAHYOfWu zHM8IczCvvESkFx1FBbEdTZFSyErGiGk8lJ2c/lFrvbY0bVze815ncHngUwKBEa8IhAI 4aUcyk+tMkDx2o0++C5vnulHIY4bGUB4UJPXyMvRMQWc6r9OoRUOy55iVJVqTfhy5Ggy Upkxn2QCYg3zfRl3caHl36koc2vdnMZbbrHtA8HZBqvOMttFEkezu3jHOrYD4y9RQydq ixG0TPf6VoB7pOfNvcijS7fLAVFhjhmqrIhhtPN2Nc/WVf2FGb9qWMmdJUiha0DAfk+5 PoOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IEAutE9cxB7orHhpJxLdqD0h2W4Uzw4lit8J9lEs0MM=; b=OlZjuYwbBJ6sRl26a2RuqnVV6KnPoutJh7ZGLBZDPbSmJh7XlG6ZL576qJNry2ABtb JQevw86pJ3X4pNqNyCCk1DMECgSeznqQhbYuHkyYx7AD2OrFC37lW5bXmDTux7bi50pK jZ5mr5uq2vkgIgN1fUFAxGwAFIltL+HlgEVmpHWOhCF9H7sg1xMiy54WcqnsXSlsSCG/ h5FoJOu2Ot8qpfTEDppVgWzjOs5diS6kW9fhAHNgLB/yMIWh4KGa0ueLIn1RvmkM60w4 dRrPgSo/IPk88fFwyO17DSc+/G1v+sb/JwjvsF0vzla4GCSHuF1SgOqsyljSRcIa/2ry JfWQ== X-Gm-Message-State: ALKqPwffuqGcfBoO1TGMyz1e/mnyW6Lk8fH5dn0Qsdd/vHzgW1kH8vxI OGoOIlET8bWqnwuMjZf3axIyeg== X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr3885096plu.22.1527098320864; Wed, 23 May 2018 10:58:40 -0700 (PDT) Received: from rajat.mtv.corp.google.com ([2620:0:1000:1501:dc81:9a9e:fdee:decf]) by smtp.gmail.com with ESMTPSA id k186-v6sm41433025pfc.142.2018.05.23.10.58.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 10:58:39 -0700 (PDT) From: Rajat Jain To: Bjorn Helgaas , Jonathan Corbet , Philippe Ombredanne , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , Rajat Jain , Frederick Lawler , Oza Pawandeep , Keith Busch , Gabriele Paoloni , Alexandru Gagniuc , Thomas Tai , "Steven Rostedt (VMware)" , linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jes Sorensen , Kyle McMartin Cc: rajatxjain@gmail.com Subject: [PATCH v2 0/5] Expose PCIe AER stats via sysfs Date: Wed, 23 May 2018 10:58:03 -0700 Message-Id: <20180523175808.28030-1-rajatja@google.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180522222805.80314-1-rajatja@google.com> References: <20180522222805.80314-1-rajatja@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset exposes the AER stats via the sysfs attributes. Patchset v2 has minor changes to v1 based on the review comments, no functional change. Primarily: * Fix license header * Use tabs instead of spaces * Remove use on unlikely() etc * Move documentation to Documentation/ABI/ Rajat Jain (5): PCI/AER: Define and allocate aer_stats structure for AER capable devices PCI/AER: Add sysfs stats for AER capable devices PCI/AER: Add sysfs attributes to provide breakdown of AERs PCI/AER: Add sysfs attributes for rootport cumulative stats Documentation/ABI: Add details of PCI AER statistics .../testing/sysfs-bus-pci-devices-aer_stats | 103 ++++++++++ Documentation/PCI/pcieaer-howto.txt | 5 + drivers/pci/pci-sysfs.c | 3 + drivers/pci/pci.h | 4 +- drivers/pci/pcie/aer/Makefile | 2 +- drivers/pci/pcie/aer/aerdrv.h | 15 ++ drivers/pci/pcie/aer/aerdrv_core.c | 11 + drivers/pci/pcie/aer/aerdrv_errprint.c | 7 +- drivers/pci/pcie/aer/aerdrv_stats.c | 192 ++++++++++++++++++ drivers/pci/probe.c | 1 + include/linux/pci.h | 3 + 11 files changed, 342 insertions(+), 4 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats create mode 100644 drivers/pci/pcie/aer/aerdrv_stats.c -- 2.17.0.441.gb46fe60e1d-goog