Date: Fri, 21 Oct 2022 16:08:54 +0100 From: Andrew Turner <andrew@fubar.geek.nz> To: Wei Hu <whu@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 0c38e1c3383a - main - arm64: Hyper-V: vmbus: use the IRQ resource from vmbus_res Message-ID: <B16B8ABE-DEAE-4BB2-8A9E-99FF08AA7B3D@fubar.geek.nz> In-Reply-To: <202210210841.29L8fjZ0006197@gitrepo.freebsd.org> References: <202210210841.29L8fjZ0006197@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Why does the vmbus_res driver exist? It seems to me it should be removed = and the vmbus driver attach to the VMBUS node in the ACPI tables. You = may have to split it slightly to support the two attachments, one for = ACPI using MMIO, and one for PCI. Andrew > On 21 Oct 2022, at 09:41, Wei Hu <whu@FreeBSD.org> wrote: >=20 > The branch main has been updated by whu: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D0c38e1c3383ab540ed01284be4676926= 3c560d96 >=20 > 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 >=20 > arm64: Hyper-V: vmbus: use the IRQ resource from vmbus_res >=20 > 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(-) >=20 > 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; >=20 > - sc->ires =3D = bus_alloc_resource_any(device_get_parent(sc->vmbus_dev), > + dev =3D devclass_get_device(devclass_find("vmbus_res"), 0); > + sc->ires =3D bus_alloc_resource_any(dev, > SYS_RES_IRQ, &sc->vector, RF_ACTIVE | RF_SHAREABLE); > if (sc->ires =3D=3D NULL) { > device_printf(sc->vmbus_dev, "bus_alloc_resouce_any = failed\n"); >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B16B8ABE-DEAE-4BB2-8A9E-99FF08AA7B3D>