lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210811153619.88922-6-boqun.feng@gmail.com>
Date:   Wed, 11 Aug 2021 23:36:19 +0800
From:   Boqun Feng <boqun.feng@...il.com>
To:     Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
        Rob Herring <robh@...nel.org>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Boqun Feng <boqun.feng@...il.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-pci@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-hyperv@...r.kernel.org,
        Sunil Muthuswamy <sunilmut@...rosoft.com>,
        Marc Zyngier <maz@...nel.org>, Arnd Bergmann <arnd@...db.de>
Subject: [RFC 5/5] PCI: hv: Remove the dependency of pci_config_window

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 <boqun.feng@...il.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ