From patchwork Wed May 23 17:58:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajat Jain X-Patchwork-Id: 919251 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="VKUBl2Dy"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40rgHW125Bz9s0W for ; Thu, 24 May 2018 03:58:47 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933460AbeEWR6p (ORCPT ); Wed, 23 May 2018 13:58:45 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:39204 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933801AbeEWR6l (ORCPT ); Wed, 23 May 2018 13:58:41 -0400 Received: by mail-pl0-f67.google.com with SMTP id c19-v6so13481709pls.6 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=gRlPKVMM5FMr2TSO+6WeJ8LjWWVcK4egt999yJ8QoLNurTxVLJLednOzTcPA/VSOAp yTQbPgMb2IB+4geJN24COoJgBNAQ/9KMD5fNxg146C9BaPXp6w2NcxmuOiVjRJxJdGpj ZM+MQddLOZWRTolHKbDndcPZBy2xtZWCN7S159ScthiqJdot21e9inuf8uKKxFBK/Uzf u5eE6cHhGqRo2J7/Od+YrCOh22z80aHlovhIreb9zUjjBrntcBY4ArU6ptfRdYeWnaAt nnqDTaDXeNf5UdeWt4f8HVZA++8tXAmmCcwRh0wb9EvfUk4/+46wXhIsJbmBrL5Lz0PD CNkw== X-Gm-Message-State: ALKqPwf3jUhbqXqFBRuHLibv6BCQYyXe02bunAbYyLabUHLre7rzZwyY c8mjq3OFDIpk6mEEfDLfIpuekw== X-Google-Smtp-Source: AB8JxZr+nXKflSzonvmuyIkHGZPogAXr2gS2wjHGixOAB9l52Sm6p8nx0ByFghoFr5nltfa5gAOS5A== 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-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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