Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and reserved BARs
@ 2026-03-12 13:02 Niklas Cassel
  2026-03-12 13:02 ` [PATCH v4 10/10] selftests: pci_endpoint: Skip " Niklas Cassel
  2026-03-15 16:38 ` [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and " Manivannan Sadhasivam
  0 siblings, 2 replies; 3+ messages in thread
From: Niklas Cassel @ 2026-03-12 13:02 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Arnd Bergmann, Greg Kroah-Hartman,
	Vignesh Raghavendra, Siddharth Vadapalli, Lorenzo Pieralisi,
	Rob Herring, Bjorn Helgaas, Richard Zhu, Lucas Stach, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Minghuan Lian, Mingkai Hu, Roy Zang, Jesper Nilsson, Jingoo Han,
	Heiko Stuebner, Srikanth Thokala, Marek Vasut, Yoshihiro Shimoda,
	Geert Uytterhoeven, Magnus Damm, Christian Bruel, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Kunihiko Hayashi, Masami Hiramatsu, Shuah Khan
  Cc: Manikanta Maddireddy, Koichiro Den, Damien Le Moal, Niklas Cassel,
	linux-pci, linux-omap, linux-arm-kernel, imx, linuxppc-dev,
	linux-arm-kernel, linux-rockchip, linux-arm-msm,
	linux-renesas-soc, linux-stm32, linux-tegra, linux-kselftest

Hello all,

This series was originally written in response to the patch series from
Manikanta Maddireddy that was posted here:
https://lore.kernel.org/linux-pci/291dab65-3fa6-4fc8-90a2-4ad608ca015c@nvidia.com/T/#t

Manikanta has reviewed this series and will send a small series on top of
this one.


Changes since v3:
-Modified patch 1 to simply drop BAR_RESERVED for a BAR following an
 only_64bit BAR (Manivannan).
-Added a patch from Manikanta, to make his follow-up series smaller,
 since this series touches the same lines anyway.

Link to v3:
https://lore.kernel.org/linux-pci/20260302095913.48155-11-cassel@kernel.org/


Koichiro Den (2):
  PCI: endpoint: Describe reserved subregions within BARs
  PCI: dw-rockchip: Describe RK3588 BAR4 DMA ctrl window

Manikanta Maddireddy (1):
  PCI: endpoint: Allow only_64bit on BAR_RESERVED

Niklas Cassel (7):
  PCI: endpoint: Do not mark the BAR succeeding a 64-bit BAR as
    BAR_RESERVED
  PCI: endpoint: Introduce pci_epc_bar_type BAR_DISABLED
  PCI: dwc: Replace certain BAR_RESERVED with BAR_DISABLED in glue
    drivers
  PCI: dwc: Disable BARs in common code instead of in each glue driver
  PCI: endpoint: pci-epf-test: Advertise reserved BARs
  misc: pci_endpoint_test: Give reserved BARs a distinct error code
  selftests: pci_endpoint: Skip reserved BARs

 drivers/misc/pci_endpoint_test.c              | 21 ++++++++-
 drivers/pci/controller/dwc/pci-dra7xx.c       |  4 --
 drivers/pci/controller/dwc/pci-imx6.c         | 22 +++------
 drivers/pci/controller/dwc/pci-keystone.c     | 12 +++++
 .../pci/controller/dwc/pci-layerscape-ep.c    |  6 ---
 drivers/pci/controller/dwc/pcie-artpec6.c     |  4 --
 .../pci/controller/dwc/pcie-designware-ep.c   | 24 ++++++++++
 .../pci/controller/dwc/pcie-designware-plat.c | 10 ----
 drivers/pci/controller/dwc/pcie-dw-rockchip.c | 23 ++++++----
 drivers/pci/controller/dwc/pcie-keembay.c     |  3 --
 drivers/pci/controller/dwc/pcie-qcom-ep.c     | 12 -----
 drivers/pci/controller/dwc/pcie-rcar-gen4.c   | 16 ++-----
 drivers/pci/controller/dwc/pcie-stm32-ep.c    | 10 ----
 drivers/pci/controller/dwc/pcie-tegra194.c    | 19 ++------
 drivers/pci/controller/dwc/pcie-uniphier-ep.c | 19 +-------
 drivers/pci/controller/pcie-rcar-ep.c         |  3 --
 drivers/pci/endpoint/functions/pci-epf-test.c | 24 ++++++++++
 drivers/pci/endpoint/pci-epc-core.c           |  5 +-
 include/linux/pci-epc.h                       | 46 +++++++++++++++----
 .../pci_endpoint/pci_endpoint_test.c          |  4 ++
 20 files changed, 154 insertions(+), 133 deletions(-)


base-commit: 0b74f7d72399d4c4422ed3d68ef28b3612f71e74
-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v4 10/10] selftests: pci_endpoint: Skip reserved BARs
  2026-03-12 13:02 [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and reserved BARs Niklas Cassel
@ 2026-03-12 13:02 ` Niklas Cassel
  2026-03-15 16:38 ` [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and " Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Cassel @ 2026-03-12 13:02 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan
  Cc: Manikanta Maddireddy, Koichiro Den, Damien Le Moal, Niklas Cassel,
	Frank Li, linux-pci, linux-kselftest

Running a test against a reserved BAR will result in the pci-epf-test
driver returning -ENOBUFS.

Make sure that the pci_endpoint_test selftest will return skip instead of
failure or success for reserved BARs.

Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Tested-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
 tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
index e0dbbb2af8c7..c417fb3a198b 100644
--- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
+++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
@@ -67,6 +67,8 @@ TEST_F(pci_ep_bar, BAR_TEST)
 	pci_ep_ioctl(PCITEST_BAR, variant->barno);
 	if (ret == -ENODATA)
 		SKIP(return, "BAR is disabled");
+	if (ret == -ENOBUFS)
+		SKIP(return, "BAR is reserved");
 	EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
 }
 
@@ -84,6 +86,8 @@ TEST_F(pci_ep_bar, BAR_SUBRANGE_TEST)
 		SKIP(return, "BAR is test register space");
 	if (ret == -EOPNOTSUPP)
 		SKIP(return, "Subrange map is not supported");
+	if (ret == -ENOBUFS)
+		SKIP(return, "BAR is reserved");
 	EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
 }
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and reserved BARs
  2026-03-12 13:02 [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and reserved BARs Niklas Cassel
  2026-03-12 13:02 ` [PATCH v4 10/10] selftests: pci_endpoint: Skip " Niklas Cassel
@ 2026-03-15 16:38 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-15 16:38 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: Krzysztof Wilczyński, Kishon Vijay Abraham I, Arnd Bergmann,
	Greg Kroah-Hartman, Vignesh Raghavendra, Siddharth Vadapalli,
	Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas, Richard Zhu,
	Lucas Stach, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Minghuan Lian, Mingkai Hu, Roy Zang,
	Jesper Nilsson, Jingoo Han, Heiko Stuebner, Srikanth Thokala,
	Marek Vasut, Yoshihiro Shimoda, Geert Uytterhoeven, Magnus Damm,
	Christian Bruel, Maxime Coquelin, Alexandre Torgue,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Shuah Khan, Manikanta Maddireddy, Koichiro Den,
	Damien Le Moal, linux-pci, linux-omap, linux-arm-kernel, imx,
	linuxppc-dev, linux-arm-kernel, linux-rockchip, linux-arm-msm,
	linux-renesas-soc, linux-stm32, linux-tegra, linux-kselftest

On Thu, Mar 12, 2026 at 02:02:28PM +0100, Niklas Cassel wrote:
> Hello all,
> 
> This series was originally written in response to the patch series from
> Manikanta Maddireddy that was posted here:
> https://lore.kernel.org/linux-pci/291dab65-3fa6-4fc8-90a2-4ad608ca015c@nvidia.com/T/#t
> 
> Manikanta has reviewed this series and will send a small series on top of
> this one.
> 

Applied to pci/endpoint, thanks!

- Mani

> 
> Changes since v3:
> -Modified patch 1 to simply drop BAR_RESERVED for a BAR following an
>  only_64bit BAR (Manivannan).
> -Added a patch from Manikanta, to make his follow-up series smaller,
>  since this series touches the same lines anyway.
> 
> Link to v3:
> https://lore.kernel.org/linux-pci/20260302095913.48155-11-cassel@kernel.org/
> 
> 
> Koichiro Den (2):
>   PCI: endpoint: Describe reserved subregions within BARs
>   PCI: dw-rockchip: Describe RK3588 BAR4 DMA ctrl window
> 
> Manikanta Maddireddy (1):
>   PCI: endpoint: Allow only_64bit on BAR_RESERVED
> 
> Niklas Cassel (7):
>   PCI: endpoint: Do not mark the BAR succeeding a 64-bit BAR as
>     BAR_RESERVED
>   PCI: endpoint: Introduce pci_epc_bar_type BAR_DISABLED
>   PCI: dwc: Replace certain BAR_RESERVED with BAR_DISABLED in glue
>     drivers
>   PCI: dwc: Disable BARs in common code instead of in each glue driver
>   PCI: endpoint: pci-epf-test: Advertise reserved BARs
>   misc: pci_endpoint_test: Give reserved BARs a distinct error code
>   selftests: pci_endpoint: Skip reserved BARs
> 
>  drivers/misc/pci_endpoint_test.c              | 21 ++++++++-
>  drivers/pci/controller/dwc/pci-dra7xx.c       |  4 --
>  drivers/pci/controller/dwc/pci-imx6.c         | 22 +++------
>  drivers/pci/controller/dwc/pci-keystone.c     | 12 +++++
>  .../pci/controller/dwc/pci-layerscape-ep.c    |  6 ---
>  drivers/pci/controller/dwc/pcie-artpec6.c     |  4 --
>  .../pci/controller/dwc/pcie-designware-ep.c   | 24 ++++++++++
>  .../pci/controller/dwc/pcie-designware-plat.c | 10 ----
>  drivers/pci/controller/dwc/pcie-dw-rockchip.c | 23 ++++++----
>  drivers/pci/controller/dwc/pcie-keembay.c     |  3 --
>  drivers/pci/controller/dwc/pcie-qcom-ep.c     | 12 -----
>  drivers/pci/controller/dwc/pcie-rcar-gen4.c   | 16 ++-----
>  drivers/pci/controller/dwc/pcie-stm32-ep.c    | 10 ----
>  drivers/pci/controller/dwc/pcie-tegra194.c    | 19 ++------
>  drivers/pci/controller/dwc/pcie-uniphier-ep.c | 19 +-------
>  drivers/pci/controller/pcie-rcar-ep.c         |  3 --
>  drivers/pci/endpoint/functions/pci-epf-test.c | 24 ++++++++++
>  drivers/pci/endpoint/pci-epc-core.c           |  5 +-
>  include/linux/pci-epc.h                       | 46 +++++++++++++++----
>  .../pci_endpoint/pci_endpoint_test.c          |  4 ++
>  20 files changed, 154 insertions(+), 133 deletions(-)
> 
> 
> base-commit: 0b74f7d72399d4c4422ed3d68ef28b3612f71e74
> -- 
> 2.53.0
> 

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-15 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 13:02 [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and reserved BARs Niklas Cassel
2026-03-12 13:02 ` [PATCH v4 10/10] selftests: pci_endpoint: Skip " Niklas Cassel
2026-03-15 16:38 ` [PATCH v4 00/10] PCI: endpoint: Differentiate between disabled and " Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox