diff options
author | Alex Richardson <arichardson@FreeBSD.org> | 2021-10-08 08:36:30 +0000 |
---|---|---|
committer | Alex Richardson <arichardson@FreeBSD.org> | 2021-10-11 10:51:44 +0000 |
commit | d98f2712c7f5e4636afa65c8c3875bbb5ff981cf (patch) | |
tree | 34bd239ce3381c98d25947e3753cc20e90145cb5 /sys | |
parent | 6d15ccde4d9579ad2a77f93630695804a7efcbc4 (diff) | |
download | src-d98f2712c7f5e4636afa65c8c3875bbb5ff981cf.tar.gz src-d98f2712c7f5e4636afa65c8c3875bbb5ff981cf.zip |
linuxkpi: implement ida_alloc()
Needed for the virtio-gpu driver.
Reviewed By: #linuxkpi, manu, bz, hselasky
Differential Revision: https://reviews.freebsd.org/D32366
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/idr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/idr.h b/sys/compat/linuxkpi/common/include/linux/idr.h index 7387032fd989..cba3f96c88ae 100644 --- a/sys/compat/linuxkpi/common/include/linux/idr.h +++ b/sys/compat/linuxkpi/common/include/linux/idr.h @@ -140,6 +140,11 @@ ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) return (ida_simple_get(ida, 0, max, gfp)); } +static inline int ida_alloc(struct ida *ida, gfp_t gfp) +{ + return (ida_alloc_max(ida, ~0u, gfp)); +} + static inline bool ida_is_empty(struct ida *ida) { |