linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean V Kelley <sean.v.kelley@intel.com>
To: bhelgaas@google.com, Jonathan.Cameron@huawei.com,
	rjw@rjwysocki.net, ashok.raj@intel.com, tony.luck@intel.com,
	sathyanarayanan.kuppuswamy@linux.intel.com, qiuxu.zhuo@intel.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 01/10] PCI/RCEC: Add RCEC class code and extended capability
Date: Wed, 12 Aug 2020 09:46:50 -0700	[thread overview]
Message-ID: <20200812164659.1118946-2-sean.v.kelley@intel.com> (raw)
In-Reply-To: <20200812164659.1118946-1-sean.v.kelley@intel.com>

From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>

A PCIe Root Complex Event Collector(RCEC) has the base class 0x08,
sub-class 0x07, and programming interface 0x00. Add the class code
0x0807 to identify RCEC devices and add the defines for the RCEC
Endpoint Association Extended Capability.

See PCI Express Base Specification, version 5.0-1, section "1.3.4
Root Complex Event Collector" and section "7.9.10 Root Complex
Event Collector Endpoint Association Extended Capability"

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 include/linux/pci_ids.h       | 1 +
 include/uapi/linux/pci_regs.h | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0ad57693f392..de8dff1fb176 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -81,6 +81,7 @@
 #define PCI_CLASS_SYSTEM_RTC		0x0803
 #define PCI_CLASS_SYSTEM_PCI_HOTPLUG	0x0804
 #define PCI_CLASS_SYSTEM_SDHCI		0x0805
+#define PCI_CLASS_SYSTEM_RCEC		0x0807
 #define PCI_CLASS_SYSTEM_OTHER		0x0880
 
 #define PCI_BASE_CLASS_INPUT		0x09
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index f9701410d3b5..f335f65f65d6 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -828,6 +828,13 @@
 #define  PCI_PWR_CAP_BUDGET(x)	((x) & 1)	/* Included in system budget */
 #define PCI_EXT_CAP_PWR_SIZEOF	16
 
+/* Root Complex Event Collector Endpoint Association  */
+#define PCI_RCEC_RCIEP_BITMAP	4	/* Associated Bitmap for RCiEPs */
+#define PCI_RCEC_BUSN		8	/* RCEC Associated Bus Numbers */
+#define  PCI_RCEC_BUSN_REG_VER	0x02	/* Least capability version that BUSN present */
+#define  PCI_RCEC_BUSN_NEXT(x)	(((x) >> 8) & 0xff)
+#define  PCI_RCEC_BUSN_LAST(x)	(((x) >> 16) & 0xff)
+
 /* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */
 #define PCI_VNDR_HEADER		4	/* Vendor-Specific Header */
 #define  PCI_VNDR_HEADER_ID(x)	((x) & 0xffff)
-- 
2.28.0


  reply	other threads:[~2020-08-12 16:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 16:46 [PATCH v3 00/10] Add RCEC handling to PCI/AER Sean V Kelley
2020-08-12 16:46 ` Sean V Kelley [this message]
2020-08-12 16:46 ` [PATCH v3 02/10] PCI/RCEC: Bind RCEC devices to the Root Port driver Sean V Kelley
2020-08-12 16:46 ` [PATCH v3 03/10] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities() Sean V Kelley
2020-08-12 16:46 ` [PATCH v3 04/10] PCI/RCEC: Add pcie_walk_rcec() to walk associated RCiEPs Sean V Kelley
2020-09-02 19:00   ` Bjorn Helgaas
2020-09-02 21:55     ` Sean V Kelley
2020-09-04 22:18       ` Kelley, Sean V
2020-09-05  2:23         ` Bjorn Helgaas
2020-09-11 23:16           ` Sean V Kelley
2020-09-12  0:50             ` Bjorn Helgaas
2020-09-14 16:55               ` Sean V Kelley
2020-09-15 16:09                 ` Sean V Kelley
2020-09-15 17:47                   ` Sean V Kelley
2020-09-16 23:06                   ` Bjorn Helgaas
2020-09-16 22:49                 ` Bjorn Helgaas
2020-08-12 16:46 ` [PATCH v3 05/10] PCI/AER: Extend AER error handling to RCECs Sean V Kelley
2020-08-26 17:26   ` Kuppuswamy, Sathyanarayanan
2020-08-26 18:55     ` sean.v.kelley
2020-08-12 16:46 ` [PATCH v3 06/10] PCI/AER: Apply function level reset to RCiEP on fatal error Sean V Kelley
2020-08-12 16:46 ` [PATCH v3 07/10] PCI: Add 'rcec' field to pci_dev for associated RCiEPs Sean V Kelley
2020-09-02 16:35   ` Bjorn Helgaas
2020-09-02 22:24     ` Sean V Kelley
2020-08-12 16:46 ` [PATCH v3 08/10] PCI/AER: Add RCEC AER handling Sean V Kelley
2020-08-12 16:46 ` [PATCH v3 09/10] PCI/PME: Add RCEC PME handling Sean V Kelley
2020-08-12 16:46 ` [PATCH v3 10/10] PCI/AER: Add RCEC AER error injection support Sean V Kelley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200812164659.1118946-2-sean.v.kelley@intel.com \
    --to=sean.v.kelley@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=ashok.raj@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).