From nobody Mon Nov 21 08:25:40 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 4NG0nw48rYz4j3KM; Mon, 21 Nov 2022 08:25:40 +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 4NG0nw3hQpz3KlG; Mon, 21 Nov 2022 08:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669019140; 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=SfLc3MAiQHEgFoBSp/x3WTpooh39hoji91eDhW5SRFU=; b=MwlstUBpM6GkCx7Ph8MRatSWl0G5o6xfd9KR0qrasuU0ykd+DkX0gg0ex7zDxUKBBzTQ1N HMG4azANM9PYD9IA/ROtupJPoG2oXsozW4Om+ipeM5Q/RtiQiAOqkTkBa5uK/A0gw9PdCl tbNGV7vExHadREl++12JvV+AwDN6Y0r1hM/3tld+A7jh2H9k5526wxTJtmp5UzbMLuxZH0 KuNJt9C5Oz4APloEubKBzvQK/MjjMdeXnfsMTj01VfQDXZcMj82wMoojlV3B15gbQZ4xFI T3h6uhN3C9ZFagePlA4iTeia9DZ5fN9hK/OtKJ74x5eGYiUC047nQic//zEFXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669019140; 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=SfLc3MAiQHEgFoBSp/x3WTpooh39hoji91eDhW5SRFU=; b=dZ6s0teN+hbkhwFWCYSg2iPANCatOeC14i4DbbwNhNXiqcQnKy9gc0pBHeuBwfpVo53DKe vRWowjfkTS5+foq786Rd6QT5s8Pd6lWWpynLJiVwEKHSAnWyvgHkebcZPXE7PYb2c2m/6p bFwJjSRqut7ncAndeJzE6xxzmGTLab9cFPOrfRYqeuyYTo+9xp88XNxzC9LhaVO+FrsMWm +7OzXNL0tbXm3fT69Cm8ftRclOY5TxjEL1uZnDI1XLc7NsVjdIODHMgeq2BEp1pHqH4TMA veiF4nruR9Cly8cRE1gjJ8U/fWIG3ucg01fN+AF/k0wtrceeuHcs4m2OnEBq9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669019140; a=rsa-sha256; cv=none; b=O97tiv3u/EAHStHCWwNKKZVWvJCWggqGbEdhK23VBD9rjrtuqG0ty6P0YHZyFmTYnj5ACy 8D3TRmbXIjlaVAP4IVEmoDXRe/GqeWQWf6U9w7jLnHyHq7YgZNAMKeRl9Pwu+O91UVLMEV Jzck4NCa8E1TS8q/IVf6Jsc8mqweQi3nrQ8jZl++/e93za0xPVraB71yEMs1KfmG9pcsFU B2+e+CaXExg59eP2X/Wloz3KM6WfqIxvxuWL6e8DqqwwNxzhY9Rk7q2ELX0vJCHBydURA5 C2Eg9l3P+i1jgNfnjWVWkV6fl6f3lYArhdg2s0cgMGqCevU6J7PVN3yZLGiCzQ== 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 4NG0nw2WVFzwk3; Mon, 21 Nov 2022 08:25:40 +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 2AL8Peo7015652; Mon, 21 Nov 2022 08:25:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AL8PenD015651; Mon, 21 Nov 2022 08:25:40 GMT (envelope-from git) Date: Mon, 21 Nov 2022 08:25:40 GMT Message-Id: <202211210825.2AL8PenD015651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Moore Subject: git: 7a5de4db8cf1 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7a5de4db8cf1862673f18b8b3b3d524c3847e51e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7a5de4db8cf1862673f18b8b3b3d524c3847e51e commit 7a5de4db8cf1862673f18b8b3b3d524c3847e51e Author: Doug Moore AuthorDate: 2022-10-29 17:56:06 +0000 Commit: Doug Moore CommitDate: 2022-11-21 08:25:12 +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 (cherry picked from commit a2c57c60d9e2667744357fdadd79a98ce64d3ad9) --- 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