From nobody Mon Apr 08 20:25:56 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 4VD0wP2XKKz5HhqR; Mon, 8 Apr 2024 20:25:57 +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 4VD0wN3n3Zz3y9y; Mon, 8 Apr 2024 20:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712607956; 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=QfjCH4ur9cXewCJVTik+kwbtfINuFQM6pbYMnqAN9H8=; b=kgP/TBprRYKYm/iFWJXNmtisAC3gZ7fZ08PhF2I6ZfrMphBvip7HXDRaA+PIoPNyXAVj65 yqD8DkRBaG7R/vtsFvVGBNuRPVG8IrqrYE3Vg+3cg9X3323C1cwEt9JUvOEDNrqSfQ9iIl OCmqj2m/ssh4ycf5wngM8D7GHoI5Yy9GTEnVqDbRIfe3fimzO96SeoLa05Iy34U2Nu1lGg uGYSkFLVV5kRfGiaEmmV/8H40x1rnk6rvAfTuOOk2h6K7iiwMZ0fwjOOBB2AWzd1bhGzQP 2dXL6VyLiDfy5vTcMBlhCDynfSVVkhCX1OW640hNOEGbTH9mrhmsjthazCtR1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712607956; a=rsa-sha256; cv=none; b=S1A7PBjQ10atRvjh+5QMfgU8TAfn+M032r48a9uSrvBWTlQ3Hp/PEh8SwZ7u1auA3Nz+LM dcRGsjU/0TIRTbaRp9N45qPM85a0bg4NNVF37f/BOlC/+fTESUXIw8wxIg8NyWO8CvZNg6 mowgUF+a1rUrXZAhnEUWD3xmDdPlliOQ7jGwYbMgkrMtDhgRLfnZTy8nAZqu4G40mCiqQU wE2kazvRWAC/FMYX7JChy43K6NAu+Pqp1LkuxXDBHvsD5o+0T0jhnhaW4LQeHUQbey/CIc xJpnt/U5tuxOzW/idB1UHNjs53uoaZZr7dH7sxZpabKKnG+AQxXb0HIWpMqeDw== 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=1712607956; 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=QfjCH4ur9cXewCJVTik+kwbtfINuFQM6pbYMnqAN9H8=; b=k7fe8vyIRbaFUWOnxzHxZ5HHN6H6utni+//c17/WG3jOfv3stpgKZvVFXCVtUfSu/ysBoO 3e/IOm5z57A4Ngt/meS6CZEcD+YFZlCPpGoMO8lmrCd4X7sGWZPMx5K7fCEGc+/qnDltYQ gFFsp/95UQnJH7aPDrNYHew9soKg1I6hHwRtwF0TdU6cR2KQYelXvihCHRB9rRppS4kGj+ xsCho/rTFOnImFUooZj7pJZVpaBjHbLRx7FRi3vwQfUHG88Tpmrp7GT0WoISFiwO7MLCNj vZUeSayIAdBbE38dvI7X/nHs9PMdHo3rb1TarohL/bZcyhBUILoMsX9zgU+VVQ== 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 4VD0wN36qWzQcW; Mon, 8 Apr 2024 20:25:56 +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 438KPuGd040153; Mon, 8 Apr 2024 20:25:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 438KPuH6040150; Mon, 8 Apr 2024 20:25:56 GMT (envelope-from git) Date: Mon, 8 Apr 2024 20:25:56 GMT Message-Id: <202404082025.438KPuH6040150@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: 992262511493 - stable/13 - vmd: Use bus_read/write_* instead of bus_space_read/write_* 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 992262511493351139053a94da58099e746228b1 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=992262511493351139053a94da58099e746228b1 commit 992262511493351139053a94da58099e746228b1 Author: John Baldwin AuthorDate: 2024-02-15 20:26:19 +0000 Commit: John Baldwin CommitDate: 2024-04-08 17:57:29 +0000 vmd: Use bus_read/write_* instead of bus_space_read/write_* Using an explicit bus space tag and handle is deprecated. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D43885 (cherry picked from commit 76c678688634e9e2ea5f6369fb979aabddbfe426) --- sys/dev/vmd/vmd.c | 21 ++++++--------------- sys/dev/vmd/vmd.h | 2 -- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/sys/dev/vmd/vmd.c b/sys/dev/vmd/vmd.c index e07f1de4983b..d72ae6152760 100644 --- a/sys/dev/vmd/vmd.c +++ b/sys/dev/vmd/vmd.c @@ -185,14 +185,11 @@ vmd_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width) switch (width) { case 4: - return (bus_space_read_4(sc->vmd_btag, sc->vmd_bhandle, - offset)); + return (bus_read_4(sc->vmd_regs_res[0], offset)); case 2: - return (bus_space_read_2(sc->vmd_btag, sc->vmd_bhandle, - offset)); + return (bus_read_2(sc->vmd_regs_res[0], offset)); case 1: - return (bus_space_read_1(sc->vmd_btag, sc->vmd_bhandle, - offset)); + return (bus_read_1(sc->vmd_regs_res[0], offset)); default: __assert_unreachable(); return (0xffffffff); @@ -214,14 +211,11 @@ vmd_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, switch (width) { case 4: - return (bus_space_write_4(sc->vmd_btag, sc->vmd_bhandle, - offset, val)); + return (bus_write_4(sc->vmd_regs_res[0], offset, val)); case 2: - return (bus_space_write_2(sc->vmd_btag, sc->vmd_bhandle, - offset, val)); + return (bus_write_2(sc->vmd_regs_res[0], offset, val)); case 1: - return (bus_space_write_1(sc->vmd_btag, sc->vmd_bhandle, - offset, val)); + return (bus_write_1(sc->vmd_regs_res[0], offset, val)); default: __assert_unreachable(); } @@ -283,9 +277,6 @@ vmd_attach(device_t dev) } } - sc->vmd_btag = rman_get_bustag(sc->vmd_regs_res[0]); - sc->vmd_bhandle = rman_get_bushandle(sc->vmd_regs_res[0]); - vid = pci_get_vendor(dev); did = pci_get_device(dev); for (t = vmd_devs; t->vmd_name != NULL; t++) { diff --git a/sys/dev/vmd/vmd.h b/sys/dev/vmd/vmd.h index a8156ba88a17..2ab943c07a6d 100644 --- a/sys/dev/vmd/vmd.h +++ b/sys/dev/vmd/vmd.h @@ -53,8 +53,6 @@ struct vmd_softc { #define VMD_MAX_BAR 3 int vmd_regs_rid[VMD_MAX_BAR]; struct resource *vmd_regs_res[VMD_MAX_BAR]; - bus_space_handle_t vmd_bhandle; - bus_space_tag_t vmd_btag; struct vmd_irq *vmd_irq; LIST_HEAD(,vmd_irq_user) vmd_users; int vmd_fist_vector;