git: 95c6e44054ce - stable/13 - linuxkpi: implement ida_alloc()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 07 May 2022 15:57:15 UTC
The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=95c6e44054cedc72bff1c08fab598581b3109935 commit 95c6e44054cedc72bff1c08fab598581b3109935 Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-10-08 08:36:30 +0000 Commit: Alex Richardson <arichardson@FreeBSD.org> CommitDate: 2022-05-07 12:08:55 +0000 linuxkpi: implement ida_alloc() Needed for the virtio-gpu driver. Reviewed By: #linuxkpi, manu, bz, hselasky Differential Revision: https://reviews.freebsd.org/D32366 (cherry picked from commit d98f2712c7f5e4636afa65c8c3875bbb5ff981cf) --- sys/compat/linuxkpi/common/include/linux/idr.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/idr.h b/sys/compat/linuxkpi/common/include/linux/idr.h index 99f8fb3305ac..5310fcf9950c 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) {