platform/mellanox: Add Mellanox TRIO driver
Subsystems (2)
PATCH 1/1 platform/mellanox: Add Mellanox TRIO driver
This patch adds support for Mellanox BlueField TRIO PCIe host controller. The driver supports multiple TRIO instances and provides a sysfs interface to allow the user to read/set the L3 cache profile for transactions going through the TRIO. It also provides an interrupt handler for the TRIO blocks.
Shravan Kumar Ramani (1):
platform/mellanox: Add Mellanox TRIO driver
MAINTAINERS | 5 + drivers/platform/mellanox/Kconfig | 8 + drivers/platform/mellanox/Makefile | 1 + drivers/platform/mellanox/mlxbf-trio.c | 624 +++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) create mode 100644 drivers/platform/mellanox/mlxbf-trio.c
Signature · 1 line
2.1.2
PATCH 1/1 platform/mellanox: Add Mellanox TRIO driver
Adds Support for Mellanox BlueField TRIO PCIe host controller.
--- MAINTAINERS | 5 + drivers/platform/mellanox/Kconfig | 8 + drivers/platform/mellanox/Makefile | 1 + drivers/platform/mellanox/mlxbf-trio.c | 624 +++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) create mode 100644 drivers/platform/mellanox/mlxbf-trio.c
MAINTAINERS +5 -0
@@ -10501,6 +10501,11 @@ L: [email protected] S: Supported F: drivers/platform/x86/mlx-platform.c +MELLANOX BLUEFIELD TRIO DRIVER +M: Shravan Kumar Ramani <[email protected]> +S: Supported +F: drivers/platform/mellanox/mlxbf-trio.c + MEMBARRIER SUPPORT M: Mathieu Desnoyers <[email protected]> M: "Paul E. McKenney" <[email protected]>
drivers/platform/mellanox/Kconfig +8 -0
@@ -44,4 +44,12 @@ config MLXBF_TMFIFO platform driver support for the TmFifo which supports console and networking based on the virtio framework. +config MLXBF_TRIO + tristate "Mellanox BlueField SoC TRIO driver" + depends on ARM64 + depends on ACPI + help + Say y here to enable TRIO driver. This driver provides platform + driver support for the TRIO PCIe Host Controller. + endif # MELLANOX_PLATFORM
drivers/platform/mellanox/Makefile +1 -0
@@ -4,5 +4,6 @@ # Mellanox Platform-Specific Drivers # obj-$(CONFIG_MLXBF_TMFIFO) += mlxbf-tmfifo.o +obj-$(CONFIG_MLXBF_TRIO) += mlxbf-trio.o obj-$(CONFIG_MLXREG_HOTPLUG) += mlxreg-hotplug.o obj-$(CONFIG_MLXREG_IO) += mlxreg-io.o
drivers/platform/mellanox/mlxbf-trio.c new file +624 -0
624 lines not on this page · raw message
Signature · 1 line
2.1.2
Quoted 12 lines
-----Original Message-----
From: Shravan Kumar Ramani <[email protected]>
Sent: Monday, November 11, 2019 4:35 PM
To: Andy Shevchenko <[email protected]>; Darren Hart <[email protected]>; Vadim Pasternak <[email protected]>
Cc: Liming Sun <[email protected]>; Shravan Ramani <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver
Quoted 4 lines
This patch adds support for Mellanox BlueField TRIO PCIe host controller. The driver supports multiple TRIO instances and provides a sysfs interface to allow the user to read/set the L3 cache profile for transactions going through the TRIO. It also provides an interrupt handler for the TRIO blocks.
Hi Shravan,
Could you, please, explain what TRIO PCIe host controller? What is TRIO, is it some internal name or it's some standard terminology? If it's internal, please, explain for what it stands for.
Same for TRIO instances. Are there some host side PCI instances? What are the purpose of them?
Could you, please, also explain the system configuration?
Quoted 14 lines
Shravan Kumar Ramani (1):
platform/mellanox: Add Mellanox TRIO driverMAINTAINERS | 5 + drivers/platform/mellanox/Kconfig | 8 + drivers/platform/mellanox/Makefile | 1 + drivers/platform/mellanox/mlxbf-trio.c | 624 +++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) create mode 100644 drivers/platform/mellanox/mlxbf-trio.c--
2.1.2
Hi Vadim,
TRIO stands for TRansaction I/O and is an internal code name for our PCIe to CHI bus interface.
In Mellanox BlueField SoC, the configuration is as follows: there are 3 TRIO blocks where TRIO2 is connected to a Mellanox ConnectX-5 while TRIO0 and TRIO1 can be configured to behave either as a PCIe Root Complex to downstream ports (8 ports or 16 lanes each) connecting to storage devices, or as an end-point when plugged into an external x86 host (SmartNIC form factor). Each TRIO block has a separate ACPI table entry which invokes this driver thereby creating a total of 3 instances. The purpose of this driver is to be able to read/set the L3 cache profile from a list of available profiles for transactions coming in to each TRIO block and is meant to run on the ARM cores powering the BlueField SoC.
Regards,
Shravan
-----Original Message-----
From: Vadim Pasternak <[email protected]>
Sent: Tuesday, November 12, 2019 8:15 PM
To: Shravan Ramani <[email protected]>; Andy Shevchenko <[email protected]>; Darren Hart <[email protected]>
Cc: Liming Sun <[email protected]>; Shravan Ramani <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver
Quoted 10 lines
-----Original Message-----
From: Shravan Kumar Ramani <[email protected]>
Sent: Monday, November 11, 2019 4:35 PM
To: Andy Shevchenko <[email protected]>; Darren Hart <[email protected]>; Vadim Pasternak <[email protected]>
Cc: Liming Sun <[email protected]>; Shravan Ramani <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver
Quoted 4 lines
This patch adds support for Mellanox BlueField TRIO PCIe host controller.
The driver supports multiple TRIO instances and provides a sysfs
interface to allow the user to read/set the L3 cache profile for
transactions going through the TRIO. It also provides an interrupt handler for the TRIO blocks.
Hi Shravan,
Could you, please, explain what TRIO PCIe host controller? What is TRIO, is it some internal name or it's some standard terminology? If it's internal, please, explain for what it stands for.
Same for TRIO instances. Are there some host side PCI instances? What are the purpose of them?
Could you, please, also explain the system configuration?
Quoted 14 lines
Shravan Kumar Ramani (1):
platform/mellanox: Add Mellanox TRIO driverMAINTAINERS | 5 + drivers/platform/mellanox/Kconfig | 8 + drivers/platform/mellanox/Makefile | 1 + drivers/platform/mellanox/mlxbf-trio.c | 624 +++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) create mode 100644 drivers/platform/mellanox/mlxbf-trio.c--
2.1.2
Quoted 11 lines
-----Original Message-----
From: Shravan Ramani
Sent: Wednesday, November 13, 2019 7:41 AM
To: Vadim Pasternak <[email protected]>; Andy Shevchenko <[email protected]>; Darren Hart <[email protected]>
Cc: Liming Sun <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver
Quoted 13 lines
Hi Vadim,
TRIO stands for TRansaction I/O and is an internal code name for our PCIe to CHI bus interface.
In Mellanox BlueField SoC, the configuration is as follows: there are 3 TRIO blocks where TRIO2 is connected to a Mellanox ConnectX-5 while TRIO0 and TRIO1 can be configured to behave either as a PCIe Root Complex to downstream ports (8 ports or 16 lanes each) connecting to storage devices, or as an end-point when plugged into an external x86 host (SmartNIC form factor). Each TRIO block has a separate ACPI table entry which invokes this driver thereby creating a total of 3 instances.
The purpose of this driver is to be able to read/set the L3 cache profile from a list of available profiles for transactions coming in to each TRIO block and is meant to run on the ARM cores powering the BlueField SoC.
OK.
It was necessary to have such sort of explanation in the description.
I am also not sure you choose correct location for this driver. Why it should be in drivers/platform/mellanox/ and not in for example drivers/acpi/?
Regarding the patch content.
(1)
Please, follow naming convention which we have in folder:drivers/platform/mellanox/, like in module mlxbf-tmfifo.c mlxbf_trioMLXBF_TRIO
for all routine names, defines, types.
(2)
Fix includes order ("io" before "irq").
(3)
Don't use magic numbers like '3'.
(4)
Why in 'probe' routine failure of symlink creation treated as warning?
(5)
Remove stuff like
'dev_warn(dev, "%s: failed to find reg resource 0\n", __func__);' 'dev_warn(dev, "Error probing trio\n");'
(6)
I suggest to make all the above comments and send the updated patch for internal review to myself cced to [email protected], before sending it to [email protected].
Thanks,
Vadim.
Quoted 58 lines
Regards,
Shravan-----Original Message-----
From: Vadim Pasternak <[email protected]>
Sent: Tuesday, November 12, 2019 8:15 PM
To: Shravan Ramani <[email protected]>; Andy Shevchenko <[email protected]>; Darren Hart <[email protected]>
Cc: Liming Sun <[email protected]>; Shravan Ramani <[email protected]>; [email protected]; linux- [email protected]
Subject: RE: [PATCH v1] platform/mellanox: Add Mellanox TRIO driverQuoted 10 lines
-----Original Message-----
From: Shravan Kumar Ramani <[email protected]>
Sent: Monday, November 11, 2019 4:35 PM
To: Andy Shevchenko <[email protected]>; Darren Hart <[email protected]>; Vadim Pasternak <[email protected]>
Cc: Liming Sun <[email protected]>; Shravan Ramani <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH v1] platform/mellanox: Add Mellanox TRIO driverQuoted 4 lines
This patch adds support for Mellanox BlueField TRIO PCIe host controller. The driver supports multiple TRIO instances and provides a sysfs interface to allow the user to read/set the L3 cache profile for transactions going through the TRIO. It also provides an interrupt handler for
the TRIO blocks.
Hi Shravan,
Could you, please, explain what TRIO PCIe host controller? What is TRIO, is it some internal name or it's some standard terminology? If it's internal, please, explain for what it stands for.
Same for TRIO instances. Are there some host side PCI instances? What are the purpose of them?
Could you, please, also explain the system configuration?
Quoted 14 lines
Shravan Kumar Ramani (1):
platform/mellanox: Add Mellanox TRIO driverMAINTAINERS | 5 + drivers/platform/mellanox/Kconfig | 8 + drivers/platform/mellanox/Makefile | 1 + drivers/platform/mellanox/mlxbf-trio.c | 624 +++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) create mode 100644 drivers/platform/mellanox/mlxbf-trio.c--
2.1.2
Quoted 5 lines · Shravan Kumar Ramani
This patch adds support for Mellanox BlueField TRIO PCIe host controller. The driver supports multiple TRIO instances and provides a sysfs interface to allow the user to read/set the L3 cache profile for transactions going through the TRIO. It also provides an interrupt handler for the TRIO blocks.
Besides on-going review, this doesn't apply. So, please check that you rebase it on top of our for-next branch, thanks!
P.S. I'll wait for v2 with Vadim's comments being addressed.
Quoted 14 lines
Shravan Kumar Ramani (1):
platform/mellanox: Add Mellanox TRIO driverMAINTAINERS | 5 + drivers/platform/mellanox/Kconfig | 8 + drivers/platform/mellanox/Makefile | 1 + drivers/platform/mellanox/mlxbf-trio.c | 624 +++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) create mode 100644 drivers/platform/mellanox/mlxbf-trio.c--
2.1.2
Signature · 2 lines
With Best Regards, Andy Shevchenko