From nobody Sat Jul 16 23:07:35 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 4LlkQc1DHxz4WZ2y; Sat, 16 Jul 2022 23:07:36 +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 4LlkQc0cLPz3RWq; Sat, 16 Jul 2022 23:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658012856; 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=s3P1yfO+Swf0dtbHGDLbVh2zSxGk5h+TiumgdOR69WM=; b=srZIsp/ZdPHaqgff7LiLSENN+7BW4Tg8hy4bI+D3+AlOWRKQPD8xrc6qsu53iTMLUXoAEt dA6eDCBs1csZg6K79UW5wYBRBWBFomfyDYSSGmuQo0C0j63W54DslDBpjmHQB8MEl1v1Vn 3F5XkucNfKcgxMRXXZ6/Ye8F4CTSzTOHRGuKtJizdNBe7C/PYDk0jYlxqIk1VlNlezgNew 5yM/QVWtiCG+ccnOZoqn0vLIcKJoOCpSG32YdTlTWXmj0e4/Aw83ea5REqCtl/4UKjfcHL /tYVFLlJzuZZ6pfbWRAS9ryW4VEZL3ujoSb0HmTORAvbtaFW6vqgEHtNP71jqg== 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 4LlkQb6XgPzf84; Sat, 16 Jul 2022 23:07:35 +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 26GN7ZPN015171; Sat, 16 Jul 2022 23:07:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26GN7ZcB015170; Sat, 16 Jul 2022 23:07:35 GMT (envelope-from git) Date: Sat, 16 Jul 2022 23:07:35 GMT Message-Id: <202207162307.26GN7ZcB015170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: da55f86c6146 - main - x86/iommu: Eliminate redundant wrappers 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: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da55f86c61462b119fd1306d12411989d6610650 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658012856; 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=s3P1yfO+Swf0dtbHGDLbVh2zSxGk5h+TiumgdOR69WM=; b=SzEIhMuAF18bsthXQ+QhxKk2eWOZDuhMwvr58I71muiig9A7ohn1OxukwRV7Yf//zoq6I8 AP8HQZOprBdYTvyhhvQhshnRTe3oA7UbtkSMqu4mWj+VJGoKuM/CQPE+DAsq5A8tCalq+k MT6VCm67l5pPfk6eH6VydMFKGaY2I87XLUom1fl0q9aLgZIzqkqAIi5HaQIgJ/+CsHJZlT z34dGfCjS/K/VFstzGA7uoSvTwnJpW8ffZ4JplLrVGPf+3VZdgPGab8ovsowbuWZMATCWT cjNtE24Hj8/vuqpeO0mp6xkgoiR7rFIf67OhwgowIT+gEStmE85ryBBHdugtiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658012856; a=rsa-sha256; cv=none; b=oAH9Jnpg0s43rkrms0enXqKxXeaINE5VtpIM+9m8jNRV+aCqOWKqURXpE7VxZqz6H3+BC+ tsNiS4ydm3OFxRiCdI3gYzmDLulMtvF/imHwx5ypN7XaAVwg3QG1xtTDeGfzBjiMZXiO8l fkLgMKDms/iCWaL0qpCgSLKgM+YRUXbf2g/8h1NottJcx4c0w8qh1isPG7kNaVADPbFp6B Hk7e0+dADLPQxGa+grARG01MKhwsjk/Ny0P0cs5DbgNM2qtN2y1coGn87s3WtxKZICTFfY maVDYHSprSMGeHfcbCeJB29+iJQt76Svvba9d5k7BcUwQEfBFTpvIzpIAspZyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=da55f86c61462b119fd1306d12411989d6610650 commit da55f86c61462b119fd1306d12411989d6610650 Author: Alan Cox AuthorDate: 2022-07-16 04:25:11 +0000 Commit: Alan Cox CommitDate: 2022-07-16 23:05:37 +0000 x86/iommu: Eliminate redundant wrappers Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35832 --- sys/x86/iommu/intel_ctx.c | 26 ++++---------------------- sys/x86/iommu/intel_dmar.h | 3 --- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 79e2a15d80c7..bfc607674b57 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -868,7 +868,7 @@ dmar_domain_free_entry(struct iommu_map_entry *entry, bool free) } void -dmar_domain_unload_entry(struct iommu_map_entry *entry, bool free) +iommu_domain_unload_entry(struct iommu_map_entry *entry, bool free) { struct dmar_domain *domain; struct dmar_unit *unit; @@ -902,15 +902,15 @@ dmar_domain_unload_emit_wait(struct dmar_domain *domain, } void -dmar_domain_unload(struct dmar_domain *domain, +iommu_domain_unload(struct iommu_domain *iodom, struct iommu_map_entries_tailq *entries, bool cansleep) { + struct dmar_domain *domain; struct dmar_unit *unit; - struct iommu_domain *iodom; struct iommu_map_entry *entry, *entry1; int error __diagused; - iodom = DOM2IODOM(domain); + domain = IODOM2DOM(iodom); unit = DOM2DMAR(domain); TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { @@ -975,21 +975,3 @@ iommu_free_ctx(struct iommu_ctx *context) dmar_free_ctx(ctx); } - -void -iommu_domain_unload_entry(struct iommu_map_entry *entry, bool free) -{ - - dmar_domain_unload_entry(entry, free); -} - -void -iommu_domain_unload(struct iommu_domain *iodom, - struct iommu_map_entries_tailq *entries, bool cansleep) -{ - struct dmar_domain *domain; - - domain = IODOM2DOM(iodom); - - dmar_domain_unload(domain, entries, cansleep); -} diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index b34505a4e5d0..05793ed9f238 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -277,9 +277,6 @@ int dmar_move_ctx_to_domain(struct dmar_domain *domain, struct dmar_ctx *ctx); void dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx); void dmar_free_ctx(struct dmar_ctx *ctx); struct dmar_ctx *dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t rid); -void dmar_domain_unload_entry(struct iommu_map_entry *entry, bool free); -void dmar_domain_unload(struct dmar_domain *domain, - struct iommu_map_entries_tailq *entries, bool cansleep); void dmar_domain_free_entry(struct iommu_map_entry *entry, bool free); void dmar_dev_parse_rmrr(struct dmar_domain *domain, int dev_domain,