Date: Fri, 21 Oct 2022 08:41:45 GMT From: Wei Hu <whu@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 0c38e1c3383a - main - arm64: Hyper-V: vmbus: use the IRQ resource from vmbus_res Message-ID: <202210210841.29L8fjZ0006197@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=0c38e1c3383ab540ed01284be46769263c560d96 commit 0c38e1c3383ab540ed01284be46769263c560d96 Author: Souradeep Chakrabarti <schakrabarti@microsoft.com> AuthorDate: 2022-10-21 07:49:28 +0000 Commit: Wei Hu <whu@FreeBSD.org> 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 <schakrabarti@microsoft.com> 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210210841.29L8fjZ0006197>