diff options
author | Will Deacon <will@kernel.org> | 2020-12-08 15:07:49 +0000 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-12-08 15:07:49 +0000 |
commit | a5f12de3ece88cddac27edf6618450f6c22906f1 (patch) | |
tree | 2778d7d5619377cbb8fe9e96ddcfc7ac51c3930f /include | |
parent | 854623fdea9dc3ae8543a4d5d8448ebbaee61acc (diff) | |
parent | 2f7e8c553e98d6fcddeaf18aa90ea908e3f1418e (diff) | |
download | linux-stable-a5f12de3ece88cddac27edf6618450f6c22906f1.tar.gz linux-stable-a5f12de3ece88cddac27edf6618450f6c22906f1.tar.bz2 linux-stable-a5f12de3ece88cddac27edf6618450f6c22906f1.zip |
Merge branch 'for-next/iommu/svm' into for-next/iommu/core
More steps along the way to Shared Virtual {Addressing, Memory} support
for Arm's SMMUv3, including the addition of a helper library that can be
shared amongst other IOMMU implementations wishing to support this
feature.
* for-next/iommu/svm:
iommu/arm-smmu-v3: Hook up ATC invalidation to mm ops
iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()
iommu/sva: Add PASID helpers
iommu/ioasid: Add ioasid references
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ioasid.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/ioasid.h b/include/linux/ioasid.h index 6f000d7a0ddc..e9dacd4b9f6b 100644 --- a/include/linux/ioasid.h +++ b/include/linux/ioasid.h @@ -34,7 +34,8 @@ struct ioasid_allocator_ops { #if IS_ENABLED(CONFIG_IOASID) ioasid_t ioasid_alloc(struct ioasid_set *set, ioasid_t min, ioasid_t max, void *private); -void ioasid_free(ioasid_t ioasid); +void ioasid_get(ioasid_t ioasid); +bool ioasid_put(ioasid_t ioasid); void *ioasid_find(struct ioasid_set *set, ioasid_t ioasid, bool (*getter)(void *)); int ioasid_register_allocator(struct ioasid_allocator_ops *allocator); @@ -48,10 +49,15 @@ static inline ioasid_t ioasid_alloc(struct ioasid_set *set, ioasid_t min, return INVALID_IOASID; } -static inline void ioasid_free(ioasid_t ioasid) +static inline void ioasid_get(ioasid_t ioasid) { } +static inline bool ioasid_put(ioasid_t ioasid) +{ + return false; +} + static inline void *ioasid_find(struct ioasid_set *set, ioasid_t ioasid, bool (*getter)(void *)) { |