From nobody Thu Feb 27 14:17:18 2025 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 4Z3YM24hcFz5qG9t; Thu, 27 Feb 2025 14:17:18 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z3YM24Ht2z3xBP; Thu, 27 Feb 2025 14:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740665838; 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=YzL2x8rGvCCpI1PTazPvqS5qt/qs2GDw1050wu1xiQA=; b=iWzGjwbMsfSUck4uy9bPUH3CmVKijlUY0t+Sg2dvE+IMsbIqRs7GHchQPFPczX2wPPsqsn HgG/wUEa2mT+utd892F8tHfFy7KG315dDAoQW77AnXujuyPBFLMH+GVBri1257Ja98mZ09 nAmstG2DkvKwsXbSqYuQyWqCp+ZAOsbif5I+UX34XYHRUpAbNeFx8WtdcJeBSIAGTY+lPl Ss43db3S2Q3XhiOlNo0yG/cSqTFYkPTsAY4u+LVXrDwzukgZw+B7vn08G9iGF7Pj8yc35y Mfz1csdMJwFDWuWZCkpjuVBA2sRw3sOkN2TiTJTY7lO/uYRpP4LWxN2eWFQxOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740665838; a=rsa-sha256; cv=none; b=O9nDI45dFa06GUPD5+6SfwAo92k3lOZPGRict6yYk4+hORM4rVg9aaExQ9eoTM37pretPp TuRCzxQUIVKW3OvgbEZU7BiKxYz55iqAYEiG7rSRcndGYEEjuPmZp6ApgIqNooWuLioizj onKlMxsWcVOqrJjc647oS90dRV9SaiL3eeJKmbBxJvNPjb1C2xNk1iFQk6VfB/5qNj2d4/ Puj82+dCY1MXIWIpnxDpcJYQwcXNo/wRTMbs37HoD3wewXwkUiuUbDZy8aYeGXvpabk+/r yYNVeOTeSRoPA10l1omrAr8fW/EfO9m/rSVptCDJ5FIYLVRvFzwthMsk8w3/EQ== 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=1740665838; 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=YzL2x8rGvCCpI1PTazPvqS5qt/qs2GDw1050wu1xiQA=; b=bhr+TEQJM1rFGqWzGvlXlagqhfhdDeYAWs0WGUwNq8xRuR2w6f0F5yht1xArEzjYl3uoNk t9h7/wvMnHSYuvudl65zNDJyW5gG899vfHdO8pWp0kq2RVitCvO7TMUpFYY2mLghhf8SmN uugxAuHLyyeIeytbc6TdPbRbKYilwZSQAERP8Exicp6+KzV/pkgKN1Ld3LPnqg/a4BhnD6 wPr9W+f7rPAFREn/3djP89YtmwiR3UmWPEJx0p33CR779jaL336tb5ejLR8p/Nhj6eYPRo A5X2JKSEZFPVx5OqlQ/FfA8NpjNKutaENNrD3mRIBV2Vk/o3wAaQzn4gZYXjSQ== 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 4Z3YM23sPNzmdy; Thu, 27 Feb 2025 14:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51REHIuM017119; Thu, 27 Feb 2025 14:17:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51REHI9s017115; Thu, 27 Feb 2025 14:17:18 GMT (envelope-from git) Date: Thu, 27 Feb 2025 14:17:18 GMT Message-Id: <202502271417.51REHI9s017115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a69089343057 - stable/14 - sys: Set the type of allocated bus resources 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a69089343057c837c9fd6f7ae6e67a73c2f91983 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a69089343057c837c9fd6f7ae6e67a73c2f91983 commit a69089343057c837c9fd6f7ae6e67a73c2f91983 Author: John Baldwin AuthorDate: 2024-03-13 22:05:53 +0000 Commit: John Baldwin CommitDate: 2025-02-27 13:09:23 +0000 sys: Set the type of allocated bus resources Use rman_set_type to set the type of allocated resources everywhere rman_set_rid is currently called. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44123 (cherry picked from commit 1b9bcffff39a817b77401d1b975f374781adfaf8) --- sys/dev/bhnd/bhndb/bhndb.c | 1 + sys/dev/dpaa/fman.c | 1 + sys/dev/pci/pci_iov.c | 1 + sys/dev/pci/pci_pci.c | 2 ++ sys/dev/pci/pci_subr.c | 1 + sys/kern/subr_bus.c | 1 + 6 files changed, 7 insertions(+) diff --git a/sys/dev/bhnd/bhndb/bhndb.c b/sys/dev/bhnd/bhndb/bhndb.c index 4e631f85b3b6..978ad9c3e62b 100644 --- a/sys/dev/bhnd/bhndb/bhndb.c +++ b/sys/dev/bhnd/bhndb/bhndb.c @@ -1005,6 +1005,7 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, return (NULL); rman_set_rid(rv, *rid); + rman_set_type(rv, type); /* Activate */ if (flags & RF_ACTIVE) { diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index 7b82a0fbc1fd..f14ca45e1fc1 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -192,6 +192,7 @@ fman_alloc_resource(device_t bus, device_t child, int type, int *rid, if (res == NULL) return (NULL); rman_set_rid(res, *rid); + rman_set_type(res, type); if ((flags & RF_ACTIVE) != 0 && bus_activate_resource( child, type, *rid, res) != 0) { rman_release_resource(res); diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c index 60325e8cd491..ee1387966b00 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -1050,6 +1050,7 @@ pci_vf_alloc_mem_resource(device_t dev, device_t child, int *rid, } rman_set_rid(res, *rid); + rman_set_type(res, SYS_RES_MEMORY); if (flags & RF_ACTIVE) { error = bus_activate_resource(child, SYS_RES_MEMORY, *rid, res); diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index cda1597ac76e..68eab2a6633b 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -727,6 +727,7 @@ pcib_suballoc_bus(struct pcib_secbus *bus, device_t child, int *rid, rman_get_start(res), rman_get_end(res), *rid, pcib_child_name(child)); rman_set_rid(res, *rid); + rman_set_type(res, PCI_RES_BUS); return (res); } @@ -1930,6 +1931,7 @@ pcib_suballoc_resource(struct pcib_softc *sc, struct pcib_window *w, w->name, rman_get_start(res), rman_get_end(res), *rid, pcib_child_name(child)); rman_set_rid(res, *rid); + rman_set_type(res, type); if (flags & RF_ACTIVE) { if (bus_activate_resource(child, type, *rid, res) != 0) { diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index d0f6c9500b17..e2583a75e303 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -344,6 +344,7 @@ pci_domain_alloc_bus(int domain, device_t dev, int *rid, rman_res_t start, return (NULL); rman_set_rid(res, *rid); + rman_set_type(res, PCI_RES_BUS); return (res); } diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index bd54977cc6f1..ffad54c34925 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4305,6 +4305,7 @@ bus_generic_rman_alloc_resource(device_t dev, device_t child, int type, if (r == NULL) return (NULL); rman_set_rid(r, *rid); + rman_set_type(r, type); if (flags & RF_ACTIVE) { if (bus_activate_resource(child, type, *rid, r) != 0) {