From nobody Wed Jan 03 22:02:45 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 4T53cP6xsJz56nbv; Wed, 3 Jan 2024 22:02:45 +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 4T53cP58fqz4YTL; Wed, 3 Jan 2024 22:02:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319365; 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=K8A3NmUgSxRE0zyB3gxHbjbgi1YJPXh6xItytdXVKh0=; b=W8U13EJebEZmJ5i6ksArUBRN20ZKAYIIGxFJbWIPjUvRymdyUTRIhVFnV4lRjuapf/y1tE 4J6Zf8e+xWv7MKru+CW1IzlNEE/pTjserlv63kLKWHbMyherp/6LAGQaqGUqPoVG4j/qwQ 0EearRWrjybfuuhuTtmzS0XGzCU1IMXdkMn8fVvJhStoU1q3j28dBhSISTWNuLThFv/PXM K601yC8jqQdohktX6epyP7QpI3N2CerRh3NuoEk/RCxWkVP8xd40XOoJKOYX2pUUmG7A7W m2HK4W38QDnLI3GHBPeQFlYdFKb9j8ek/mgXwyIw/0D9yG4c8Gi3oF5tGHJ5PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704319365; 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=K8A3NmUgSxRE0zyB3gxHbjbgi1YJPXh6xItytdXVKh0=; b=T1Vvf12NNOZdZqTbP/PLsCAM4FyC0lv4/LnkiOr6T8RQe1JESW4nPCmHrn+9irbRvOtxr1 kWntosdT0Odb8YRI2R6u1IP+rqJCds4/6WmLFS3V0/JgjsI1CwYaaI7x4X3bpvS9VMC09p FH0GSGUDofdhOC78SZpRf1ExE2y3n/Vibm7HdZcdpS02/gQ31AeqlCh7QqpPSRoAh05C+l PUQNnxEZ8UGah5px7+IFiiDnupPRjkEh+rYEG8O+pFkJ9Wd7IQFDs6dXMCd7XKZ6zWUFSd Iqob2Xyjr3TcVIzKqnYq5zMwvTki3tP11VRPhikk6ljyHP6zVityn784aBuSnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704319365; a=rsa-sha256; cv=none; b=QV4hPdZbmBWqQacBf4EV/9FC/xa0SdQoI3F7OnSzIHwuXMtjR9g03LvVx5ng85jxDoIVJf CXU980boNALM0BjEDiq67kC3221NlnhArjQ7KtIH7H58m5iwWmxr2Wy021OGLIaAtahetU pt8w3WitMKDrlUsD8Iy+Y16VWB66+lBgdKliT7xpGuGMSKztP1jxlbNYppl3Cn+vbHWu0O OyjwAKZ+MI6ioU+6dbxzMHSJbGnHrzwSv+BaAWW+czeS/f6bUOJQhBOLTiHVNBlfXBR/bI jKfOEUOqV0zWCpMsDlrLQptA4F2Gy0HNrJw8d9XlH6rikjRg61L2MHG5MQa74g== 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 4T53cP4GQyz12Wc; Wed, 3 Jan 2024 22:02:45 +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 403M2jMM072639; Wed, 3 Jan 2024 22:02:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403M2jIA072636; Wed, 3 Jan 2024 22:02:45 GMT (envelope-from git) Date: Wed, 3 Jan 2024 22:02:45 GMT Message-Id: <202401032202.403M2jIA072636@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: 92991e8f8d31 - stable/14 - new-bus: Disable assertions for rman mismatches for activate/deactivate 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/14 X-Git-Reftype: branch X-Git-Commit: 92991e8f8d319981c7f9b0ad1fc3855b6dfdfe3a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=92991e8f8d319981c7f9b0ad1fc3855b6dfdfe3a commit 92991e8f8d319981c7f9b0ad1fc3855b6dfdfe3a Author: John Baldwin AuthorDate: 2023-11-25 18:32:19 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:47:24 +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 (cherry picked from commit ed88eef140a1c3d57d546f409c216806dd3da809) --- 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 4d21382f2de7..040b3556d156 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));