From nobody Wed Mar 13 22:13:34 2024 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 4Tw4XZ36r4z5DX2n; Wed, 13 Mar 2024 22:13:34 +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 4Tw4XZ2Tvnz4qG5; Wed, 13 Mar 2024 22:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710368014; 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=qfeHyIcRayAZ0pVIdHFj7H5PIluA1GtTobxuIDfAWOM=; b=B1ihrBd/2Lwj/xZr46HzobjP+6obtjOdSRFpmbx9LB9TD/nh3HJa3SKB52FPBknS5N9TQr 6B3xpxx0fIFcNQl+slETqI9h3mr1QQPPKu/GBIcfqZ7JQQGus++LFUixS7ZXdf/bsiOB1s vWKQ+qI0A9kVUJJhJQcRSERN41nzLXeYOtfm4iMW7uWG6x88a+v/NWJpyEPE2lyCASkXyn IAGbuCGYBe80YdAHlE+h8KjagHbND3ooZ7ihZVogJVWOwbDLbdyI0QbRdRQ4h2FUrYWRtU kBOF/D/mJ2Ce0nM8WT/z5HF08iaJYKYVa5C7EXus/WaVB3Uhn3tTItiuD/qm6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710368014; a=rsa-sha256; cv=none; b=faO+b/kbhGaJRMfQ9FKlLbqhm7TltAdh927SkhxBDFBu6rpElCEn8gj3RWTMSDU9OVwA2c 89qK8c7dOTKJMnSmwirkrvJKib5Fot87PVNhJV0BL0yNtbX0c3ujQL26B2TCmJNy9YohU8 8e4jz6aGZlzsagyJnk0g6uor14GEhNwDB8NavsWtJcJvfsWHRt+J+g9PnSiBynLofBG9v4 Er+h/wIs6wdv3P8NEhDbnqppv/T8tPL5J5OJ6Qzb0QPxsnHjzKpoRZq4XE1BEBaiKTZa20 ZR1U2xK1vjpW7ScLb1pU1oJlzFNS9pwtu+tft4HfOLdPSOda0IGzb+WUElcpVA== 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=1710368014; 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=qfeHyIcRayAZ0pVIdHFj7H5PIluA1GtTobxuIDfAWOM=; b=H0JgyM2R9e6gXRi08V26DtdcTl1dPu3Zr2uR6nh5P9aSA53k3/Df5iK1VQAFGxiT/AXAGN Ik8uo+wL3NDBR5niFx8akKtGEh6sbB1mkFRGILsE+YsSAEb9F1iP4LFnMpxF4yy5tDzSQ1 aD1GU/riYcEkrPjeSDPjNaSs0L65h2s4sMhah7gokJJt9oufdpz4CefDCcDKm/dJ9E4TG6 wFpxngCiIIuNmQHw1JHQcvJOJ3l8J1AFGYBlNx33wge9Q0RfUoGnIZbjW/Ue9tdEkMhbd/ jM8qeZGJd3caXz9az8vTDgnZv2weYao0pMtrMZLa01CQxBvdyVq2JI0RC1anhw== 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 4Tw4XZ25hsz11l4; Wed, 13 Mar 2024 22:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42DMDYCd074795; Wed, 13 Mar 2024 22:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42DMDYGt074792; Wed, 13 Mar 2024 22:13:34 GMT (envelope-from git) Date: Wed, 13 Mar 2024 22:13:34 GMT Message-Id: <202403132213.42DMDYGt074792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1b9bcffff39a - main - 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: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b9bcffff39a817b77401d1b975f374781adfaf8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1b9bcffff39a817b77401d1b975f374781adfaf8 commit 1b9bcffff39a817b77401d1b975f374781adfaf8 Author: John Baldwin AuthorDate: 2024-03-13 22:05:53 +0000 Commit: John Baldwin CommitDate: 2024-03-13 22:05:53 +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 --- 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 6f3e85636e95..7c8122a03ce7 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -191,6 +191,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 ff3ac0e64271..d52e534b9ab5 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -1049,6 +1049,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 a485e6dd2641..ecd5ad44959d 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4250,6 +4250,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) {