From nobody Fri Sep 23 14:47:10 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 4MYw3L54bgz4d9SK; Fri, 23 Sep 2022 14:47:10 +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 4MYw3L4WMFz4Cgf; Fri, 23 Sep 2022 14:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663944430; 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=5UwDoylrvjLKREGaNInTyPVpbm6qqnCRLWWx5tjY14U=; b=IIGb8TbVUhk/9OoMhxYl3oka8TuGXSCJa9/Y627c9tXyup3ZvWTScu4XOacqX3fTMiDOn2 lPSAwr+rlC+xEBwn/jkqNrcSqvG+lo03tVPUeiWThnFqOQcl9LIxsxBBP8H5LAcGC8BLEx THpVMYLKIGIM39lpv5PUEfQKew9QbjC0Pdr/D8Y0/6W+jAabfbPPZ1CHuFY1YYGD1XjnKs BNdxwHBM3uflMBdnSmtnw6aid9i0iYV+rG0iB7o3Q9ord7o85UGO4Xxuwq6No5fDPmRTqC gh2F7psh+gvhqvwq6yxrvNsLgdLt7skMhESFTm7wpfZQUqaSpYeKqWFJgX1K8w== 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 4MYw3L3bC8zmdZ; Fri, 23 Sep 2022 14:47:10 +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 28NElAv3022441; Fri, 23 Sep 2022 14:47:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28NElAIr022440; Fri, 23 Sep 2022 14:47:10 GMT (envelope-from git) Date: Fri, 23 Sep 2022 14:47:10 GMT Message-Id: <202209231447.28NElAIr022440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: bdc9ece97b80 - main - 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/main X-Git-Reftype: branch X-Git-Commit: bdc9ece97b80c3a8b8c9161d95ef908172eb316a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663944430; 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=5UwDoylrvjLKREGaNInTyPVpbm6qqnCRLWWx5tjY14U=; b=ewuqt6xjljPAoNQxXiokVHnmub8DgcG9FQKCxpSHOFheogAGXaPaShWE9sLmmvm7nJ8llN xgu++9LxQNdQD7AjvQmalq0uysMX95GSfIKHq2pYqJzX3+KCR/d3o66CZ+I0T2ElAtGZrY iDXZA2H7kfmrtL9DyAyL7iCGhKDswoO6NlmPkBgiuS2R7jmOfg/KFh1hUt0GIKGOOpz7lq xTN6+yOvnp1g0KKCgPSm56assxorwq4cIMyJJmp85QOdELoiXBcsKLAo5CKZhRD66sd0TH W2A6jvT8wYuwxO1CLsnhcwcABjUMgkA2rQLxrYvBR+gJtBQKlAQFO9lhJdK0zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663944430; a=rsa-sha256; cv=none; b=ux2zGbztCjNGVT/TifiB3iQZ8s0IzkGkkrYv1/hvEv8/w6RlIZRXU8XwsFGW7viY/kA3xN 8GYF8kOI8zd5usS2wrOJPPEEI56mtEp0Fc/oDnTh3Cv+Ltth2LkwVf5PEKXDPbHiBQcdzm 01VDxKo02upXwarIGAH5XzvheZe/AuTkkpcjkiYyp8LhbSVLhewRl4OwsvE2ggpXeTD7Pe hCV62IIHny15wNHH/9crMFutPyXWKm2TKdIalhVBzT/OJjTeOy8Ue+EOPA8fJKeF0udpZO YYx9zK6zu8wINpXVKnu29kxRCK8pmYMIQhrzgOxqebuM8SqYB30PYMUZeVXPSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=bdc9ece97b80c3a8b8c9161d95ef908172eb316a commit bdc9ece97b80c3a8b8c9161d95ef908172eb316a Author: Andrew Turner AuthorDate: 2022-09-22 10:50:15 +0000 Commit: Andrew Turner CommitDate: 2022-09-23 14:28:45 +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 --- 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 b4678d95fee5..759d50f0941e 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -77,6 +77,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; static bus_write_ivar_t gic_v3_write_ivar; @@ -119,6 +120,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), DEVMETHOD(bus_write_ivar, gic_v3_write_ivar), @@ -439,6 +441,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 b0b532a56dec..dc1445340943 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), @@ -210,21 +208,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) {