Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724001 > unrolled thread

[RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec

Started byYisheng Xie <xieyisheng1@huawei.com>
First post2017-08-31 10:40 +0200
Last post2017-09-05 14:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec Yisheng Xie <xieyisheng1@huawei.com> - 2017-08-31 10:40 +0200
    Re: [RFC PATCH 2/6] iommu/of: Add stall and pasid properties to  iommu_fwspec Jean-Philippe Brucker <jean-philippe.brucker@arm.com> - 2017-09-05 14:50 +0200

#1724001 — [RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec

FromYisheng Xie <xieyisheng1@huawei.com>
Date2017-08-31 10:40 +0200
Subject[RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec
Message-ID<uktb3-3io-15@gated-at.bofh.it>
From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>

Add stall and pasid properties to iommu_fwspec.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
---
 drivers/iommu/of_iommu.c | 11 +++++++++++
 include/linux/iommu.h    |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 84fa6b4..b926276 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -209,6 +209,16 @@ static bool of_pci_rc_supports_ats(struct device_node *rc_node)
 			break;
 	}
 
+	if (dev->iommu_fwspec) {
+		const __be32 *prop;
+
+		if (of_get_property(np, "dma-can-stall", NULL))
+			dev->iommu_fwspec->can_stall = true;
+
+		prop = of_get_property(np, "pasid-bits", NULL);
+		if (prop)
+			dev->iommu_fwspec->num_pasid_bits = be32_to_cpu(*prop);
+	}
+
 	return ops;
 }
 
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 1c5a216..5f580de 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -387,6 +387,8 @@ struct iommu_fwspec {
 	void			*iommu_priv;
 	u32			flags;
 	unsigned int		num_ids;
+	unsigned long		num_pasid_bits;
+	bool			can_stall;
 	u32			ids[1];
 };
 
-- 
1.7.12.4

[toc] | [next] | [standalone]


#1726695 — Re: [RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec

FromJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Date2017-09-05 14:50 +0200
SubjectRe: [RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec
Message-ID<umlsM-2FV-59@gated-at.bofh.it>
In reply to#1724001
On 31/08/17 09:20, Yisheng Xie wrote:
> From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
> 
> Add stall and pasid properties to iommu_fwspec.
> 
> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>

No. This is a draft, I didn't sign it off.

Thanks,
Jean

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web