mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
cfc78dfd9b
Let IOMMU drivers allocate a single PASID per mm. Store the mm in the IOASID set to allow refcounting and searching mm by PASID, when handling an I/O page fault. Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20201106155048.997886-3-jean-philippe@linaro.org Signed-off-by: Will Deacon <will@kernel.org>
16 lines
392 B
C
16 lines
392 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* SVA library for IOMMU drivers
|
|
*/
|
|
#ifndef _IOMMU_SVA_LIB_H
|
|
#define _IOMMU_SVA_LIB_H
|
|
|
|
#include <linux/ioasid.h>
|
|
#include <linux/mm_types.h>
|
|
|
|
int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t max);
|
|
void iommu_sva_free_pasid(struct mm_struct *mm);
|
|
struct mm_struct *iommu_sva_find(ioasid_t pasid);
|
|
|
|
#endif /* _IOMMU_SVA_LIB_H */
|