2021-02-03 22:16:45

by Gustavo Pimentel

[permalink] [raw]
Subject: [RESEND v4 0/6] misc: Add Add Synopsys DesignWare xData IP driver

This patch series adds a new driver called xData-pcie for the Synopsys
DesignWare PCIe prototype.

The driver configures and enables the Synopsys DesignWare PCIe traffic
generator IP inside of prototype Endpoint which will generate upstream
and downstream PCIe traffic. This allows to quickly test the PCIe link
throughput speed and check is the prototype solution has some limitation
or not.

Changes:
V2: Rework driver according to Greg Kroah-Hartman' feedback
V3: Fixed issues detected while running on 64 bits platforms
Rebased patches on top of v5.11-rc1 version
V4: Rework driver according to Greg Kroah-Hartman' feedback
Add the ABI doc related to the sysfs implemented on this driver

Cc: Derek Kiernan <[email protected]>
Cc: Dragan Cvetic <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Gustavo Pimentel (6):
misc: Add Synopsys DesignWare xData IP driver
misc: Add Synopsys DesignWare xData IP driver to Makefile
misc: Add Synopsys DesignWare xData IP driver to Kconfig
Documentation: misc-devices: Add Documentation for dw-xdata-pcie
driver
MAINTAINERS: Add Synopsys xData IP driver maintainer
docs: ABI: Add sysfs documentation interface of dw-xdata-pcie driver

Documentation/ABI/testing/sysfs-driver-xdata | 46 ++++
Documentation/misc-devices/dw-xdata-pcie.rst | 40 +++
MAINTAINERS | 7 +
drivers/misc/Kconfig | 11 +
drivers/misc/Makefile | 1 +
drivers/misc/dw-xdata-pcie.c | 378 +++++++++++++++++++++++++++
6 files changed, 483 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-driver-xdata
create mode 100644 Documentation/misc-devices/dw-xdata-pcie.rst
create mode 100644 drivers/misc/dw-xdata-pcie.c

--
2.7.4


2021-02-03 22:18:24

by Gustavo Pimentel

[permalink] [raw]
Subject: [RESEND v4 5/6] MAINTAINERS: Add Synopsys xData IP driver maintainer

Add Synopsys xData IP driver maintainer.

This driver aims to support Synopsys xData IP and is normally distributed
along with Synopsys PCIe EndPoint IP as a PCIe traffic generator (depends
of the use and licensing agreement).

Signed-off-by: Gustavo Pimentel <[email protected]>
---
MAINTAINERS | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 546aa66..f9d681b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5061,6 +5061,13 @@ S: Maintained
F: drivers/dma/dw-edma/
F: include/linux/dma/edma.h

+DESIGNWARE XDATA IP DRIVER
+M: Gustavo Pimentel <[email protected]>
+L: [email protected]
+S: Maintained
+F: Documentation/misc-devices/dw-xdata-pcie.rst
+F: drivers/misc/dw-xdata-pcie.c
+
DESIGNWARE USB2 DRD IP DRIVER
M: Minas Harutyunyan <[email protected]>
L: [email protected]
--
2.7.4

2021-02-03 22:18:58

by Gustavo Pimentel

[permalink] [raw]
Subject: [RESEND v4 2/6] misc: Add Synopsys DesignWare xData IP driver to Makefile

Add Synopsys DesignWare xData IP driver to Makefile.

This driver enables/disables the PCIe traffic generator module
pertain to the Synopsys DesignWare prototype.

Signed-off-by: Gustavo Pimentel <[email protected]>
---
drivers/misc/Makefile | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index d23231e..bf22021 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -49,6 +49,7 @@ obj-$(CONFIG_SRAM_EXEC) += sram-exec.o
obj-$(CONFIG_GENWQE) += genwqe/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_CXL_BASE) += cxl/
+obj-$(CONFIG_DW_XDATA_PCIE) += dw-xdata-pcie.o
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
obj-$(CONFIG_OCXL) += ocxl/
obj-y += cardreader/
--
2.7.4

2021-02-03 22:19:22

by Gustavo Pimentel

[permalink] [raw]
Subject: [RESEND v4 6/6] docs: ABI: Add sysfs documentation interface of dw-xdata-pcie driver

This patch describes the sysfs interface implemented on the dw-xdata-pcie
driver.

Signed-off-by: Gustavo Pimentel <[email protected]>
---
Documentation/ABI/testing/sysfs-driver-xdata | 46 ++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-driver-xdata

diff --git a/Documentation/ABI/testing/sysfs-driver-xdata b/Documentation/ABI/testing/sysfs-driver-xdata
new file mode 100644
index 00000000..a7bb44b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-xdata
@@ -0,0 +1,46 @@
+What: /sys/kernel/dw-xdata-pcie/write
+Date: February 2021
+KernelVersion: 5.12
+Contact: Gustavo Pimentel <[email protected]>
+Description: Allows the user to enable the PCIe traffic generator which
+ will create write TLPs frames - from the Root Complex to the
+ Endpoint direction.
+ Usage e.g.
+ echo 1 > /sys/kernel/dw-xdata-pcie/write
+
+ The user can read the current PCIe link throughput generated
+ through this generator.
+ Usage e.g.
+ cat /sys/kernel/dw-xdata-pcie/write
+ 204 MB/s
+
+ The file is read and write.
+
+What: /sys/kernel/dw-xdata-pcie/read
+Date: February 2021
+KernelVersion: 5.12
+Contact: Gustavo Pimentel <[email protected]>
+Description: Allows the user to enable the PCIe traffic generator which
+ will create read TLPs frames - from the Endpoint to the Root
+ Complex direction.
+ Usage e.g.
+ echo 1 > /sys/kernel/dw-xdata-pcie/read
+
+ The user can read the current PCIe link throughput generated
+ through this generator.
+ Usage e.g.
+ cat /sys/kernel/dw-xdata-pcie/read
+ 199 MB/s
+
+ The file is read and write.
+
+What: /sys/kernel/dw-xdata-pcie/stop
+Date: February 2021
+KernelVersion: 5.12
+Contact: Gustavo Pimentel <[email protected]>
+Description: Allows the user to disable the PCIe traffic generator in all
+ directions.
+ Usage e.g.
+ echo 1 > /sys/kernel/dw-xdata-pcie/stop
+
+ The file is write only.
--
2.7.4

2021-02-03 22:19:56

by Gustavo Pimentel

[permalink] [raw]
Subject: [RESEND v4 3/6] misc: Add Synopsys DesignWare xData IP driver to Kconfig

Add Synopsys DesignWare xData IP driver to Kconfig.

This driver enables/disables the PCIe traffic generator module
pertain to the Synopsys DesignWare prototype.

Signed-off-by: Gustavo Pimentel <[email protected]>
---
drivers/misc/Kconfig | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index fafa8b0..6d5783f 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -423,6 +423,17 @@ config SRAM
config SRAM_EXEC
bool

+config DW_XDATA_PCIE
+ depends on PCI
+ tristate "Synopsys DesignWare xData PCIe driver"
+ default n
+ help
+ This driver allows controlling Synopsys DesignWare PCIe traffic
+ generator IP also known as xData, present in Synopsys Designware
+ PCIe Endpoint prototype.
+
+ If unsure, say N.
+
config PCI_ENDPOINT_TEST
depends on PCI
select CRC32
--
2.7.4

2021-02-03 22:28:31

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RESEND v4 3/6] misc: Add Synopsys DesignWare xData IP driver to Kconfig

On Wed, Feb 03, 2021 at 11:12:48PM +0100, Gustavo Pimentel wrote:
> Add Synopsys DesignWare xData IP driver to Kconfig.
>
> This driver enables/disables the PCIe traffic generator module
> pertain to the Synopsys DesignWare prototype.
>
> Signed-off-by: Gustavo Pimentel <[email protected]>
> ---
> drivers/misc/Kconfig | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index fafa8b0..6d5783f 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -423,6 +423,17 @@ config SRAM
> config SRAM_EXEC
> bool
>
> +config DW_XDATA_PCIE
> + depends on PCI
> + tristate "Synopsys DesignWare xData PCIe driver"
> + default n

That's already the default, no need for this line at all.

> + help
> + This driver allows controlling Synopsys DesignWare PCIe traffic
> + generator IP also known as xData, present in Synopsys Designware
> + PCIe Endpoint prototype.

Module name?

thanks,

greg k-h

2021-02-03 22:30:56

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RESEND v4 3/6] misc: Add Synopsys DesignWare xData IP driver to Kconfig

On Wed, Feb 03, 2021 at 11:12:48PM +0100, Gustavo Pimentel wrote:
> Add Synopsys DesignWare xData IP driver to Kconfig.
>
> This driver enables/disables the PCIe traffic generator module
> pertain to the Synopsys DesignWare prototype.
>
> Signed-off-by: Gustavo Pimentel <[email protected]>
> ---
> drivers/misc/Kconfig | 11 +++++++++++
> 1 file changed, 11 insertions(+)

Why isn't this, and patch 2, part of patch 1? Why split this out?

thanks,

greg k-h