iommu: expose iommu_sva_find() to common header
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 8/17 iommu: expose iommu_sva_find() to common header
From: Dave Jiang <[email protected]>
Move iommu_sva_find() prototype to global header from local header in order to allow drivers to call the function. Used by idxd driver to find the mm from device reported PASID. The symbol is already exported.
Tested-by Tony Zhu <[email protected]>
Signed-off-by Dave Jiang <[email protected]>
Co-developed-by Fenghua Yu <[email protected]>
Signed-off-by Fenghua Yu <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Will Deacon <[email protected]>
Cc Robin Murphy <[email protected]>
--- drivers/iommu/iommu-sva.h | 1 - include/linux/iommu.h | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/iommu/iommu-sva.h +0 -1
@@ -9,7 +9,6 @@#include <linux/mm_types.h> int iommu_sva_alloc_pasid (struct mm_struct *mm,ioasid_t min,ioasid_t max); -struct mm_struct *iommu_sva_find (ioasid_t pasid);/* I/O Page fault */ struct device ;
include/linux/iommu.h +7 -0
@@ -704,6 +704,8 @@ void iommu_release_device(struct device *dev);int iommu_dev_enable_feature (struct device *dev,enum iommu_dev_features f);int iommu_dev_disable_feature (struct device *dev,enum iommu_dev_features f); +struct mm_struct *iommu_sva_find (ioasid_t pasid); +int iommu_device_use_default_domain (struct device *dev);void iommu_device_unuse_default_domain (struct device *dev);
@@ -1042,6 +1044,11 @@ iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features feat)return -ENODEV ; } +static inline struct mm_struct *iommu_sva_find (ioasid_t pasid) +{ +return ERR_PTR (-ENODEV ); +} +static inline struct iommu_fwspec *dev_iommu_fwspec_get (struct device *dev) {return NULL ;
Signature · 1 line
2.32.0
PATCH 9/17 mm: export access_remote_vm() symbol
In reply to a message not in the archiveFrom: Dave Jiang <[email protected]>
Export access_remote_vm() symbol for driver usage. The idxd driver would like to use it to write the user's completion record that the hardware device is not able to write to due to user page fault.
Tested-by Tony Zhu <[email protected]>
Signed-off-by Dave Jiang <[email protected]>
Co-developed-by Fenghua Yu <[email protected]>
Signed-off-by Fenghua Yu <[email protected]>
Cc Andrew Morton <[email protected]>
--- mm/memory.c | 1 + 1 file changed, 1 insertion(+)
mm/memory.c +1 -0
@@ -5579,6 +5579,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr, {return __access_remote_vm (mm, addr, buf, len, gup_flags); } +EXPORT_SYMBOL_GPL (access_remote_vm);/* * Access another process' address space.
Signature · 1 line
2.32.0