History

Merge branch 'pci/tph'

- Add and document TLP Processing Hints (TPH) support so drivers can enable and disable TPH and the kernel can save/restore TPH configuration (Wei Huang) - Add TPH Steering Tag support so drivers can retrieve Steering Tag values associated with specific CPUs via an ACPI _DSM to direct DMA writes closer to their consumers (Wei Huang) * pci/tph: PCI/TPH: Add TPH documentation PCI/TPH: Add Steering Tag support PCI: Add TLP Processing Hints (TPH) support

Bjorn Helgaas committed 1 year ago

Commit ab02baf2 parents efcbd9d 48d0fd213 files · +794 −8Browse files

Showing the changes to include/uapi (1 of 13 files). Show all

Unified · Split

include/uapi/linux/pci_regs.h+29−8
@@ -340,7 +340,8 @@ · 339 unmodified lines
340340 #define PCI_MSIX_ENTRY_UPPER_ADDR 0x4 /* Message Upper Address */
341341 #define PCI_MSIX_ENTRY_DATA 0x8 /* Message Data */
342342 #define PCI_MSIX_ENTRY_VECTOR_CTRL 0xc /* Vector Control */
343−#define PCI_MSIX_ENTRY_CTRL_MASKBIT 0x00000001
343+#define PCI_MSIX_ENTRY_CTRL_MASKBIT 0x00000001 /* Mask Bit */
344+#define PCI_MSIX_ENTRY_CTRL_ST 0xffff0000 /* Steering Tag */
344345
345346 /* CompactPCI Hotswap Register */
346347
@@ -659,6 +660,7 @@ · 312 unmodified lines
659660 #define PCI_EXP_DEVCAP2_ATOMIC_COMP64 0x00000100 /* 64b AtomicOp completion */
660661 #define PCI_EXP_DEVCAP2_ATOMIC_COMP128 0x00000200 /* 128b AtomicOp completion */
661662 #define PCI_EXP_DEVCAP2_LTR 0x00000800 /* Latency tolerance reporting */
663+#define PCI_EXP_DEVCAP2_TPH_COMP_MASK 0x00003000 /* TPH completer support */
662664 #define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */
663665 #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */
664666 #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */
@@ -1024,15 +1026,34 @@ · 359 unmodified lines
10241026 #define PCI_DPA_CAP_SUBSTATE_MASK 0x1F /* # substates - 1 */
10251027 #define PCI_DPA_BASE_SIZEOF 16 /* size with 0 substates */
10261028
1029+/* TPH Completer Support */
1030+#define PCI_EXP_DEVCAP2_TPH_COMP_NONE 0x0 /* None */
1031+#define PCI_EXP_DEVCAP2_TPH_COMP_TPH_ONLY 0x1 /* TPH only */
1032+#define PCI_EXP_DEVCAP2_TPH_COMP_EXT_TPH 0x3 /* TPH and Extended TPH */
1033+
10271034 /* TPH Requester */
10281035 #define PCI_TPH_CAP 4 /* capability register */
1029−#define PCI_TPH_CAP_LOC_MASK 0x600 /* location mask */
1030−#define PCI_TPH_LOC_NONE 0x000 /* no location */
1031−#define PCI_TPH_LOC_CAP 0x200 /* in capability */
1032−#define PCI_TPH_LOC_MSIX 0x400 /* in MSI-X */
1033−#define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* ST table mask */
1034−#define PCI_TPH_CAP_ST_SHIFT 16 /* ST table shift */
1035−#define PCI_TPH_BASE_SIZEOF 0xc /* size with no ST table */
1036+#define PCI_TPH_CAP_ST_NS 0x00000001 /* No ST Mode Supported */
1037+#define PCI_TPH_CAP_ST_IV 0x00000002 /* Interrupt Vector Mode Supported */
1038+#define PCI_TPH_CAP_ST_DS 0x00000004 /* Device Specific Mode Supported */
1039+#define PCI_TPH_CAP_EXT_TPH 0x00000100 /* Ext TPH Requester Supported */
1040+#define PCI_TPH_CAP_LOC_MASK 0x00000600 /* ST Table Location */
1041+#define PCI_TPH_LOC_NONE 0x00000000 /* Not present */
1042+#define PCI_TPH_LOC_CAP 0x00000200 /* In capability */
1043+#define PCI_TPH_LOC_MSIX 0x00000400 /* In MSI-X */
1044+#define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* ST Table Size */
1045+#define PCI_TPH_CAP_ST_SHIFT 16 /* ST Table Size shift */
1046+#define PCI_TPH_BASE_SIZEOF 0xc /* Size with no ST table */
1047+
1048+#define PCI_TPH_CTRL 8 /* control register */
1049+#define PCI_TPH_CTRL_MODE_SEL_MASK 0x00000007 /* ST Mode Select */
1050+#define PCI_TPH_ST_NS_MODE 0x0 /* No ST Mode */
1051+#define PCI_TPH_ST_IV_MODE 0x1 /* Interrupt Vector Mode */
1052+#define PCI_TPH_ST_DS_MODE 0x2 /* Device Specific Mode */
1053+#define PCI_TPH_CTRL_REQ_EN_MASK 0x00000300 /* TPH Requester Enable */
1054+#define PCI_TPH_REQ_DISABLE 0x0 /* No TPH requests allowed */
1055+#define PCI_TPH_REQ_TPH_ONLY 0x1 /* TPH only requests allowed */
1056+#define PCI_TPH_REQ_EXT_TPH 0x3 /* Extended TPH requests allowed */
10361057
10371058 /* Downstream Port Containment */
10381059 #define PCI_EXP_DPC_CAP 0x04 /* DPC Capability */