From nobody Sat May 07 15:57:15 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4E6361AC49EF; Sat, 7 May 2022 15:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KwXBM4hwHz4R6C; Sat, 7 May 2022 15:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651939036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTheJkYvKDYwXCt+AdSyr7eccuNfAy+2GnCNyd72zvI=; b=hUvXrG8HZmOAyd4LzM3SBowuZpWdWMLLz223t9OPF8y6/t1w+AZhqqO6SJfDYopOOrC/1a Bm9nBr6Vq2bU3LL1gYeGFASbjpSA1NGmaEnU9P0h63cN5Tt670NO6sKte3jkRmfCdgIcvR rZoYJn6HNI9IqGoS5U0uNG5BztQAc/G5651poGhh/b8pZVcu9xK0QwyPGRlDAFeulWkmtK TIsix29yk/37N6SxWh4jG8w60ov2EyTa9BGqIrWDF+tKxmyUstDniL2iReHB+a4f+qyk31 HoGAcqNDemj6ip+bZ8FiqIVicosuWkTqV9trB9IhgzAFAqA1RI+KCcOvVSzrag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AD371390D; Sat, 7 May 2022 15:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 247FvFv2015063; Sat, 7 May 2022 15:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 247FvF4N015062; Sat, 7 May 2022 15:57:15 GMT (envelope-from git) Date: Sat, 7 May 2022 15:57:15 GMT Message-Id: <202205071557.247FvF4N015062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 95c6e44054ce - stable/13 - linuxkpi: implement ida_alloc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 95c6e44054cedc72bff1c08fab598581b3109935 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651939036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MTheJkYvKDYwXCt+AdSyr7eccuNfAy+2GnCNyd72zvI=; b=a3jzALwd4Y5Y3j1M0OXjYPfVrcCE00eLKfJdep8S4CDD1BBRQlvMtOpSz3UESJfC2uV5Tm 9F0ExGJuv8a4BrQVLLXPUBat8fPT2rJVDcSdY8t+3HSH4UjjfNIMEG0gQcPig6awnfWOiw 1JawcT5AybkMaJ1G6vFxIMYD/s9ZGqG3Vp3+4LPCX151oOD6CsV6pYZu5y9SF2YK9ax4zr fP3M/URGj7VaGkINZR932FhMxEEnXujDb5mUFzriDH6NP2r9jfmJdebVGVCOq4emK9xK1X EY8mj8OFCwuugaPHPZVJm7Sqn+5ji1LrKF1JmQlf+NoK9OIZdfo1XbGJlyivxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651939036; a=rsa-sha256; cv=none; b=WdtQbVZ7QAa/4t0PTQOIVkdFIaks5HCNVKnRF+13b3WJCX7oAGQtnv/ucCSmWVhA9ClcXm xkdnVx1LuLfOA4orED3eax+VfzIkjRLAFl8D+zV+EF/Zd4pxx252yH0TF20E7dhh/Om/zQ t419yGphnbKZH1HX0bl7r8MBz95+/Itx799TGW3BOhBM16niHehHoR0zfQ6ZjEEAgRNGKQ M0PqGvouKLGeX5FG4xz1QWE+X1s8Iercyf50pddTgECuU8917URFuztHTbTozknNTS1u5O XvnFez/jgiZWyh82PcfJrMx4BZ6uid87BzcGFL5PCswyOX5wJg6nxYRO1A+cfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=95c6e44054cedc72bff1c08fab598581b3109935 commit 95c6e44054cedc72bff1c08fab598581b3109935 Author: Alex Richardson AuthorDate: 2021-10-08 08:36:30 +0000 Commit: Alex Richardson 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) {