From nobody Fri Oct 21 15:08:54 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mv7Cp2SKWz4ftT4; Fri, 21 Oct 2022 15:09:10 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 4Mv7Cl0SQ9z3tNS; Fri, 21 Oct 2022 15:09:06 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtpclient.apple (cpc91214-cmbg18-2-0-cust234.5-4.cable.virginm.net [81.102.75.235]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id D2DCE4E701; Fri, 21 Oct 2022 15:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; s=mail; t=1666364939; bh=gMysjO5O5eDLN3R8rsrY/bQWJc8/8OCKn0k1F8QLwH4=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=A/s+Ly01snYpGJ5qG+80z+uTjpprCgxsg677sIxleOc/iS6i4jtm9xCHIVt/HHmkp Qq46iRyrBxMGb4J7iZwEfwNf0NW+jblWS7+H5ycHZf7u2Z3koYzQE3z7VTVkr7w8kx 58HAk3TQ1kvtGmxBTR7qvCqW+5ps6GTqDs71wI6jArycJs1ZnWr46UM9dbBEDxsXe5 1NPZB51so2PaYfapPRyLJ+Vjh7kLVEhSU+gu4EBH8BxxfL3cENQQuSQB5J8/Bemmfz IdL6l7+uvRdWpr1+TXNICc+F0gtpbGd/LYr1a+tHXOkFTIiF1bwFSbMHCC8P9l+J0K 0YjVmu7JkwQ30S2w0nhAocp1esVhS9DrLbuIRfwn3zxzWvpyECePZgXo2g3EqKa9Ts LihGB44H7OaKCqq7zDwe8F12TP31I5Sb8WqOZQwq4jTBVCzSZz6Tpki0TDhcI0SekH uui5KbDRQfn0gkWmIsHIf9nKISIb2yKlz/6u2McSLTsVYuuk5gBPPJXZpcLpGvCz5c 6DWwEnnDp5e0WCdPT6U8/Qi4oobVyrEGkcj0sQ7npXBWZvE1NiyYz2hrS8r9xC52o9 euQVn++jJro3exMGwxQm3N9/TVdrNrGVSEo4EaWKeWYIBKa3cx92lFo5Duci6Gr9NV m51VGWHaBqLuKT8A1rWOTUL0= Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 0c38e1c3383a - main - arm64: Hyper-V: vmbus: use the IRQ resource from vmbus_res From: Andrew Turner In-Reply-To: <202210210841.29L8fjZ0006197@gitrepo.freebsd.org> Date: Fri, 21 Oct 2022 16:08:54 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202210210841.29L8fjZ0006197@gitrepo.freebsd.org> To: Wei Hu X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Mv7Cl0SQ9z3tNS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fubar.geek.nz header.s=mail header.b="A/s+Ly01"; dmarc=pass (policy=none) header.from=fubar.geek.nz; spf=softfail (mx1.freebsd.org: 139.59.165.16 is neither permitted nor denied by domain of andrew@fubar.geek.nz) smtp.mailfrom=andrew@fubar.geek.nz X-Spamd-Result: default: False [0.30 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; R_DKIM_ALLOW(-0.20)[fubar.geek.nz:s=mail]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; FREEFALL_USER(0.00)[andrew]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[]; ASN(0.00)[asn:14061, ipnet:139.59.160.0/20, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; R_SPF_SOFTFAIL(0.00)[~all]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[fubar.geek.nz:+]; FROM_EQ_ENVFROM(0.00)[]; DMARC_POLICY_ALLOW(0.00)[fubar.geek.nz,none]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N 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 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 > AuthorDate: 2022-10-21 07:49:28 +0000 > Commit: Wei Hu > 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 > 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