From nobody Sat Oct 29 17:57:43 2022 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 4N06Zb4DSpz4gRQd; Sat, 29 Oct 2022 17:57:43 +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 4N06Zb3kf9z49S4; Sat, 29 Oct 2022 17:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667066263; 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=oQslJZ5hmq85cDl5Tw165e2tpTjwGVkEcbjtINgN7wQ=; b=Qk/tzFgrBRMyXTzMF1creKlY1E2g/Mx//mYCisTzXea7/29+uXmP04o48m7NHNR95RsLkR qjZoO7Dcpw0Qt0xHJ6extiEACKH0S91w9KCB2N+62IdZHOJvqPV5OBrEQQPxbLDZuFb5bY Bu9Ur8gGQPwr8EnwyS2ZQbqzuXGrO4UpjFVU38HeqWRU7d0D2YZQOSMHfp0lnO+6g1yFjX kSMAfqmh4M0B/KzeUChNCy+dSeyHo0sDL/ZcB0Oe0wZl9TIhpBLbZ40Xcr3jQdpGfrjBlh 5b04AhUGOzvabWcA82AC8MtDdceqOM64IxSsfk14Tw4XHjFT5r2pTWL6NH71DA== 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 4N06Zb2n4dzR7k; Sat, 29 Oct 2022 17:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29THvh0e089590; Sat, 29 Oct 2022 17:57:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29THvh19089589; Sat, 29 Oct 2022 17:57:43 GMT (envelope-from git) Date: Sat, 29 Oct 2022 17:57:43 GMT Message-Id: <202210291757.29THvh19089589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: a2c57c60d9e2 - main - iommu_gas: drop fini cleanup loop 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2c57c60d9e2667744357fdadd79a98ce64d3ad9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667066263; 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=oQslJZ5hmq85cDl5Tw165e2tpTjwGVkEcbjtINgN7wQ=; b=kUkYHgDfdLt+HBjmY5JLYRbrIJatsDCfvn/PGAZJqxoy5XRhCPksYB/mYz7CJT1+jQTQ3u dB/g8x84TqhQCVVtDGDOU8XI8KiqnUZQes8TC6ntyyD+qS7Irux4Oyew1wPTCSe0NhxIEz qgFR1AzMvpxQhp1JiX4utnHiVOo3qDq1lyRVgToltkycLFFWfeC3IZV974VpDiKT4m2sz9 XYN8o7A5M3kiJ3cO9p375/Bh7h1MKxH3DCPtwwdksTX7rKrAjX2SB/hEX6rzbQpqgnU4KC n91wX8Qby3d8wydU/trT1IaBuko4byz+oxNTLrJOnDXHh1BeVfLlCVmdw9rabg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667066263; a=rsa-sha256; cv=none; b=mS/rAvjXP/IfHxbQ0D7yMbIenSgI/bLtFA5xMbecnAZ+MoGjbfD/lkwF+vkghMQFUZMioh btt8dgAFuQXGQbnMEcgO9uZmVIb5zQh/FHJ9E1ednK3t0gefvbNHm+Uerp+J7bRYJBQyLb JVoDXcnkm4KBdBOpHIhWcaHN+y/kthvEx3BAYP/GWT3WLpZQaEh2GPfsO2dzfhrH1Eq8h+ qOl4HI5nRIPoIsV1L9w5h8gTYkxaEsrpkz4neCi69pcGDAWg1yozGOQ6P5C5VOTtlioLuU swrFV/PyKouC3c6+xBocS6lhPmmKiMd6n6y8kdr5xLBFeEn9d5SoGz19Ah5Ciw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c57c60d9e2667744357fdadd79a98ce64d3ad9 commit a2c57c60d9e2667744357fdadd79a98ce64d3ad9 Author: Doug Moore AuthorDate: 2022-10-29 17:56:06 +0000 Commit: Doug Moore CommitDate: 2022-10-29 17:56:06 +0000 iommu_gas: drop fini cleanup loop Assertions suggest that the loop in iommu_gas_fini_domain is executed zero times, so remove it. Reviewed by: alc, kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D37204 --- sys/dev/iommu/iommu_gas.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index ffb5370b507e..5654bc7ed8de 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -274,7 +274,7 @@ iommu_gas_init_domain(struct iommu_domain *domain) void iommu_gas_fini_domain(struct iommu_domain *domain) { - struct iommu_map_entry *entry, *entry1; + struct iommu_map_entry *entry; IOMMU_DOMAIN_ASSERT_LOCKED(domain); KASSERT(domain->entries_cnt == 2, @@ -297,14 +297,6 @@ iommu_gas_fini_domain(struct iommu_domain *domain) ("end entry flags %p", domain)); iommu_gas_rb_remove(domain, entry); iommu_gas_free_entry(entry); - - RB_FOREACH_SAFE(entry, iommu_gas_entries_tree, &domain->rb_root, - entry1) { - KASSERT((entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0, - ("non-RMRR entry left %p", domain)); - iommu_gas_rb_remove(domain, entry); - iommu_gas_free_entry(entry); - } } struct iommu_gas_match_args { @@ -409,9 +401,9 @@ iommu_gas_next(struct iommu_map_entry *curr, iommu_gaddr_t min_free) /* * Address-ordered first-fit search of 'domain' for free space satisfying the * conditions of 'a'. The space allocated is at least one page big, and is - * bounded by guard pages to left and right. The allocated space for 'domain' - * is described by an rb-tree of map entries at domain->rb_root, and - * domain->start_gap points a map entry less than or adjacent to the first + * bounded by guard pages to the left and right. The allocated space for + * 'domain' is described by an rb-tree of map entries at domain->rb_root, and + * domain->start_gap points to a map entry less than or adjacent to the first * free-space of size at least 3 pages. */ static int