Commit 93bd481b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'iommu-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux

Pull iommu fixes from Joerg Roedel:

 - core: fix potential memory leak in iopf_queue_remove_device()

 - Intel VT-d: handle faults correctly in intel_iommu_drain_pasid_prq()

 - AMD-Vi: fix faults happening in resume path

 - typo and spelling fixes

* tag 'iommu-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux:
  iommu/vt-d: Make intel_iommu_drain_pasid_prq() cover faults for RID
  iommu/exynos: Fix typos
  iommu: Fix a spelling error
  iommu/amd: Expicitly enable CNTRL.EPHEn bit in resume path
  iommu: Fix potential memory leak in iopf_queue_remove_device()
parents fd31a1be add43c4f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@
#define CONTROL_GAM_EN		25
#define CONTROL_GALOG_EN	28
#define CONTROL_GAINT_EN	29
#define CONTROL_EPH_EN		45
#define CONTROL_XT_EN		50
#define CONTROL_INTCAPXT_EN	51
#define CONTROL_IRTCACHEDIS	59
+4 −0
Original line number Diff line number Diff line
@@ -2653,6 +2653,10 @@ static void iommu_init_flags(struct amd_iommu *iommu)

	/* Set IOTLB invalidation timeout to 1s */
	iommu_set_inv_tlb_timeout(iommu, CTRL_INV_TO_1S);

	/* Enable Enhanced Peripheral Page Request Handling */
	if (check_feature(FEATURE_EPHSUP))
		iommu_feature_enable(iommu, CONTROL_EPH_EN);
}

static void iommu_apply_resume_quirks(struct amd_iommu *iommu)
+3 −3
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ struct exynos_iommu_domain {
	struct list_head clients; /* list of sysmmu_drvdata.domain_node */
	sysmmu_pte_t *pgtable;	/* lv1 page table, 16KB */
	short *lv2entcnt;	/* free lv2 entry counter for each section */
	spinlock_t lock;	/* lock for modyfying list of clients */
	spinlock_t lock;	/* lock for modifying list of clients */
	spinlock_t pgtablelock;	/* lock for modifying page table @ pgtable */
	struct iommu_domain domain; /* generic domain data structure */
};
@@ -292,7 +292,7 @@ struct sysmmu_drvdata {
	struct clk *aclk;		/* SYSMMU's aclk clock */
	struct clk *pclk;		/* SYSMMU's pclk clock */
	struct clk *clk_master;		/* master's device clock */
	spinlock_t lock;		/* lock for modyfying state */
	spinlock_t lock;		/* lock for modifying state */
	bool active;			/* current status */
	struct exynos_iommu_domain *domain; /* domain we belong to */
	struct list_head domain_node;	/* node for domain clients list */
@@ -746,7 +746,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
	ret = devm_request_irq(dev, irq, exynos_sysmmu_irq, 0,
				dev_name(dev), data);
	if (ret) {
		dev_err(dev, "Unabled to register handler of irq %d\n", irq);
		dev_err(dev, "Unable to register handler of irq %d\n", irq);
		return ret;
	}

+3 −1
Original line number Diff line number Diff line
@@ -87,7 +87,9 @@ void intel_iommu_drain_pasid_prq(struct device *dev, u32 pasid)
		struct page_req_dsc *req;

		req = &iommu->prq[head / sizeof(*req)];
		if (!req->pasid_present || req->pasid != pasid) {
		if (req->rid != sid ||
		    (req->pasid_present && pasid != req->pasid) ||
		    (!req->pasid_present && pasid != IOMMU_NO_PASID)) {
			head = (head + sizeof(*req)) & PRQ_RING_MASK;
			continue;
		}
+1 −0
Original line number Diff line number Diff line
@@ -478,6 +478,7 @@ void iopf_queue_remove_device(struct iopf_queue *queue, struct device *dev)

		ops->page_response(dev, iopf, &resp);
		list_del_init(&group->pending_node);
		iopf_free_group(group);
	}
	mutex_unlock(&fault_param->lock);

Loading