The branch main has been updated by whu:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0c38e1c3383ab540ed01284be46769263c560d96

commit 0c38e1c3383ab540ed01284be46769263c560d96
Author:     Souradeep Chakrabarti <[email protected]>
AuthorDate: 2022-10-21 07:49:28 +0000
Commit:     Wei Hu <[email protected]>
CommitDate: 2022-10-21 08:40:32 +0000

    arm64: Hyper-V: vmbus: use the IRQ resource from vmbus_res
    
    In ARM64 gen2 Hyper-V, use IRQ resource from vmbus_res, which is owning
    the IRQ for current device tree. It allows the MMIO resource to be
    successfully allocated for vmbus from parent acpi_syscontainer.
    Reviewed by:    whu
    Tested by:      Souradeep Chakrabarti <[email protected]>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D37064
---
 sys/dev/hyperv/vmbus/aarch64/vmbus_aarch64.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/hyperv/vmbus/aarch64/vmbus_aarch64.c 
b/sys/dev/hyperv/vmbus/aarch64/vmbus_aarch64.c
index ba4d8c9bc36e..66e605b94094 100644
--- a/sys/dev/hyperv/vmbus/aarch64/vmbus_aarch64.c
+++ b/sys/dev/hyperv/vmbus/aarch64/vmbus_aarch64.c
@@ -111,8 +111,10 @@ vmbus_setup_intr1(struct vmbus_softc *sc)
 {
        int err;
        struct intr_map_data_acpi *irq_data;
+       device_t dev;
 
-       sc->ires = bus_alloc_resource_any(device_get_parent(sc->vmbus_dev),
+       dev =  devclass_get_device(devclass_find("vmbus_res"), 0);
+       sc->ires = bus_alloc_resource_any(dev,
            SYS_RES_IRQ, &sc->vector, RF_ACTIVE | RF_SHAREABLE);
        if (sc->ires == NULL) {
                device_printf(sc->vmbus_dev, "bus_alloc_resouce_any failed\n");

Reply via email to