From nobody Sat May 07 15:57:12 2022 X-Original-To: dev-commits-src-branches@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 AE3921AC4862; Sat, 7 May 2022 15:57:13 +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 4KwXBK2gJgz4R61; Sat, 7 May 2022 15:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651939033; 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=S2xAXxUiaXfqUa0+lKkw6vw9lHSdrO5MAV6BnM6kb9I=; b=dBS6spop3Q7wzqyq0PSWHy3f18ta+8e8Eu8eUhZZGYKymzCfCd7xjOIJa/wZQAVbcc71Z2 9uAMBrAOcFSXAfXBl4uOJhdps1sUsKLt8a+vE3J6AWTV8PlahAlCFHrsRDKMVcS9JwLALQ Ygn3PSkZo87Wumgt1r5Mrvdliv5YgVjUkVt/1H1yfEOU8tu8i32WYeFqzsGJFcUBnhIAP7 zw2ESqh20I1TkB3O3LdYRkr8LbQUkkUwRAMHYD+sc2rcj6dYL5kqKofKI7vlZvhQSQifd+ sp3OW8+GKAOsTvmsZYfUgf4AS1CZXQXo5s0TwArxrC9Qp/wRGfmBd9FAdc79BQ== 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 1AAAB13841; Sat, 7 May 2022 15:57:13 +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 247FvCp8015008; Sat, 7 May 2022 15:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 247FvCJD015007; Sat, 7 May 2022 15:57:12 GMT (envelope-from git) Date: Sat, 7 May 2022 15:57:12 GMT Message-Id: <202205071557.247FvCJD015007@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: 82b4e784f3df - stable/13 - linuxkpi: Add sg_init_one List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 82b4e784f3dfd3b47d1225345bafdfddeeaea01b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651939033; 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=S2xAXxUiaXfqUa0+lKkw6vw9lHSdrO5MAV6BnM6kb9I=; b=d9E4TBXtST79nWO2aEtzuBOwyCTnJcTADr2YIaD+gAZXTo/comOfGFi4bK0fjX1AQtd/ac n3GJoUFVLajumsnASN4m77TVz2v1bNa6P7hGHXPv66inOtCJL64Swp3f3rPOgRt+/ys+qI 6Wt9Dc2WhMmLN+4k8oqKWGWXfZ+wnkfSStOiHvmlGyPqQBZYzFHPGbuCkDT+sjdXQuYou/ oUED+KHZYl4Le/0nMyOSTpAwY9fgtpTLAT1nz/0dT+/aknaO8iDhgf6T73pVE48NtqeJCG WXFzSl5R4oKc697PEYAF1P4TtgXC4bFGulqExMy6kaqyYLNaXf0Ahwr7QS1Ktg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651939033; a=rsa-sha256; cv=none; b=UK4LDrYkTYwtmFRZlbLVFAwWp3OcvS7XVBPQGnEI5xkXr1auT2XT/j9wmvTuKJPjpaLx/o 7GNuG1mnemgT/5geCRqg4YhnmFk3WUxu9IIjOaqNoWmOWBSfp+9H8+7EjYMaUoy2m7EnH+ 3VxBfWBofpudZWQVNQS7fYNXWzA3eGe3QQ1FOUXr9xWqjonz++BAvwMjKmfdoZYG1JFaMX Yju2RCmB15zbgnFVX+XrCTscg+JN8D1UrCV16BK1K1TiY3Yefe3WED3o9p4bgvZltx+Dtd 2R8jfQBRUp4RdPyZMMEiz+5ssnCUquRsDm9Ghdp/5K3/mSwafho6SRNH4C98bw== 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=82b4e784f3dfd3b47d1225345bafdfddeeaea01b commit 82b4e784f3dfd3b47d1225345bafdfddeeaea01b Author: Alex Richardson AuthorDate: 2021-10-08 08:32:46 +0000 Commit: Alex Richardson CommitDate: 2022-05-07 11:57:31 +0000 linuxkpi: Add sg_init_one Needed for the virtio-gpu driver. Reviewed By: #linuxkpi, manu, bz, hselasky Differential Revision: https://reviews.freebsd.org/D32366 (cherry picked from commit 2686b10db41c79dd1a0a0c33a7e0c0b67e0701cc) --- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index d51c45853945..a3da30e1b9a7 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -188,6 +188,13 @@ sg_init_table(struct scatterlist *sg, unsigned int nents) sg_mark_end(&sg[nents - 1]); } +static inline void +sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) +{ + sg_init_table(sg, 1); + sg_set_buf(sg, buf, buflen); +} + static struct scatterlist * sg_kmalloc(unsigned int nents, gfp_t gfp_mask) {