diff options
author | Jean-Philippe Brucker <jean-philippe@linaro.org> | 2020-11-06 16:50:47 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-11-23 14:16:55 +0000 |
commit | cb4789b0d19ff231ce9f73376a023341300aed96 (patch) | |
tree | 2ca4e1bb68a04c7a9e54483ba9c17663ac1fcff2 /security | |
parent | f8394f232b1eab649ce2df5c5f15b0e528c92091 (diff) |
iommu/ioasid: Add ioasid references
Let IOASID users take references to existing ioasids with ioasid_get().
ioasid_put() drops a reference and only frees the ioasid when its
reference number is zero. It returns true if the ioasid was freed.
For drivers that don't call ioasid_get(), ioasid_put() is the same as
ioasid_free().
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20201106155048.997886-2-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions