From nobody Mon Feb 9 16:28:47 2026 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 4f8qrb6dgHz6RgGS for ; Mon, 09 Feb 2026 16:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f8qrb3HtVz3Pqv for ; Mon, 09 Feb 2026 16:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770654527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sA9/MkPUJ240uILWdV4HP+uvKCOIRPTRavixFlzQpVY=; b=iUg3ObGIcLl5wzHzZ4L6I9e+L4iRwK3oWSz2HogUbF0il7rM9UJNh1Ur9I1Hl/2qQB22Ww ChuBFbDQnwkwNjggsZPQyLTnqkL9axEUtV5W5TjR5T6i6Uyt76/zdcNg0SyJBAZ79eyMSE WqOf0YTu9IWs07vUcZlnXMi4WgtE6mqr61GBlGl3XSEnPhSpeoUs/vXwdYwP3nvOTexe/Z re+wddzCfAVxe1+usbAvtwuNao6cd3GAbV00uwFLLlvnVtEm74qOBMK/6L0ruBPBsxoibN gdl6vWZthdxA05ccPJqm4yYvRDc6q56IgEzqjzTfpZue2zJins7EBdVmhpn5sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770654527; a=rsa-sha256; cv=none; b=CWLJEai2/hR/6C/AEc+XhhxaWvUYOnpxM12CWq7asFw3ICUi/Sux2R6BXCTUvzvZSqOYrl g8nlgJqW11d/7soLo/0Zvh6eBCsDTwTQzRadOiqXCLHrLXS43dKJrUgIxMp1R8POnj7SWm 24fezwYz7CsGxgfTgMUlgFncRSx3swW9H4qO+k13mVOeUsax+g9szUy3MGSWPFndQdeI3P 5SHCyVKxGFSrJOui74xpGRVFtwe5QAgcP/4WkXwtAK6HqzySfk7T/15Hezs9rIArfyj6LS uiyW/OfrCVBAi/yIikhD5woBCBWsJUwgIBjrMbdIHuslF5cyd23+ft/437RpTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770654527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sA9/MkPUJ240uILWdV4HP+uvKCOIRPTRavixFlzQpVY=; b=wIfdnUBFNxhyNCd8pCjtxoKAk5QK0hdMtDLKtgVHMB68xscsA5MLS8tS5lU0Q2WRbYNaeB F6868PVHEmjuyLjWCcT0cv0Y1psaG+C5dMGxlou4nnr3CKFGRRLJm2qIjDFryo+9xKSDTw 9RKg5F8mizyqE06bNLhve7sAIA9aR6lCSZyGHMyw0MC6c11+5Ir7jsmj1QTgNl4HjOdSvB il1fbB7ehVUtA24SYapwJuUtXRTz9m3TUIXZREVFmkMpuSdFJlxgTBU+CdbCNxZUp5LHk0 zm5y8YYVw4Tv/vLneV2CGZ9WncJ2lEVUexvits86Qrju1f1G0yJlQTIA5k3huQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f8qrb2s7yzh4c for ; Mon, 09 Feb 2026 16:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d71d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 09 Feb 2026 16:28:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 93ba7dce8954 - stable/15 - arm64: Attach the vgic even if there is no ITS 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 93ba7dce8954bc61d9d87170936e203e443bbdd3 Auto-Submitted: auto-generated Date: Mon, 09 Feb 2026 16:28:47 +0000 Message-Id: <698a0b3f.1d71d.701db2f5@gitrepo.freebsd.org> The branch stable/15 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=93ba7dce8954bc61d9d87170936e203e443bbdd3 commit 93ba7dce8954bc61d9d87170936e203e443bbdd3 Author: Andrew Turner AuthorDate: 2026-01-19 14:24:14 +0000 Commit: Andrew Turner CommitDate: 2026-02-09 14:52:00 +0000 arm64: Attach the vgic even if there is no ITS If there is no ITS device so no memory resources the gicv3 driver would exit attaching early. This caused the vgic driver to also not be attached, even if it could. Reported by: novel@ Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54791 (cherry picked from commit c12d6cc326b70326d776324067bdf07e4fa328aa) --- sys/arm64/arm64/gic_v3_fdt.c | 57 +++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c index 4bea4040c0ba..efe4a39c1cba 100644 --- a/sys/arm64/arm64/gic_v3_fdt.c +++ b/sys/arm64/arm64/gic_v3_fdt.c @@ -86,7 +86,7 @@ EARLY_DRIVER_MODULE(gic_v3, ofwbus, gic_v3_fdt_driver, 0, 0, /* * Helper functions declarations. */ -static int gic_v3_ofw_bus_attach(device_t); +static void gic_v3_ofw_bus_attach(device_t); /* * Device interface. @@ -180,12 +180,7 @@ gic_v3_fdt_attach(device_t dev) * GIC will act as a bus in that case. * Failure here will not affect main GIC functionality. */ - if (gic_v3_ofw_bus_attach(dev) != 0) { - if (bootverbose) { - device_printf(dev, - "Failed to attach ITS to this GIC\n"); - } - } + gic_v3_ofw_bus_attach(dev); if (device_get_children(dev, &sc->gic_children, &sc->gic_nchildren) != 0) sc->gic_nchildren = 0; @@ -285,7 +280,7 @@ gic_v3_ofw_fill_ranges(phandle_t parent, struct gic_v3_softc *sc, * Collects and configures device informations and finally * adds ITS device as a child of GICv3 in Newbus hierarchy. */ -static int +static void gic_v3_ofw_bus_attach(device_t dev) { struct gic_v3_ofw_devinfo *di; @@ -300,8 +295,13 @@ gic_v3_ofw_bus_attach(device_t dev) if (parent > 0) { rv = gic_v3_ofw_fill_ranges(parent, sc, &addr_cells, &size_cells); - if (rv != 0) - return (rv); + if (rv != 0) { + if (bootverbose) { + device_printf(dev, + "Failed to attach ITS to this GIC\n"); + } + goto vgic; + } /* Iterate through all GIC subordinates */ for (node = OF_child(parent); node > 0; node = OF_peer(node)) { @@ -356,28 +356,31 @@ gic_v3_ofw_bus_attach(device_t dev) sc->gic_nchildren++; device_set_ivars(child, di); } - } - /* - * If there is a vgic maintanance interrupt add a virtual gic - * child so we can use this in the vmm module for bhyve. - */ - if (OF_hasprop(parent, "interrupts")) { - child = device_add_child(dev, "vgic", DEVICE_UNIT_ANY); - if (child == NULL) { - device_printf(dev, "Could not add vgic child\n"); - } else { - di = malloc(sizeof(*di), M_GIC_V3, M_WAITOK | M_ZERO); - resource_list_init(&di->di_rl); - di->di_gic_dinfo.gic_domain = -1; - di->di_gic_dinfo.is_vgic = 1; - device_set_ivars(child, di); - sc->gic_nchildren++; +vgic: + + /* + * If there is a vgic maintanance interrupt add a virtual gic + * child so we can use this in the vmm module for bhyve. + */ + if (OF_hasprop(parent, "interrupts")) { + child = device_add_child(dev, "vgic", DEVICE_UNIT_ANY); + if (child == NULL) { + device_printf(dev, + "Could not add vgic child\n"); + } else { + di = malloc(sizeof(*di), M_GIC_V3, + M_WAITOK | M_ZERO); + resource_list_init(&di->di_rl); + di->di_gic_dinfo.gic_domain = -1; + di->di_gic_dinfo.is_vgic = 1; + device_set_ivars(child, di); + sc->gic_nchildren++; + } } } bus_attach_children(dev); - return (0); } static struct resource_list *