From nobody Mon Feb 13 21:09:55 2023 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 4PFxmz2Gztz3q5by; Mon, 13 Feb 2023 21:09:55 +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 4PFxmz1qPpz4SR0; Mon, 13 Feb 2023 21:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322595; 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=21sGiAk2Uj+jOHkd4QxZowlXlaDfOaWQJ60EXsAnJS0=; b=srZVzhles8MkhHxKUi9nnfMqjjdq1fgKm6vCBuEOWtcvSvh9B7AZc/xR1t5bE6VGIg6iZE mmjF9TELpBX3VFhwYsO3OVbTzVO/Lp6M+mR9s6Shp+uI1A5wIW4rM2K0sBe7/YmLm2QBbu 3JT/EyymnmqUkZlUXVBzYwVmk0TBSzERFPA7RLUzV3DXVpgaycvUB2s/NKRGr6FtqyUwtD LLsJ1sAQz7GSeQNWaaBozmri7NZ0msMgUaRZE9GRIurkRV10tYXzSlmrv5bhuwz/j8lpa+ vZIB5jKPwlT7sLBMq2pAUviihMj7gZuc3/hzDhghxKG1iASoHnkN33NqWxlukQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322595; 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=21sGiAk2Uj+jOHkd4QxZowlXlaDfOaWQJ60EXsAnJS0=; b=U3He0FBVvUe6kGyZLFPmYz+b9wYSjw6xrvPVsS9bZNzpN057hbISaYWFXy1lxBox5IMBU5 Xd2f6PlE8CYlvhj6TkbXxCm3hSIt/vHx1OpJpHWkwaCqmNcvNmGWYOxJaXysMNcChjvk5e EdEAWjhvxaM4/YMGrYlJlKO51ljUoPEnUdYwtXQGf3BzRh8IAffnZF1iQZcxnHvicl6OZO nlPLPQdApnTYCe3ej9nnM0XSmNaSi80XTXKCL7vk9z1HGBJEM2g0QrBkM4YZIlnBzDZirO IYWHHmESQPkh/zM2oDqe1r787bORUrZDGF2J7f3fi1ki7QgkLWfzUKZTy/iz5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322595; a=rsa-sha256; cv=none; b=Z/QFy35Nm/oFttGvrGNJvPeB+Tzd4fIDNtCCzGeKRdmi40gxo1oGjTAFYJ7PcdYnP02PLv wM9YiL6vDoUltx7gMhE45+c4qAS8PKhLm3iLqULIOHKYFTID8KDMH7Z6j3mfMitE8xxvkP ZRsWoTDHL5XyhOMkC5qWX9TLYSYstpE5UWns8Ht6zj5C12EFCb2NAw6Jbm2cYkL8sDWDSf lr9+ZxAXS9t0zpJ9FNVEDEDQWiskb6Scih1vZpguDbJgJeISyg4e8WTRb7/874G0mOGPW6 J4+jQc47AoOfW5CJToWK7V9QLqQdHFPBNzBATmObsx6N9+DIiPN82NVSm0yyyA== 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 4PFxmz0hQVzYCs; Mon, 13 Feb 2023 21:09:55 +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 31DL9t7D056569; Mon, 13 Feb 2023 21:09:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9tT5056568; Mon, 13 Feb 2023 21:09:55 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:55 GMT Message-Id: <202302132109.31DL9tT5056568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: f3490083b731 - main - linuxkpi: Add `sg_alloc_table_from_pages_segment()` 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3490083b731700f2aa7c17ac6fe159826dc59a5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f3490083b731700f2aa7c17ac6fe159826dc59a5 commit f3490083b731700f2aa7c17ac6fe159826dc59a5 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-10 15:37:31 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-13 21:09:32 +0000 linuxkpi: Add `sg_alloc_table_from_pages_segment()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38541 --- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index d1a71258c27d..fe4bce06819d 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -427,6 +427,20 @@ sg_alloc_table_from_pages(struct sg_table *sgt, #endif } +static inline int +sg_alloc_table_from_pages_segment(struct sg_table *sgt, + struct page **pages, unsigned int count, unsigned int off, + unsigned long size, unsigned int max_segment, gfp_t gfp_mask) +{ +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300 + return (PTR_ERR_OR_ZERO(__sg_alloc_table_from_pages(sgt, pages, count, off, size, + max_segment, NULL, 0, gfp_mask))); +#else + return (__sg_alloc_table_from_pages(sgt, pages, count, off, size, + max_segment, gfp_mask)); +#endif +} + static inline int sg_nents(struct scatterlist *sg) {