iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: "Kefeng Wang" <wangkefeng.wang@huawei.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Yury Norov" <yury.norov@gmail.com>,
	"Maíra Canal" <maira.canal@usp.br>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	iommu@lists.linux-foundation.org,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>
Subject: [PATCH 2/4] iommu/vt-d: Drop duplicate check in dma_pte_free_pagetable()
Date: Fri, 17 Dec 2021 16:38:15 +0800	[thread overview]
Message-ID: <20211217083817.1745419-3-baolu.lu@linux.intel.com> (raw)
In-Reply-To: <20211217083817.1745419-1-baolu.lu@linux.intel.com>

From: Kefeng Wang <wangkefeng.wang@huawei.com>

The BUG_ON check exists in dma_pte_clear_range(), kill the duplicate
check.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/20211025032307.182974-1-wangkefeng.wang@huawei.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/iommu.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 4acc97765209..e59895af952c 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1280,10 +1280,6 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
 				   unsigned long last_pfn,
 				   int retain_level)
 {
-	BUG_ON(!domain_pfn_supported(domain, start_pfn));
-	BUG_ON(!domain_pfn_supported(domain, last_pfn));
-	BUG_ON(start_pfn > last_pfn);
-
 	dma_pte_clear_range(domain, start_pfn, last_pfn);
 
 	/* We don't need lock here; nobody else touches the iova range */
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2021-12-17  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  8:38 [PATCH 0/4] [PULL REQUEST] Intel IOMMU Updates for Linux v5.17 Lu Baolu
2021-12-17  8:38 ` [PATCH 1/4] iommu/vt-d: Use bitmap_zalloc() when applicable Lu Baolu
2021-12-17  8:38 ` Lu Baolu [this message]
2021-12-17  8:38 ` [PATCH 3/4] iommu/vt-d: Remove unused dma_to_mm_pfn function Lu Baolu
2021-12-17  8:38 ` [PATCH 4/4] iommu/vt-d: Use correctly sized arguments for bit field Lu Baolu
2021-12-17  8:41 ` [PATCH 0/4] [PULL REQUEST] Intel IOMMU Updates for Linux v5.17 Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211217083817.1745419-3-baolu.lu@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=keescook@chromium.org \
    --cc=maira.canal@usp.br \
    --cc=ndesaulniers@google.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).