mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joel Granados <joel.granados@kernel.org>
To: David Woodhouse <dwmw2@infradead.org>,
	 Lu Baolu <baolu.lu@linux.intel.com>,
	Joerg Roedel <joro@8bytes.org>,  Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	 Jason Gunthorpe <jgg@ziepe.ca>,
	Kevin Tian <kevin.tian@intel.com>,
	 Klaus Jensen <its@irrelevant.dk>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	 Joel Granados <joel.granados@kernel.org>,
	 Klaus Jensen <k.jensen@samsung.com>,
	 Joel Granados <joel.granados@kernel.org>
Subject: [PATCH v3 5/5] iommu/vt-d: drop pasid requirement for prq initialization
Date: Wed, 09 Oct 2024 09:28:13 +0200	[thread overview]
Message-ID: <20241009-jag-iopfv8-v3-5-bd4271df5b2b@kernel.org> (raw)
In-Reply-To: <20241009-jag-iopfv8-v3-0-bd4271df5b2b@kernel.org>

From: Klaus Jensen <k.jensen@samsung.com>

PASID support within the IOMMU is not required to enable the Page
Request Queue, only the PRS capability.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
 drivers/iommu/intel/iommu.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index dd399ca09859..53bbaba847d3 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1428,10 +1428,8 @@ static void free_dmar_iommu(struct intel_iommu *iommu)
 	/* free context mapping */
 	free_context_table(iommu);
 
-	if (pasid_supported(iommu)) {
-		if (ecap_prs(iommu->ecap))
-			intel_iommu_finish_prq(iommu);
-	}
+	if (ecap_prs(iommu->ecap))
+		intel_iommu_finish_prq(iommu);
 }
 
 /*
@@ -2352,7 +2350,7 @@ static int __init init_dmars(void)
 
 		iommu_flush_write_buffer(iommu);
 
-		if (pasid_supported(iommu) && ecap_prs(iommu->ecap)) {
+		if (ecap_prs(iommu->ecap)) {
 			/*
 			 * Call dmar_alloc_hwirq() with dmar_global_lock held,
 			 * could cause possible lock race condition.
@@ -2783,7 +2781,7 @@ static int intel_iommu_add(struct dmar_drhd_unit *dmaru)
 	intel_iommu_init_qi(iommu);
 	iommu_flush_write_buffer(iommu);
 
-	if (pasid_supported(iommu) && ecap_prs(iommu->ecap)) {
+	if (ecap_prs(iommu->ecap)) {
 		ret = intel_iommu_enable_prq(iommu);
 		if (ret)
 			goto disable_iommu;

-- 
2.43.0



  parent reply	other threads:[~2024-10-09  7:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  7:28 [PATCH v3 0/5] iommu: Enable user space IOPFs in non-PASID and non-svm cases Joel Granados
2024-10-09  7:28 ` [PATCH v3 1/5] iommu/vt-d: Separate page request queue from SVM Joel Granados
2024-10-09  7:28 ` [PATCH v3 2/5] iommu/vt-d: Remove the pasid present check in prq_event_thread Joel Granados
2024-10-09  7:28 ` [PATCH v3 3/5] iommu: kconfig: Move IOMMU_IOPF into INTEL_IOMMU Joel Granados
2024-10-09  7:28 ` [PATCH v3 4/5] iommufd: Enable PRI when doing the iommufd_hwpt_alloc Joel Granados
2024-10-09  7:28 ` Joel Granados [this message]
2024-10-11 16:40 ` [PATCH v3 0/5] iommu: Enable user space IOPFs in non-PASID and non-svm cases Jason Gunthorpe
2024-10-15 21:02   ` Joel Granados

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=20241009-jag-iopfv8-v3-5-bd4271df5b2b@kernel.org \
    --to=joel.granados@kernel.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=its@irrelevant.dk \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=k.jensen@samsung.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®