From nobody Mon Jan 23 12:37:25 2023 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 4P0qPK2rtqz3bSgl; Mon, 23 Jan 2023 12:37:25 +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 4P0qPK1z9hz4QZV; Mon, 23 Jan 2023 12:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674477445; 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=/++KSXKDyEpJd2yX5maFO9a+PXgaangBUx/ffkMQRj4=; b=dbYP/Nx77zmctU3EjYFQHkAn2Kc98JfLR2jh9JV9w6qRceMd4Ftu0kYyFlY23JSUeCBrvs eZuji+xQx8UiRJK977Who2H5+dlwPOcVhtgVuAMoJNzJMJe666qCy39Eal7sPBAzOp6Pt3 JZtrlmE4U9kKsKA6koC7NNk+ZOgxZF3NAKwcnQTxlJR/A0016dJhZyXcRqlBBIUwZ7Dz75 hv/knlzOLEDfnK7dEezwR0lFkVpVp2GENK0WXvmdP3pZOgagLeUkbVpmWAhlts3ICw9Pi2 1HwTWklhiuoA+3GKuzspQGWXUEsq7QYUXkkvnO7vnzxd4mKDB2TsS8dCkJco+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674477445; 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=/++KSXKDyEpJd2yX5maFO9a+PXgaangBUx/ffkMQRj4=; b=s6uN8LHSZ4dcA+3CqUr89aYTa9cCcy+LHUXODSQWYGavqCixntO9EvoEe8XpP8CsCto10l xhJM5e/nfBPksqbHHpxr3n4H8E1ohRnmLBngXmZucnBj9hC6hSBkC8gQfCs5tuX93yuxk7 nD6bvqNi2+D4WFEWH84OQEPvRAhRVbDng0xP+JBEE2IH79i3vI7yf//nK/kCZh3Ms7ucvA XqBjH2vVLhlD/eUIPrBXst9Kl+7MlUxQDQDo2+MF5l1i1T84BCIgfF2d9UXNALabTxYOMQ w/Jg8lR9KF9X7Nzv8yLIeOoyy+PPJXmRY7nXBW4Mzcub69Ryj6d6lA2U8Obqtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674477445; a=rsa-sha256; cv=none; b=TkEPKfG6tkXWkwNBTrFwMK71GxdmF34W2gSbEFVOGJ9KbVvgCzZLNwMl36l+aKI8bTfnLB OaKXn8rnrM+tUWDyt0D3no7c9ikIup4enSMncv6ekfVUHFA9BxqNJdW1PKIfxIoN9/KTPR M2S2rXYZSJ3Nyare1guJcgLlsx0BbPUyyshT0Rtx9fDHiREEHGF/43fo4796scHAQWPspd TMtop/3GSqb2DJbyCqR7Uf1Qy3PuAHKeohiXYk+/lALWYw4+dKhPkPnVuBO+YhdiRp0jXI gsgyyumdhT7CGHhf2X16WFFGG/k1/haVHErSyGNsesUjhGcvs0dHYdiJa69aeA== 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 4P0qPK11p5zVB3; Mon, 23 Jan 2023 12:37:25 +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 30NCbP9m085058; Mon, 23 Jan 2023 12:37:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30NCbPv5085057; Mon, 23 Jan 2023 12:37:25 GMT (envelope-from git) Date: Mon, 23 Jan 2023 12:37:25 GMT Message-Id: <202301231237.30NCbPv5085057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: e5e323b58796 - stable/13 - Move the GICv3 bus_print_child function to the parent 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 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/13 X-Git-Reftype: branch X-Git-Commit: e5e323b587968e6f490f03e3f42a0795205d99b1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e5e323b587968e6f490f03e3f42a0795205d99b1 commit e5e323b587968e6f490f03e3f42a0795205d99b1 Author: Andrew Turner AuthorDate: 2022-09-22 10:50:15 +0000 Commit: Andrew Turner CommitDate: 2023-01-23 12:36:27 +0000 Move the GICv3 bus_print_child function to the parent This should be common for both ACPI and FDT. Move this to the common part of the driver. Sponsored by: The FreeBSD Foundation (cherry picked from commit bdc9ece97b80c3a8b8c9161d95ef908172eb316a) --- sys/arm64/arm64/gic_v3.c | 17 +++++++++++++++++ sys/arm64/arm64/gic_v3_fdt.c | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index 3e7cd30140eb..9a65bdd9d585 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include "gic_v3_reg.h" #include "gic_v3_var.h" +static bus_print_child_t gic_v3_print_child; static bus_get_domain_t gic_v3_get_domain; static bus_read_ivar_t gic_v3_read_ivar; @@ -111,6 +112,7 @@ static device_method_t gic_v3_methods[] = { DEVMETHOD(device_detach, gic_v3_detach), /* Bus interface */ + DEVMETHOD(bus_print_child, gic_v3_print_child), DEVMETHOD(bus_get_domain, gic_v3_get_domain), DEVMETHOD(bus_read_ivar, gic_v3_read_ivar), @@ -401,6 +403,21 @@ gic_v3_detach(device_t dev) return (0); } +static int +gic_v3_print_child(device_t bus, device_t child) +{ + struct resource_list *rl; + int retval = 0; + + rl = BUS_GET_RESOURCE_LIST(bus, child); + KASSERT(rl != NULL, ("%s: No resource list", __func__)); + retval += bus_print_child_header(bus, child); + retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx"); + retval += bus_print_child_footer(bus, child); + + return (retval); +} + static int gic_v3_get_domain(device_t dev, device_t child, int *domain) { diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c index 16539b50fd09..07272c3ebd42 100644 --- a/sys/arm64/arm64/gic_v3_fdt.c +++ b/sys/arm64/arm64/gic_v3_fdt.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); */ static int gic_v3_fdt_probe(device_t); static int gic_v3_fdt_attach(device_t); -static int gic_v3_fdt_print_child(device_t, device_t); static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); @@ -66,7 +65,6 @@ static device_method_t gic_v3_fdt_methods[] = { DEVMETHOD(device_attach, gic_v3_fdt_attach), /* Bus interface */ - DEVMETHOD(bus_print_child, gic_v3_fdt_print_child), DEVMETHOD(bus_alloc_resource, gic_v3_ofw_bus_alloc_res), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_get_resource_list, gic_v3_fdt_get_resource_list), @@ -212,21 +210,6 @@ struct gic_v3_ofw_devinfo { struct resource_list di_rl; }; -static int -gic_v3_fdt_print_child(device_t bus, device_t child) -{ - struct resource_list *rl; - int retval = 0; - - rl = BUS_GET_RESOURCE_LIST(bus, child); - KASSERT(rl != NULL, ("%s: No resource list", __func__)); - retval += bus_print_child_header(bus, child); - retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx"); - retval += bus_print_child_footer(bus, child); - - return (retval); -} - static const struct ofw_bus_devinfo * gic_v3_ofw_get_devinfo(device_t bus __unused, device_t child) {