History

PCI: Use bridge window names (PCI_BRIDGE_IO_WINDOW etc)

Use bridge resource definitions instead of using the PCI_BRIDGE_RESOURCES constant with an integer offeset.

Krzysztof Wilczynski committed 6 years ago

Commit 6e0688d1 parent 7b38fd93 files · +84 −60Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/pci.h+13−1
@@ -100,9 +100,21 @@ enum { · 99 unmodified lines
100100 PCI_IOV_RESOURCE_END = PCI_IOV_RESOURCES + PCI_SRIOV_NUM_BARS - 1,
101101 #endif
102102
103− /* Resources assigned to buses behind the bridge */
103+/* PCI-to-PCI (P2P) bridge windows */
104+#define PCI_BRIDGE_IO_WINDOW (PCI_BRIDGE_RESOURCES + 0)
105+#define PCI_BRIDGE_MEM_WINDOW (PCI_BRIDGE_RESOURCES + 1)
106+#define PCI_BRIDGE_PREF_MEM_WINDOW (PCI_BRIDGE_RESOURCES + 2)
107+
108+/* CardBus bridge windows */
109+#define PCI_CB_BRIDGE_IO_0_WINDOW (PCI_BRIDGE_RESOURCES + 0)
110+#define PCI_CB_BRIDGE_IO_1_WINDOW (PCI_BRIDGE_RESOURCES + 1)
111+#define PCI_CB_BRIDGE_MEM_0_WINDOW (PCI_BRIDGE_RESOURCES + 2)
112+#define PCI_CB_BRIDGE_MEM_1_WINDOW (PCI_BRIDGE_RESOURCES + 3)
113+
114+/* Total number of bridge resources for P2P and CardBus */
104115 #define PCI_BRIDGE_RESOURCE_NUM 4
105116
117+ /* Resources assigned to buses behind the bridge */
106118 PCI_BRIDGE_RESOURCES,
107119 PCI_BRIDGE_RESOURCE_END = PCI_BRIDGE_RESOURCES +
108120 PCI_BRIDGE_RESOURCE_NUM - 1,