From nobody Thu Feb 15 20:28:41 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 4TbRV200vGz5B7jB; Thu, 15 Feb 2024 20:28:42 +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 4TbRV14sThz49bP; Thu, 15 Feb 2024 20:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708028921; 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=OBI2XhYnqDO/iVqX8oPX+hCcX5CjItSyyQAlQcYO0BE=; b=qqQjQm8nlZYviE3C5dXFSVFfSLIbd/ZuWpcxRlyFaJROLd850SXuD/EfdXX5crweLdy0DV Pa541hYTMRGOWaB98a0R2ImlitNYoSyWvFVcRg7HpKJuHhge909iE6eGEGbmL3j38d2yBW J52aQjemYgpSUBSh/pnZBpP+RcNDti19vX4Asc86+h4eVXIwI32mZBwM22Em1iEfGFX0Kh migXWtXftrwMtaMkNCdkjAsrMla9BtOtbh4AsknUZNndalJc6mv5t9nrvt3xdYGCAjEesQ /HqXVSr83Nw0IyJemz43m79J4dcphpHrwnLwurlIR0ciAnrZjdWkePJhAnTr9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708028921; 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=OBI2XhYnqDO/iVqX8oPX+hCcX5CjItSyyQAlQcYO0BE=; b=SEXOp/gdxRbpmNDGn6tMwqqkX2I5x4NxdEovPLnHfQuCRRyZvqod3ntuo7J2FGffDLlkS8 /MPJxuaeMX9xLgW3zRc1A1JX7S5dMmJz6x4y/ophp2QSQ3U414qUSRoDspqFYeOJ3ZufLx brq+B2ipLWBtGyp+lifF1ssa5FJHmUwc3pLdq2Eub/vwb+5HxhPxl3lUKiNJqSymR4pbUr HF1vZM5X4N0NYC4pMC0huRdnV6Vk5RnXWOaZuyufj9rzTLg8lqPrj4OBhdCuZEJMiHpe84 5hfp1s45YUCXRSDa3ld+F8lemzyfrCL7pMkEInZKhlzA0AE0+5YT7pSKq7i/uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708028921; a=rsa-sha256; cv=none; b=UcK+SHL20LGkdL6BoVxMNu5T4JbleYWQHzZe2R7WKEvhQb3h5ZzI+LzlXVEKcBDZp1N1s5 6rAibt5KoXvH/8Vl8tsxdrb2xMZ07nQN8/DKoMuXyQJL234XE5v3z4aAJYNrobNgKp1jwQ klEJ2vNJ7oa/hHuENw7y7/Ot0z/w2wmTgB/86qbUdGiz1SwWRrj9xC7hmiGqFM0fkqzJg1 FonD2EV6oGp2kERpwEMkTG7q/8F28HFOVUN2TKF5Tu8n9JTw+SG94Nax/OUoclbq5jxe2b ZDY/0lG2/Ptp0GrXb6Cgpsm6QLcIt/5ZRlpgax+iu44KkBcCvuPfCcD1d9EUQA== 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 4TbRV13gMszwC9; Thu, 15 Feb 2024 20:28:41 +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 41FKSfYj053234; Thu, 15 Feb 2024 20:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41FKSfDA053231; Thu, 15 Feb 2024 20:28:41 GMT (envelope-from git) Date: Thu, 15 Feb 2024 20:28:41 GMT Message-Id: <202402152028.41FKSfDA053231@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: 76c678688634 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 76c678688634e9e2ea5f6369fb979aabddbfe426 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=76c678688634e9e2ea5f6369fb979aabddbfe426 commit 76c678688634e9e2ea5f6369fb979aabddbfe426 Author: John Baldwin AuthorDate: 2024-02-15 20:26:19 +0000 Commit: John Baldwin CommitDate: 2024-02-15 20:26:19 +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 --- 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 1563d707c6b4..d9afe5746421 100644 --- a/sys/dev/vmd/vmd.c +++ b/sys/dev/vmd/vmd.c @@ -184,14 +184,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); @@ -213,14 +210,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(); } @@ -282,9 +276,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;