mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure
@ 2026-03-23 11:59 Christian Bruel
  2026-03-23 11:59 ` [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup Christian Bruel
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Christian Bruel @ 2026-03-23 11:59 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel
  Cc: fabrice.gasnier, linux-pci, linux-kselftest, linux-kernel,
	Christian Bruel

For platforms with a limited iATU inbound window entries, pci_epc_set_bar()
might fail to allocate the ATU entries for subrange maps requiring more
than 1 slot.
For the dwc controller, this failure is reported with -ENOSPC in
dw_pcie_ep_set_bar(). In this case, the epf test cannot be run and needs
to be skipped.

For other controllers (Rockchip, RCar, Cadence) the .set_bar functions do
not use this error.

Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
---
Changes in v3:
- Remove 'BAR' from SKIP print message (Niklas)
- Added 'Reviewed-by: Niklas Cassel <cassel@kernel.org>' tag
- Link to v2: https://lore.kernel.org/r/20260323-skip-bar_subrange-tests-if-enospc-v2-0-2080f878134d@foss.st.com

Changes in v2:
- Rebased, reordered patches
- Clarified reporting message in selftest
- Renamed STATUS_BAR_SUBRANGE_SETUP_NOPSC STATUS_NO_RESOURCE
- Link to v1: https://lore.kernel.org/r/20260318-skip-bar_subrange-tests-if-enospc-v1-0-f1a49534ebea@foss.st.com

---
Christian Bruel (3):
      PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup
      misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case
      selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC

 drivers/misc/pci_endpoint_test.c                         | 3 ++-
 drivers/pci/endpoint/functions/pci-epf-test.c            | 3 +++
 tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)
---
base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
change-id: 20260318-skip-bar_subrange-tests-if-enospc-c26f03038e92

Best regards,
-- 
Christian Bruel <christian.bruel@foss.st.com>


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

* [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup
  2026-03-23 11:59 [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Christian Bruel
@ 2026-03-23 11:59 ` Christian Bruel
  2026-03-23 17:02   ` Frank Li
  2026-03-23 11:59 ` [PATCH v3 2/3] misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case Christian Bruel
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Christian Bruel @ 2026-03-23 11:59 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel
  Cc: fabrice.gasnier, linux-pci, linux-kselftest, linux-kernel,
	Christian Bruel

Set the STATUS_NO_RESOURCE status bit on pci_epc_set_bar() -ENOSPC.
Here this is used to indicate there are not enough inbound window resources
to allocate the subrange.

Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
 drivers/pci/endpoint/functions/pci-epf-test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index 06bf53b28fb7ae2244a6d82bd5fe76d40db830b7..591d301fa89d89addf5df16e775e80460b689589 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -54,6 +54,7 @@
 #define STATUS_BAR_SUBRANGE_SETUP_FAIL		BIT(15)
 #define STATUS_BAR_SUBRANGE_CLEAR_SUCCESS	BIT(16)
 #define STATUS_BAR_SUBRANGE_CLEAR_FAIL		BIT(17)
+#define STATUS_NO_RESOURCE		BIT(18)
 
 #define FLAG_USE_DMA			BIT(0)
 
@@ -901,6 +902,8 @@ static void pci_epf_test_bar_subrange_setup(struct pci_epf_test *epf_test,
 	ret = pci_epc_set_bar(epc, epf->func_no, epf->vfunc_no, bar);
 	if (ret) {
 		dev_err(&epf->dev, "pci_epc_set_bar() failed: %d\n", ret);
+		if (ret == -ENOSPC)
+			status |= STATUS_NO_RESOURCE;
 		bar->submap = old_submap;
 		bar->num_submap = old_nsub;
 		ret = pci_epc_set_bar(epc, epf->func_no, epf->vfunc_no, bar);

-- 
2.34.1


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

* [PATCH v3 2/3] misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case
  2026-03-23 11:59 [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Christian Bruel
  2026-03-23 11:59 ` [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup Christian Bruel
@ 2026-03-23 11:59 ` Christian Bruel
  2026-03-23 17:03   ` Frank Li
  2026-03-23 11:59 ` [PATCH v3 3/3] selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC Christian Bruel
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Christian Bruel @ 2026-03-23 11:59 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel
  Cc: fabrice.gasnier, linux-pci, linux-kselftest, linux-kernel,
	Christian Bruel

Return -ENOSPC when the status reports the STATUS_NO_RESOURCE bit.
This signifies to the pci_endpoint test to skip this test.

Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
 drivers/misc/pci_endpoint_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 55e128ed82f00ae13b6fe9768cdbe56adbe8f9da..202196adf8ad84106ab3cf72016fa791a74697ee 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -61,6 +61,7 @@
 #define STATUS_BAR_SUBRANGE_SETUP_FAIL		BIT(15)
 #define STATUS_BAR_SUBRANGE_CLEAR_SUCCESS	BIT(16)
 #define STATUS_BAR_SUBRANGE_CLEAR_FAIL		BIT(17)
+#define STATUS_NO_RESOURCE			BIT(18)
 
 #define PCI_ENDPOINT_TEST_LOWER_SRC_ADDR	0x0c
 #define PCI_ENDPOINT_TEST_UPPER_SRC_ADDR	0x10
@@ -477,7 +478,7 @@ static int pci_endpoint_test_bar_subrange_cmd(struct pci_endpoint_test *test,
 
 	status = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_STATUS);
 	if (status & fail_bit)
-		return -EIO;
+		return (status & STATUS_NO_RESOURCE) ? -ENOSPC : -EIO;
 
 	if (!(status & ok_bit))
 		return -EIO;

-- 
2.34.1


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

* [PATCH v3 3/3] selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC
  2026-03-23 11:59 [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Christian Bruel
  2026-03-23 11:59 ` [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup Christian Bruel
  2026-03-23 11:59 ` [PATCH v3 2/3] misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case Christian Bruel
@ 2026-03-23 11:59 ` Christian Bruel
  2026-03-23 17:03   ` Frank Li
  2026-03-23 15:09 ` [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Koichiro Den
  2026-04-04 10:30 ` Manivannan Sadhasivam
  4 siblings, 1 reply; 9+ messages in thread
From: Christian Bruel @ 2026-03-23 11:59 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel
  Cc: fabrice.gasnier, linux-pci, linux-kselftest, linux-kernel,
	Christian Bruel

Handle -ENOSPC error. Skip the test if the number of available inbound
windows is insufficient to map the subrange.

Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
 tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
index c417fb3a198b2d92c3060938c23807cc8bea5573..588d75c97ad181d2f8e84c9b86b865439152e20d 100644
--- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
+++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
@@ -88,6 +88,8 @@ TEST_F(pci_ep_bar, BAR_SUBRANGE_TEST)
 		SKIP(return, "Subrange map is not supported");
 	if (ret == -ENOBUFS)
 		SKIP(return, "BAR is reserved");
+	if (ret == -ENOSPC)
+		SKIP(return, "Not enough inbound windows");
 	EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
 }
 

-- 
2.34.1


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

* Re: [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure
  2026-03-23 11:59 [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Christian Bruel
                   ` (2 preceding siblings ...)
  2026-03-23 11:59 ` [PATCH v3 3/3] selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC Christian Bruel
@ 2026-03-23 15:09 ` Koichiro Den
  2026-04-04 10:30 ` Manivannan Sadhasivam
  4 siblings, 0 replies; 9+ messages in thread
From: Koichiro Den @ 2026-03-23 15:09 UTC (permalink / raw)
  To: Christian Bruel
  Cc: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Niklas Cassel, fabrice.gasnier, linux-pci,
	linux-kselftest, linux-kernel

On Mon, Mar 23, 2026 at 12:59:26PM +0100, Christian Bruel wrote:
> For platforms with a limited iATU inbound window entries, pci_epc_set_bar()
> might fail to allocate the ATU entries for subrange maps requiring more
> than 1 slot.
> For the dwc controller, this failure is reported with -ENOSPC in
> dw_pcie_ep_set_bar(). In this case, the epf test cannot be run and needs
> to be skipped.
> 
> For other controllers (Rockchip, RCar, Cadence) the .set_bar functions do
> not use this error.
> 
> Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
> ---
> Changes in v3:
> - Remove 'BAR' from SKIP print message (Niklas)
> - Added 'Reviewed-by: Niklas Cassel <cassel@kernel.org>' tag
> - Link to v2: https://lore.kernel.org/r/20260323-skip-bar_subrange-tests-if-enospc-v2-0-2080f878134d@foss.st.com
> 
> Changes in v2:
> - Rebased, reordered patches
> - Clarified reporting message in selftest
> - Renamed STATUS_BAR_SUBRANGE_SETUP_NOPSC STATUS_NO_RESOURCE
> - Link to v1: https://lore.kernel.org/r/20260318-skip-bar_subrange-tests-if-enospc-v1-0-f1a49534ebea@foss.st.com
> 
> ---
> Christian Bruel (3):
>       PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup
>       misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case
>       selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC
> 
>  drivers/misc/pci_endpoint_test.c                         | 3 ++-
>  drivers/pci/endpoint/functions/pci-epf-test.c            | 3 +++
>  tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 ++
>  3 files changed, 7 insertions(+), 1 deletion(-)
> ---
> base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
> change-id: 20260318-skip-bar_subrange-tests-if-enospc-c26f03038e92
> 
> Best regards,
> -- 
> Christian Bruel <christian.bruel@foss.st.com>

Hi Christian,

Thanks for the work. Looks good to me.
Reviewed-by: Koichiro Den <den@valinux.co.jp>

For maintainers:

For this series to behave as intended in all scenarios, please apply [1] first,
then apply this series on top, as it depends on [1].

[1] https://lore.kernel.org/linux-pci/20260320140139.2415480-1-den@valinux.co.jp/

Best regards,
Koichiro

> 

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

* Re: [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup
  2026-03-23 11:59 ` [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup Christian Bruel
@ 2026-03-23 17:02   ` Frank Li
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Li @ 2026-03-23 17:02 UTC (permalink / raw)
  To: Christian Bruel
  Cc: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel, fabrice.gasnier,
	linux-pci, linux-kselftest, linux-kernel

On Mon, Mar 23, 2026 at 12:59:27PM +0100, Christian Bruel wrote:
> Set the STATUS_NO_RESOURCE status bit on pci_epc_set_bar() -ENOSPC.
> Here this is used to indicate there are not enough inbound window resources
> to allocate the subrange.
>
> Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
>  drivers/pci/endpoint/functions/pci-epf-test.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> index 06bf53b28fb7ae2244a6d82bd5fe76d40db830b7..591d301fa89d89addf5df16e775e80460b689589 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> @@ -54,6 +54,7 @@
>  #define STATUS_BAR_SUBRANGE_SETUP_FAIL		BIT(15)
>  #define STATUS_BAR_SUBRANGE_CLEAR_SUCCESS	BIT(16)
>  #define STATUS_BAR_SUBRANGE_CLEAR_FAIL		BIT(17)
> +#define STATUS_NO_RESOURCE		BIT(18)
>
>  #define FLAG_USE_DMA			BIT(0)
>
> @@ -901,6 +902,8 @@ static void pci_epf_test_bar_subrange_setup(struct pci_epf_test *epf_test,
>  	ret = pci_epc_set_bar(epc, epf->func_no, epf->vfunc_no, bar);
>  	if (ret) {
>  		dev_err(&epf->dev, "pci_epc_set_bar() failed: %d\n", ret);
> +		if (ret == -ENOSPC)
> +			status |= STATUS_NO_RESOURCE;
>  		bar->submap = old_submap;
>  		bar->num_submap = old_nsub;
>  		ret = pci_epc_set_bar(epc, epf->func_no, epf->vfunc_no, bar);
>
> --
> 2.34.1
>

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

* Re: [PATCH v3 2/3] misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case
  2026-03-23 11:59 ` [PATCH v3 2/3] misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case Christian Bruel
@ 2026-03-23 17:03   ` Frank Li
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Li @ 2026-03-23 17:03 UTC (permalink / raw)
  To: Christian Bruel
  Cc: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel, fabrice.gasnier,
	linux-pci, linux-kselftest, linux-kernel

On Mon, Mar 23, 2026 at 12:59:28PM +0100, Christian Bruel wrote:
> Return -ENOSPC when the status reports the STATUS_NO_RESOURCE bit.
> This signifies to the pci_endpoint test to skip this test.
>
> Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
>  drivers/misc/pci_endpoint_test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
> index 55e128ed82f00ae13b6fe9768cdbe56adbe8f9da..202196adf8ad84106ab3cf72016fa791a74697ee 100644
> --- a/drivers/misc/pci_endpoint_test.c
> +++ b/drivers/misc/pci_endpoint_test.c
> @@ -61,6 +61,7 @@
>  #define STATUS_BAR_SUBRANGE_SETUP_FAIL		BIT(15)
>  #define STATUS_BAR_SUBRANGE_CLEAR_SUCCESS	BIT(16)
>  #define STATUS_BAR_SUBRANGE_CLEAR_FAIL		BIT(17)
> +#define STATUS_NO_RESOURCE			BIT(18)
>
>  #define PCI_ENDPOINT_TEST_LOWER_SRC_ADDR	0x0c
>  #define PCI_ENDPOINT_TEST_UPPER_SRC_ADDR	0x10
> @@ -477,7 +478,7 @@ static int pci_endpoint_test_bar_subrange_cmd(struct pci_endpoint_test *test,
>
>  	status = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_STATUS);
>  	if (status & fail_bit)
> -		return -EIO;
> +		return (status & STATUS_NO_RESOURCE) ? -ENOSPC : -EIO;
>
>  	if (!(status & ok_bit))
>  		return -EIO;
>
> --
> 2.34.1
>

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

* Re: [PATCH v3 3/3] selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC
  2026-03-23 11:59 ` [PATCH v3 3/3] selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC Christian Bruel
@ 2026-03-23 17:03   ` Frank Li
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Li @ 2026-03-23 17:03 UTC (permalink / raw)
  To: Christian Bruel
  Cc: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Shuah Khan, Bjorn Helgaas, Arnd Bergmann,
	Greg Kroah-Hartman, Koichiro Den, Niklas Cassel, fabrice.gasnier,
	linux-pci, linux-kselftest, linux-kernel

On Mon, Mar 23, 2026 at 12:59:29PM +0100, Christian Bruel wrote:
> Handle -ENOSPC error. Skip the test if the number of available inbound
> windows is insufficient to map the subrange.
>
> Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>
>  tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
> index c417fb3a198b2d92c3060938c23807cc8bea5573..588d75c97ad181d2f8e84c9b86b865439152e20d 100644
> --- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
> +++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
> @@ -88,6 +88,8 @@ TEST_F(pci_ep_bar, BAR_SUBRANGE_TEST)
>  		SKIP(return, "Subrange map is not supported");
>  	if (ret == -ENOBUFS)
>  		SKIP(return, "BAR is reserved");
> +	if (ret == -ENOSPC)
> +		SKIP(return, "Not enough inbound windows");
>  	EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
>  }
>
>
> --
> 2.34.1
>

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

* Re: [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure
  2026-03-23 11:59 [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Christian Bruel
                   ` (3 preceding siblings ...)
  2026-03-23 15:09 ` [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Koichiro Den
@ 2026-04-04 10:30 ` Manivannan Sadhasivam
  4 siblings, 0 replies; 9+ messages in thread
From: Manivannan Sadhasivam @ 2026-04-04 10:30 UTC (permalink / raw)
  To: Christian Bruel
  Cc: Krzysztof Wilczyński, Kishon Vijay Abraham I, Shuah Khan,
	Bjorn Helgaas, Arnd Bergmann, Greg Kroah-Hartman, Koichiro Den,
	Niklas Cassel, fabrice.gasnier, linux-pci, linux-kselftest,
	linux-kernel

On Mon, Mar 23, 2026 at 12:59:26PM +0100, Christian Bruel wrote:
> For platforms with a limited iATU inbound window entries, pci_epc_set_bar()
> might fail to allocate the ATU entries for subrange maps requiring more
> than 1 slot.
> For the dwc controller, this failure is reported with -ENOSPC in
> dw_pcie_ep_set_bar(). In this case, the epf test cannot be run and needs
> to be skipped.
> 
> For other controllers (Rockchip, RCar, Cadence) the .set_bar functions do
> not use this error.
> 
> Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>

Could you please respin this series on top of pci/endpoint branch?

- Mani

> ---
> Changes in v3:
> - Remove 'BAR' from SKIP print message (Niklas)
> - Added 'Reviewed-by: Niklas Cassel <cassel@kernel.org>' tag
> - Link to v2: https://lore.kernel.org/r/20260323-skip-bar_subrange-tests-if-enospc-v2-0-2080f878134d@foss.st.com
> 
> Changes in v2:
> - Rebased, reordered patches
> - Clarified reporting message in selftest
> - Renamed STATUS_BAR_SUBRANGE_SETUP_NOPSC STATUS_NO_RESOURCE
> - Link to v1: https://lore.kernel.org/r/20260318-skip-bar_subrange-tests-if-enospc-v1-0-f1a49534ebea@foss.st.com
> 
> ---
> Christian Bruel (3):
>       PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup
>       misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case
>       selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC
> 
>  drivers/misc/pci_endpoint_test.c                         | 3 ++-
>  drivers/pci/endpoint/functions/pci-epf-test.c            | 3 +++
>  tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 2 ++
>  3 files changed, 7 insertions(+), 1 deletion(-)
> ---
> base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
> change-id: 20260318-skip-bar_subrange-tests-if-enospc-c26f03038e92
> 
> Best regards,
> -- 
> Christian Bruel <christian.bruel@foss.st.com>
> 

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

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

end of thread, other threads:[~2026-04-04 10:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-23 11:59 [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Christian Bruel
2026-03-23 11:59 ` [PATCH v3 1/3] PCI: endpoint: pci-epf-test: Handle -ENOSPC in subrange_setup Christian Bruel
2026-03-23 17:02   ` Frank Li
2026-03-23 11:59 ` [PATCH v3 2/3] misc: pci_endpoint_test: Handle -ENOSPC in subrange mapping test case Christian Bruel
2026-03-23 17:03   ` Frank Li
2026-03-23 11:59 ` [PATCH v3 3/3] selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC Christian Bruel
2026-03-23 17:03   ` Frank Li
2026-03-23 15:09 ` [PATCH v3 0/3] Skip subrange map tests on DWC iATU allocation failure Koichiro Den
2026-04-04 10:30 ` Manivannan Sadhasivam

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

all inboxes | Powered by JetHome®