Skip to content

RFC PCI: Introduce pci_ops::use_arch_sysdata

Boqun Feng linux-arm-kernel linux-hyperv linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2arm64: PCI: Allow use arch-specific pci sysdataarch/arm64/include/asm/pci.h arch/arm64/kernel/pci.c include/linux/pci.h+44 -311 replies
2/2PCI: hv: Tell PCI core arch-specific sysdata is useddrivers/pci/controller/pci-hyperv.c+3 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchSunil Muthuswamy
1/2Originally-by
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/2] PCI: Introduce pci_ops::use_arch_sysdata

Hi Bjorn,

I'm currently working on virtual PCI support for Hyper-V ARM64 guests. Similar to virtual PCI on x86 Hyper-V guests, the PCI root bus is not probed via ACPI (or of), it's probed from Hyper-V VMbus, therefore it doesn't have config window.

Since ARM64 is a CONFIG_PCI_DOMAINS_GENERIC=y, PCI core code always treats as the root bus has a config window. So we need to resolve this and want to reuse the code as much as possible. My current solution is introducing a pci_ops::use_arch_sysdata, and if it's true, the PCI core code treats the pci_bus::sysdata as an arch-specific sysdata (rather than pci_config_window) for CONFIG_PCI_DOMAINS_GENERIC=y architectures. This allows us to reuse the existing code for Hyper-V PCI controller.

This is simply a proposal, I'm open to any suggestion.

Thanks!

Regards,
Boqun

Boqun Feng (2):
arm64: PCI: Allow use arch-specific pci sysdata
PCI: hv: Tell PCI core arch-specific sysdata is used

 arch/arm64/include/asm/pci.h        | 29 +++++++++++++++++++++++++++++
 arch/arm64/kernel/pci.c             | 15 ++++++++++++---
 drivers/pci/controller/pci-hyperv.c |  3 +++
 include/linux/pci.h                 |  3 +++
 4 files changed, 47 insertions(+), 3 deletions(-)
Signature · 1 line
2.30.2