OpenCloudOS-Kernel/arch/arm64
Boqun Feng 7d40c0f70d arm64: PCI: Support root bridge preparation for Hyper-V
Currently at root bridge preparation, the corresponding ACPI device will
be set as the companion, however for a Hyper-V virtual PCI root bridge,
there is no corresponding ACPI device, because a Hyper-V virtual PCI
root bridge is discovered via VMBus rather than ACPI table. In order to
support this, we need to make pcibios_root_bridge_prepare() work with
cfg->parent being NULL.

Use a NULL pointer as the ACPI device if there is no corresponding ACPI
device, and this is fine because: 1) ACPI_COMPANION_SET() can work with
the second parameter being NULL, 2) semantically, if a NULL pointer is
set via ACPI_COMPANION_SET(), ACPI_COMPANION() (the read API for this
field) will return NULL, and since ACPI_COMPANION() may return NULL, so
users must have handled the cases where it returns NULL, and 3) since
there is no corresponding ACPI device, it would be wrong to use any
other value here.

Link: https://lore.kernel.org/r/20210726180657.142727-5-boqun.feng@gmail.com
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
2021-08-23 10:59:26 +01:00
..
boot ARM: Devicetree material for 5.14 2021-07-10 09:33:54 -07:00
configs Additional Qualcomm ARM64 defconfig udpate for v5.14 2021-06-23 19:01:58 -07:00
crypto crypto: arm64 - use a pattern rule for generating *.S files 2021-05-14 19:07:54 +08:00
include mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * 2021-07-08 11:48:22 -07:00
kernel arm64: PCI: Support root bridge preparation for Hyper-V 2021-08-23 10:59:26 +01:00
kvm Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
lib Merge branch 'for-next/mte' into for-next/core 2021-06-24 14:05:25 +01:00
mm set_memory: allow querying whether set_direct_map_*() is actually enabled 2021-07-08 11:48:20 -07:00
net Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
tools arm64: Allow mismatched 32-bit EL0 support 2021-06-11 13:25:40 +01:00
xen
Kbuild bpf: Fix BPF_JIT kconfig symbol dependency 2021-05-20 23:48:37 +02:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
Kconfig.debug
Kconfig.platforms Merge branch 'arm/fixes' into arm/soc 2021-07-09 10:46:02 -07:00
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00