diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2023-03-22 13:07:58 -0700 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-03-31 10:03:23 +0200 |
commit | cd3891158a77685aee6129f7374a018d13540b2c (patch) | |
tree | f2aa7d4ea3a426b77e4f21f56219728c0dbfd529 /include/linux/ioasid.h | |
parent | 760f41d182ec94a651977e70045fd61b57973408 (diff) | |
download | lwn-cd3891158a77685aee6129f7374a018d13540b2c.tar.gz lwn-cd3891158a77685aee6129f7374a018d13540b2c.zip |
iommu/sva: Move PASID helpers to sva code
Preparing to remove IOASID infrastructure, PASID management will be
under SVA code. Decouple mm code from IOASID.
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20230322200803.869130-3-jacob.jun.pan@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/ioasid.h')
-rw-r--r-- | include/linux/ioasid.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/include/linux/ioasid.h b/include/linux/ioasid.h index af1c9d62e642..734bf0e036ee 100644 --- a/include/linux/ioasid.h +++ b/include/linux/ioasid.h @@ -4,8 +4,8 @@ #include <linux/types.h> #include <linux/errno.h> +#include <linux/iommu.h> -#define INVALID_IOASID ((ioasid_t)-1) typedef unsigned int ioasid_t; typedef ioasid_t (*ioasid_alloc_fn_t)(ioasid_t min, ioasid_t max, void *data); typedef void (*ioasid_free_fn_t)(ioasid_t ioasid, void *data); @@ -40,10 +40,6 @@ void *ioasid_find(struct ioasid_set *set, ioasid_t ioasid, int ioasid_register_allocator(struct ioasid_allocator_ops *allocator); void ioasid_unregister_allocator(struct ioasid_allocator_ops *allocator); int ioasid_set_data(ioasid_t ioasid, void *data); -static inline bool pasid_valid(ioasid_t ioasid) -{ - return ioasid != INVALID_IOASID; -} #else /* !CONFIG_IOASID */ static inline ioasid_t ioasid_alloc(struct ioasid_set *set, ioasid_t min, @@ -74,10 +70,5 @@ static inline int ioasid_set_data(ioasid_t ioasid, void *data) return -ENOTSUPP; } -static inline bool pasid_valid(ioasid_t ioasid) -{ - return false; -} - #endif /* CONFIG_IOASID */ #endif /* __LINUX_IOASID_H */ |