]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: endpoint: Do not mark the BAR succeeding a 64-bit BAR as BAR_RESERVED
authorNiklas Cassel <cassel@kernel.org>
Thu, 12 Mar 2026 13:02:29 +0000 (14:02 +0100)
committerManivannan Sadhasivam <mani@kernel.org>
Sun, 15 Mar 2026 16:34:22 +0000 (22:04 +0530)
commit0834d6f4abd0ca35b5706d267a6e4b78303a95de
treea5e5a6e096e69e19d2aa913064ffe3d58948540e
parent0b74f7d72399d4c4422ed3d68ef28b3612f71e74
PCI: endpoint: Do not mark the BAR succeeding a 64-bit BAR as BAR_RESERVED

A BAR that can only be configured as a 64-bit BAR by an EPC driver is
marked as such using the "only_64bit" flag.

Currently, the documentation says that an EPC driver should explicitly
mark the BAR succeeding an "only_64bit" BAR as BAR_RESERVED.

However, a 64-bit BAR will always take up two BARs. It is thus redundant
to mark both BARs.

pci_epc_get_next_free_bar() already skips the BAR succeeding a "only_64bit"
BAR, regardless if the succeeding BAR is marked as BAR_RESERVED or not.

Thus, drop the BAR_RESERVED for a BAR succeeding a "only_64bit" BAR.
No functional changes.

Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20260312130229.2282001-13-cassel@kernel.org
drivers/pci/controller/dwc/pci-layerscape-ep.c
drivers/pci/controller/dwc/pcie-keembay.c
drivers/pci/controller/dwc/pcie-qcom-ep.c
drivers/pci/controller/dwc/pcie-tegra194.c
drivers/pci/controller/dwc/pcie-uniphier-ep.c
drivers/pci/controller/pcie-rcar-ep.c
include/linux/pci-epc.h