[RFC v5 8/8] PCI: hv: Turn on the host bridge probing on ARM64

Marc Zyngier maz at kernel.org
Tue Jul 20 07:38:26 PDT 2021


On Tue, 20 Jul 2021 14:44:29 +0100,
Boqun Feng <boqun.feng at gmail.com> wrote:
> 
> Now we have everything we need, just provide a proper sysdata type for
> the bus to use on ARM64 and everything else works.
> 
> Signed-off-by: Boqun Feng <boqun.feng at gmail.com>
> ---
>  drivers/pci/controller/pci-hyperv.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index e6276aaa4659..62dbe98d1fe1 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -40,6 +40,7 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/pci.h>
> +#include <linux/pci-ecam.h>
>  #include <linux/delay.h>
>  #include <linux/semaphore.h>
>  #include <linux/irqdomain.h>
> @@ -448,7 +449,11 @@ enum hv_pcibus_state {
>  };
>  
>  struct hv_pcibus_device {
> +#ifdef CONFIG_X86
>  	struct pci_sysdata sysdata;
> +#elif defined(CONFIG_ARM64)
> +	struct pci_config_window sysdata;
> +#endif

Am I the only one who find this rather odd? Nothing ever populates
this data structure on arm64, and its only purpose seems to serve as
an anchor to retrieve the hbus via container_of().

If that's indeed the case, I'd rather see an arch-specific to_hbus()
helper that uses another (preexisting) field as the anchor for arm64.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list