[PATCH v2 2/2] PCI: endpoint: Clarify only_64bit for reserved BARs

From: Manikanta Maddireddy

Date: Mon Nov 02 2026 - 06:35:32 EST


The only_64bit documentation describes how an EPF driver must configure a
BAR, but BAR_RESERVED must not be reprogrammed by an EPF driver.

Keep the existing configuration requirement and explain that only_64bit
also describes the hardware width of a reserved BAR. State explicitly
that its following BAR register holds the upper 32 bits and cannot be
used independently.

Signed-off-by: Manikanta Maddireddy <mmaddireddy@xxxxxxxxxx>
---
Changes V1 -> V2:
- New in v2, following Niklas Cassel's review.
- Clarify that only_64bit describes the hardware width of BAR_RESERVED
and that its upper half cannot be used independently, while retaining
the existing EPF configuration wording.

include/linux/pci-epc.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
index f247cf9bcf1a..2223842c372b 100644
--- a/include/linux/pci-epc.h
+++ b/include/linux/pci-epc.h
@@ -292,6 +292,11 @@ struct pci_epc_bar_rsvd_region {
* @only_64bit: if true, an EPF driver is not allowed to choose if this BAR
* should be configured as 32-bit or 64-bit, the EPF driver must
* configure this BAR as 64-bit.
+ *
+ * For BAR_RESERVED, only_64bit describes the hardware BAR width
+ * and does not permit an EPF driver to reprogram the BAR. Set it
+ * if the reserved BAR is 64-bit. The following BAR register holds
+ * the upper 32 bits and is not independently usable.
* @nr_rsvd_regions: number of fixed subregions described for BAR_RESERVED
* @rsvd_regions: fixed subregions behind BAR_RESERVED
*/
--
2.34.1