From nobody Wed Apr 27 15:16:25 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 6292E1AB17A5; Wed, 27 Apr 2022 15:16:26 +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 4KpMls6sWbz3kqn; Wed, 27 Apr 2022 15:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651072586; 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=nUzkRvkA6tiD3014Ti6ZHSg5QWKH3xM7Rpe6yQeon54=; b=rI4Ksop79jXjGa/QRdOkGunH4kBttCugoeXlzxoL3oWxZDMrs2sL5L9o7jSR4GZrf7/7QU xyBiCRA0fpnlY1ZruaT9jIhpOb10XC66JCVVVwWKAsPIBUKUcoI5zs6NfF1m5DMxvaFwF5 WI3pf5b56B9nSoqSmyUjbFX2BdCq0VYYH72uJRoL2e1x0iwQuiDT6ANwScf2vLeK+0iPj+ wJMCidGw8OiT6ZWL1IL6j7/PdRiPPzY0IelPBHvnRCvLdEU4QuG6vEcKfSFaYmlnXtssjb X5Hr9oRAY++Zap/ZY4AtfG/xZor+jU3CLp43KgBXGNUUzU2b3cc5nFknutSbbg== 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 963CC263B4; Wed, 27 Apr 2022 15:16:25 +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 23RFGPs7008128; Wed, 27 Apr 2022 15:16:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RFGPq2008127; Wed, 27 Apr 2022 15:16:25 GMT (envelope-from git) Date: Wed, 27 Apr 2022 15:16:25 GMT Message-Id: <202204271516.23RFGPq2008127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 825b33fccdd9 - stable/13 - linuxkpi: Add for_each_sgtable_dma_sg and for_each_sgtable_dma_page 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 825b33fccdd98ff1905cfe3c68a8093b365a5b2c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651072586; 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=nUzkRvkA6tiD3014Ti6ZHSg5QWKH3xM7Rpe6yQeon54=; b=uCau0EsyzkIgLjRA89J1+D/2xeqL/qs2EcB6ms4HQ3+actFR8jYVwgwM4K/UVsKPF4vdos zxAi7QtfVssXxkxFgpysxNYovkT+6UzUY5r2f0gduR69nQlTAtgLD5dvazuyNUYWrPGDS+ 5qdoyLwpZQdO8cWaEOqgKEapIi6kmhwyaIKyJAUWf9o9jNM3dxTxWD6LqDc5FqZ26IkVB4 JluUHQVns7wV8wZnPZM6m7Mcp7nwoR7u3XCPTcvZ0nvAGqgQEw4h5qFtoh8aSyz9JtYK7g w8JgrOenPPQNIBMYne0fNgUWizeFMzW+vYH/Z0DneewjLyyANHL2QoNYRc+RiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651072586; a=rsa-sha256; cv=none; b=h8KBHQQ3/8jcp98193hr448zDrTTmJf5EvqFzOcQsLad5+duPUiqLxcSKUckp7Ze/LkIKY n5cb605BkH7/InmZN/BTmqdwx/TTF5TLxbsOQCTgnKQ7DVJv2JrsmczrYrPu1OpW8rVC5U wjDS6svjjOTEc02Ig4aq7+BaZgNPS5UzlnKTQUYdaHsv6hHN9gj24ILrdAIILiqwEHP96e NsE9xjsw3FqKcR7H1Wwb8IcdSX1r6F8bi/vL9KgilAeCWX1yPw2u/TAqm4ERWS89/BpIcA HzU088s5+khdhl0bh0qTHzQbZTrC6GOrGZoEArGGpOjVKESLcHUoRBq148nbzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=825b33fccdd98ff1905cfe3c68a8093b365a5b2c commit 825b33fccdd98ff1905cfe3c68a8093b365a5b2c Author: Emmanuel Vadot AuthorDate: 2022-03-29 11:02:25 +0000 Commit: Emmanuel Vadot CommitDate: 2022-04-27 16:38:06 +0000 linuxkpi: Add for_each_sgtable_dma_sg and for_each_sgtable_dma_page Variants of for_each_sg/for_each_sg_dma_page but they operate on sgtable structs. Needed by drm v5.10 MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 1aca8a6ec61cce1a4673a8f7b5412b106e366aff) --- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index 23a083577b30..d51c45853945 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -99,6 +99,12 @@ struct sg_dma_page_iter { #define for_each_sg(sglist, sg, sgmax, iter) \ for (iter = 0, sg = (sglist); iter < (sgmax); iter++, sg = sg_next(sg)) +#define for_each_sgtable_dma_sg(sgt, sg, iter) \ + for_each_sg((sgt)->sgl, sg, (sgt)->nents, iter) + +#define for_each_sgtable_dma_page(sgt, iter, pgoffset) \ + for_each_sg_dma_page((sgt)->sgl, iter, (sgt)->nents, pgoffset) + typedef struct scatterlist *(sg_alloc_fn) (unsigned int, gfp_t); typedef void (sg_free_fn) (struct scatterlist *, unsigned int);