From nobody Sat Nov 25 18:39:39 2023 X-Original-To: dev-commits-src-main@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 4Sd0y35GsKz52Wq8; Sat, 25 Nov 2023 18:39:39 +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 4Sd0y34qSwz4BYp; Sat, 25 Nov 2023 18:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700937579; 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=rBMmdfxS4yGBaaigekzaQFjTusetLv/Z5sRIOBbbCNM=; b=gjEEo2GR7cSfp8nD8knshx+c5yO9WuSUqQ6+sZBv0gPswM1qloFpW4FEr129Hezz0HxFri F1zfeEuayfg9132KGtn7Y3aoM6nuiQ2e2cJWsZraKNsZAy4I0uAq5XQhA/Qer6TCRrkaZG Sre/4G0M3Qs/HDIq9nK6fq+nZX8//evshwQ6VfDZbpFkNnX0Rbqgp9I6D1mdB08MGiJoSn WofeY6QMzYi6E8kdXJiYMTkwDQLN5GugHfi7oTYf1LmukTBHmIalfnZwUtn5Gmfc1W0asT EPUWyTnLYq+YBLb6jq++cX/C861iWs0mLdemg6nsuMO4t+8WE7NacTiji7HEAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700937579; 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=rBMmdfxS4yGBaaigekzaQFjTusetLv/Z5sRIOBbbCNM=; b=vx6NAxk/LVH2R9hvFE73sO/M+FgY0dvZSeB5idEydXEr8mP/8GcgQTNPwjM/V8O4FmU0D0 lxsVtDAFa+NXyf6U476y63aPAcWU3PdBpM4yGd8pvQPvApM5uhXgObTpTOhOYC05A2g8x8 aNNXq1sdIfysQZUQTztsKceVU0ttpEJLAqA6meMJVrL0v/Dh/pzd0Ize1iDOODl7ydLnnC VLrhtf6IXWXyeriqxa0Wfg8K7HXJ8xU+qelxCGnUCeheb2WG9ye1H3eltq0ZBtL1FLdTCU fbZ369U4iLP23n9j5rn+vsn0gN91xZFfds7mdv3tP1+aNo7DoMs8WXiuHMXSUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700937579; a=rsa-sha256; cv=none; b=s2anVeg6Th3bQtzuB4GANvT3K1ItTlvfg7/PcjQaCRH03mh8c3AW8Rbg9PPAlwrXD9jhCA dXS8gWEdum3H0y2KNssxckckhU2qrATycj1jinVnka8xzfbuxVSRL0fEGlZE8qTWDD8Y8Z OEw9/n1u46T+FatVOLUZgFoYn1yP6aQ/0qVR17WNBe9fYZZwV8ReKBjLxqoQonlvSneDEO zREt+6XVYiWHC//lisVzhfjBTS2UXqZMc5dEImrzFOmQw3Vs10ToJgKvctwKakGNSGi4DP 4KzvbhNPHFJmNjJQTgGXpfA5wLPWoPweGF5P5pzCyyX9bR1Ewq51/NQQMaXLJg== 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 4Sd0y33jnwz8c5; Sat, 25 Nov 2023 18:39:39 +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 3APIddUS072716; Sat, 25 Nov 2023 18:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3APIddHX072713; Sat, 25 Nov 2023 18:39:39 GMT (envelope-from git) Date: Sat, 25 Nov 2023 18:39:39 GMT Message-Id: <202311251839.3APIddHX072713@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: ed88eef140a1 - main - new-bus: Disable assertions for rman mismatches for activate/deactivate List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: ed88eef140a1c3d57d546f409c216806dd3da809 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ed88eef140a1c3d57d546f409c216806dd3da809 commit ed88eef140a1c3d57d546f409c216806dd3da809 Author: John Baldwin AuthorDate: 2023-11-25 18:32:19 +0000 Commit: John Baldwin CommitDate: 2023-11-25 18:32:19 +0000 new-bus: Disable assertions for rman mismatches for activate/deactivate Bus drivers which use an rman to sub-divide a resource allocated from a parent bus should handle mapping requests (and activate/deactivate requests) for those sub-allocated resources by doing a subset mapping of the resource allocated from the parent (and then using this to handle activate/deactivate requests). However, not all bus drivers which use internal rmans (such as acpi(4) and pci_pci(4)) do that since not all nexus drivers support bus_map/unmap. Eventually bus drivers should be updated to do this properly at which point these assertions can be reenabled. Reported by: delphij, kib --- sys/kern/subr_bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 8da99e158f1c..4f7053cc2613 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4305,12 +4305,12 @@ bus_generic_rman_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { struct resource_map map; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX struct rman *rm; #endif int error; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); KASSERT(rman_is_region_manager(r, rm), ("%s: rman %p doesn't match for resource %p", __func__, rm, r)); @@ -4344,12 +4344,12 @@ bus_generic_rman_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { struct resource_map map; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX struct rman *rm; #endif int error; -#ifdef INVARIANTS +#ifdef INVARIANTS_XXX rm = BUS_GET_RMAN(dev, type, rman_get_flags(r)); KASSERT(rman_is_region_manager(r, rm), ("%s: rman %p doesn't match for resource %p", __func__, rm, r));