PCI: Add PCI_EXT_CAP_ID_PL_64GT define
PATCH 1/1 PCI: Add PCI_EXT_CAP_ID_PL_64GT define
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for PCI_EXT_CAP_ID_PL_64GT for drivers that will want this whilst doing Gen6 accesses.
--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)
include/uapi/linux/pci_regs.h +1 -0
@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */ #define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */ #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOE
Signature · 1 line
2.25.1
Quoted 16 lines · On Tue, 6 Aug 2024, [email protected] wrote:
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for
PCI_EXT_CAP_ID_PL_64GTfor drivers that will want this whilst doing Gen6 accesses.Signed-off-by weiyufeng <[email protected]>--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)include/uapi/linux/pci_regs.h +0
-0
include/uapi/linux/pci_regs.h line 745
Quoted 5 lines
include/uapi/linux/pci_regs.h +1
-0@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */ #define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */
These should be in numerical order.
include/uapi/linux/pci_regs.h line 746
Quoted 1 line
include/uapi/linux/pci_regs.h +0
-0#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOE
This was not adapted??
Signature · 1 line
i.
Quoted 13 lines · On Tue, 6 Aug 2024, [email protected] wrote:
Quoted 12 lines
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for
PCI_EXT_CAP_ID_PL_64GTfor drivers that will want this whilst doing Gen6 accesses.Signed-off-by weiyufeng <[email protected]>--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
include/uapi/linux/pci_regs.h line 745
Quoted 10 lines
include/uapi/linux/pci_regs.h +1
-0@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */ #define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */ These should be in numerical order.
In PCIe r6.0, PCI_EXT_CAP_ID_PL_64GT value is 0x31.
Quoted 3 lines
include/uapi/linux/pci_regs.h line 746
Quoted 1 line
include/uapi/linux/pci_regs.h +0
-0#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOEThis was not adapted??
PCIe r6.0, sec 7.7.7.1 have this definition。
--
Thanks,
weiyufeng
On Thu, Aug 08, 2024 at 10:32:17AM +0800, [email protected] wrote:
You inadvertently trimmed out Ilpo's attribution. Some hints at
https://subspace.kernel.org/etiquette.html
There should be a line like this:
Quoted 1 line · Ilpo Järvinen
...
Quoted 1 line
Quoted 1 line
These should be in numerical order.
so it's clear who wrote what.
Quoted 25 lines
Quoted 13 lines · On Tue, 6 Aug 2024, [email protected] wrote:
Quoted 12 lines
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for
PCI_EXT_CAP_ID_PL_64GTfor drivers that will want this whilst doing Gen6 accesses.Signed-off-by weiyufeng <[email protected]>--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)Quoted 12 lines
include/uapi/linux/pci_regs.h line 745
Quoted 10 lines
include/uapi/linux/pci_regs.h +1
-0@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */ #define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */ These should be in numerical order.
Quoted 1 line
In PCIe r6.0,
PCI_EXT_CAP_ID_PL_64GTvalue is0x31.
Right. The #defines just need to be sorted in numerical order (PCI_EXT_CAP_ID_PL_64GT would be last, after PCI_EXT_CAP_ID_DOE) because PCI_EXT_CAP_ID_MAX is defined to be the one with the highest numerical value, and it's hard to find that when they're not sorted.
Quoted 4 lines
Quoted 3 lines
include/uapi/linux/pci_regs.h line 746
Quoted 1 line
include/uapi/linux/pci_regs.h +0
-0#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOEThis was not adapted??
PCIe r6.0, sec 7.7.7.1 have this definition。
I think Ilpo meant that if we add "#define PCI_EXT_CAP_ID_PL_64GT 0x31", PCI_EXT_CAP_ID_MAX needs to be updated from PCI_EXT_CAP_ID_DOE to PCI_EXT_CAP_ID_PL_64GT.
Bjorn
Quoted 16 lines · On Tue, Aug 06, 2024 at 10:27:46AM +0800, [email protected] wrote:
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for
PCI_EXT_CAP_ID_PL_64GTfor drivers that will want this whilst doing Gen6 accesses.Signed-off-by weiyufeng <[email protected]>--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)include/uapi/linux/pci_regs.h +0
-0
include/uapi/linux/pci_regs.h line 744
Quoted 4 lines
include/uapi/linux/pci_regs.h +1
-0@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */
It probably makes sense to add this (with the corrections noted by Ilpo), but I *would* like to see where it's used.
I asked a similar question at
https://lore.kernel.org/all/[email protected]/
when we added PCI_EXT_CAP_ID_PL_32GT, but never got a specific response. I don't really want to end up with drivers doing their own thing if it's something that could be done in the PCI core and shared.
Quoted 6 lines
include/uapi/linux/pci_regs.h +0
-0#define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */ #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOESignature · 1 line
2.25.1
Quoted 25 lines · On Tue, Aug 06, 2024 at 10:27:46AM +0800, [email protected] wrote:
Quoted 16 lines
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for
PCI_EXT_CAP_ID_PL_64GTfor drivers that will want this whilst doing Gen6 accesses.Signed-off-by weiyufeng <[email protected]>--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)include/uapi/linux/pci_regs.h +0
-0include/uapi/linux/pci_regs.h line 744
Quoted 4 lines
include/uapi/linux/pci_regs.h +1
-0@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */ It probably makes sense to add this (with the corrections noted by Ilpo), but I *would* like to see where it's used.
Quoted 6 lines
I asked a similar question at
https://lore.kernel.org/all/[email protected]/
when we addedPCI_EXT_CAP_ID_PL_32GT, but never got a specific response. I don't really want to end up with drivers doing their own thing if it's something that could be done in the PCI core and shared.
PCI_EXT_CAP_ID_PL_32GT and PCI_EXT_CAP_ID_PL_64GT have not used now,but PCI_EXT_CAP_ID_PL_16GT have usage example,in drivers/pci/controller/dwc/pcie-tegra194.c function config_gen3_gen4_eq_presets():
offset = dw_pcie_find_ext_capability(pci,
PCI_EXT_CAP_ID_PL_16GT) + PCI_PL_16GT_LE_CTRL;
PCI_EXT_CAP_ID_PL_32GT and PCI_EXT_CAP_ID_PL_64GT could be used while need to get this similar attribute。
Quoted 6 lines
Quoted 6 lines
include/uapi/linux/pci_regs.h +0
-0#define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */ #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOESignature · 1 line
2.25.1
--
Thanks,
weiyufeng
Quoted 35 lines · On Thu, 8 Aug 2024 10:12:39 +0800 [email protected] wrote:
Quoted 25 lines · On Tue, Aug 06, 2024 at 10:27:46AM +0800, [email protected] wrote:
Quoted 16 lines
From: weiyufeng <[email protected]>
PCIe r6.0, sec 7.7.7.1, defines a new 64.0 GT/s PCIe Extended Capability ID,Add the define for
PCI_EXT_CAP_ID_PL_64GTfor drivers that will want this whilst doing Gen6 accesses.Signed-off-by weiyufeng <[email protected]>--- include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+)include/uapi/linux/pci_regs.h +0
-0include/uapi/linux/pci_regs.h line 744
Quoted 4 lines
include/uapi/linux/pci_regs.h +1
-0@@ -741,6 +741,7 @@#define PCI_EXT_CAP_ID_DLF 0x25/* Data Link Feature */ #define PCI_EXT_CAP_ID_PL_16GT 0x26/* Physical Layer 16.0 GT/s */ #define PCI_EXT_CAP_ID_PL_32GT 0x2A/* Physical Layer 32.0 GT/s */ +#define PCI_EXT_CAP_ID_PL_64GT 0x31/* Physical Layer 64.0 GT/s */ It probably makes sense to add this (with the corrections noted by Ilpo), but I *would* like to see where it's used.
Quoted 6 lines
I asked a similar question at
https://lore.kernel.org/all/[email protected]/
when we addedPCI_EXT_CAP_ID_PL_32GT, but never got a specific response. I don't really want to end up with drivers doing their own thing if it's something that could be done in the PCI core and shared.
PCI_EXT_CAP_ID_PL_32GTandPCI_EXT_CAP_ID_PL_64GThave not used now,butPCI_EXT_CAP_ID_PL_16GThave usage example,indrivers/pci/controller/dwc/pcie-tegra194.cfunctionconfig_gen3_gen4_eq_presets():
Quoted 6 lines
offset = dw_pcie_find_ext_capability(pci,
PCI_EXT_CAP_ID_PL_16GT) + PCI_PL_16GT_LE_CTRL;
PCI_EXT_CAP_ID_PL_32GTandPCI_EXT_CAP_ID_PL_64GTcould be used while need to get this similar attribute。
I'll bite. In PCI_EXTE_CAP_ID_PL_32GT PCIe 6.1 which I happen to have open has some writeable fields in the control register. So kind of fair enough a driver might write them. In my view we should probably have waited for such a use to turn up.
The Physical Layer 64.0 GT/s Extended Capability control register is entirely reserved. So as of now, I don't see a use for this capability until the PCIe spec adds something.
Quoted 13 lines
Quoted 7 lines
Quoted 7 lines
include/uapi/linux/pci_regs.h +0
-0#define PCI_EXT_CAP_ID_DOE 0x2E/* Data Object Exchange */ #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOESignature · 1 line
2.25.1--
Thanks,weiyufeng