[RFC 5/5] PCI: hv: Remove the dependency of pci_config_window
From: Boqun Feng <hidden>
Date: 2021-08-11 15:36:56
Also in:
linux-acpi, linux-hyperv, linux-pci, lkml
Subsystem:
hyper-v/azure core and drivers, pci native host bridge and endpoint drivers, pci subsystem, the rest · Maintainers:
"K. Y. Srinivasan", Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li, Lorenzo Pieralisi, Krzysztof Wilczyński, Manivannan Sadhasivam, Bjorn Helgaas, Linus Torvalds
The ACPI device information is now correctly set via ->private of
pci_host_bridge, therefore no need to use pci_config_window in
hv_pcibus_device, so remove it.
Note we still need an empty pci_sysdata structure for non-x86, because
it's x86-specific.
Signed-off-by: Boqun Feng <redacted>
---
drivers/pci/controller/pci-hyperv.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index fd3792b5edcc..f2b977ef7b84 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -448,12 +448,17 @@ enum hv_pcibus_state {
hv_pcibus_maximum
};
+/*
+ * Defines a empty struct for non-x86 architecture, this is OK because we only
+ * use this field as an "anchor" to get back to hv_pcibus_device object on
+ * non-x86 architecture.
+ */
+#ifndef CONFIG_X86
+struct pci_sysdata { };
+#endif
+
struct hv_pcibus_device {
-#ifdef CONFIG_X86
struct pci_sysdata sysdata;
-#elif defined(CONFIG_ARM64)
- struct pci_config_window sysdata;
-#endif
struct pci_host_bridge *bridge;
struct fwnode_handle *fwnode;
/* Protocol version negotiated with the host */--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel