From nobody Tue Jan 25 01:40:19 2022 X-Original-To: dev-commits-src-branches@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 5E4CB1973062; Tue, 25 Jan 2022 01:40:20 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjV0h1W01z4ZlR; Tue, 25 Jan 2022 01:40:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074820; 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=9uStZnWwUNni8V14fCW6meOxnjNL8zEpYdooxjas9BM=; b=cqOowPC3uq2oEbbO8OsYfk/BSByBxE+OsYaqKHTvNsDIKGasO5ok2emTggRqHWb3AC7vlF WBHh1bViUHH2wE+pIFu4/NOqGg1gTCTCjw42LcrETTiPHEMBvjNZjw4fKukjhm1TbFT1YG sDptnlnrim12S/PuQVK6i8sUo49iHNwkR7OzDpi1h1jsxHnMx99rK2HIRzq9B4j7KHgL3e gVNPvjlDMjo83t8XR/OX+j9l24WL0jU1/4EcdX3bI/MWTEZ6KA59eB8GQhrewC6F7xHWQc bd7tgWkjy01eWeu3hF3r+TChb5VjMoNE2vr9x+GHuXtJMs3L0OEQBs1lflnEpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E1FD20B3D; Tue, 25 Jan 2022 01:40:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20P1eJXG050325; Tue, 25 Jan 2022 01:40:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20P1eJJP050322; Tue, 25 Jan 2022 01:40:19 GMT (envelope-from git) Date: Tue, 25 Jan 2022 01:40:19 GMT Message-Id: <202201250140.20P1eJJP050322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 942bc09fc257 - stable/13 - arm64: Check for intrng-reported errors in gicv3_its List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 942bc09fc2575d432c916316f55edaed7f7b3159 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074820; 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=9uStZnWwUNni8V14fCW6meOxnjNL8zEpYdooxjas9BM=; b=Fwt2MZwKMPVr+VZfbHDqNwf7+iVvpHe/ciPXgtyoq3dI5ZhQQ3VftWBBPVj/HF2MtdNmFI WlQiL/ELLRsBOxg3b6y4vKJyGE5YLCQYDgc4LVf5LUnXJC4A92aKuKO61svInZmcaUZS85 cf6y+UF7lApBO6aeIzb9Nso6vjmmtjI8di3rHHfsDGgeWAsEBYWKWMrno3qw4wAxc+pv0j ADfDcvxiHg+aIxVUVlnGDEnQ5XBF41UZM2s0+4usGd1cPj6DJqqEb09uKspJuEwK1Z0Zzn IAKygJw1GlDobuBlvGwvb/BsSxkuee94VB5AqDdbfs2iBm3k5V9C2mQXGa0y1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643074820; a=rsa-sha256; cv=none; b=PnO0rdfys0zyxJiVn90RpWl9MnmsIVxW5/Sc0SahDSwsAKagPaHYTpH+T6sXlH4WwQManC 9R4DwX1BDj+HTmXehKQYjsDqhu/g5LTuBClDnRmuGcUkVyEuZD9J6V7z8UOXT7pck0sb4P F/WpSvH32+1HgRoZvYk9WikE3Bz+aN3zR/wkH5HntG2zn6iD7bsB+o4q5lG8FNOW4ywlwT ACwVndZcOld2QrdFdExc6fd+e/qCoASgPSCqZHvs+5gyGohZtVanREa6Xt2SwYQytxWxk5 nlWi3PiUhQz5Pa2TzH/UbaT8zsN9KUGTaShUJZxgt86KH5JAtc5/dAP/OjEwhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=942bc09fc2575d432c916316f55edaed7f7b3159 commit 942bc09fc2575d432c916316f55edaed7f7b3159 Author: Jessica Clarke AuthorDate: 2022-01-03 17:09:42 +0000 Commit: Jessica Clarke CommitDate: 2022-01-24 23:59:58 +0000 arm64: Check for intrng-reported errors in gicv3_its Currently, any errors when adding a PIC child handler are ignored, instead just continuing on to registering that PIC as an MSI, and ignoring any errors that occur for that too. Reviewed by: andrew MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33342 (cherry picked from commit 3582b9e372c2556adc0fcc42466ead8b2bda7850) --- sys/arm64/arm64/gicv3_its.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 84b1a574f02f..9e24d37e3a63 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1942,11 +1942,19 @@ gicv3_its_fdt_attach(device_t dev) /* Register this device as a interrupt controller */ xref = OF_xref_from_node(ofw_bus_get_node(dev)); sc->sc_pic = intr_pic_register(dev, xref); - intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, + err = intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, gicv3_its_intr, sc, sc->sc_irq_base, sc->sc_irq_length); + if (err != 0) { + device_printf(dev, "Failed to add PIC handler: %d\n", err); + return (err); + } /* Register this device to handle MSI interrupts */ - intr_msi_register(dev, xref); + err = intr_msi_register(dev, xref); + if (err != 0) { + device_printf(dev, "Failed to register for MSIs: %d\n", err); + return (err); + } return (0); } @@ -2003,11 +2011,19 @@ gicv3_its_acpi_attach(device_t dev) di = device_get_ivars(dev); sc->sc_pic = intr_pic_register(dev, di->msi_xref); - intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, + err = intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, gicv3_its_intr, sc, sc->sc_irq_base, sc->sc_irq_length); + if (err != 0) { + device_printf(dev, "Failed to add PIC handler: %d\n", err); + return (err); + } /* Register this device to handle MSI interrupts */ - intr_msi_register(dev, di->msi_xref); + err = intr_msi_register(dev, di->msi_xref); + if (err != 0) { + device_printf(dev, "Failed to register for MSIs: %d\n", err); + return (err); + } return (0); }