From nobody Tue Mar 29 11:19:37 2022 X-Original-To: dev-commits-src-main@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 3313B1A38054; Tue, 29 Mar 2022 11:19:38 +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 4KSRt20Bbnz4b6D; Tue, 29 Mar 2022 11:19:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648552778; 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=lstos41x/q/+Ry8b7AXbldsUXFo96r/L9Os/1wpaj3U=; b=l/FXgKpLVdXyDdyMB77Vrp7SBAd2s2Ey1tpQ7OuXg4axZdlET4ESFBVBpGU1sfWH0y+ZOv +ZCijOMrHnIAPQv8xSfOQP2GFz6AwXvnX0yDvxxHLMS1tgOaBhhADVp1x+3zozTKCcHdW2 79zWBbA7OnGjrDXfxVCWATglUzCJA+4NG5CA6iiBNBvi7C2KOKoWUbXCYoW3FpqXK4F1bY aDK6MwTxFDbowrKmYJxxUdivymV4XcNyUK2XnIQ4/1rnRTRfb82D8Y3Yh61t7z4SlfkEgn 5fl/50mcJzJyq2YWKxj/U/tE8Fr99sq/qhkIQuUmV/FQMjxx7C4YooPyADTgjA== 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 CF1A51D9A2; Tue, 29 Mar 2022 11:19:37 +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 22TBJbVY092919; Tue, 29 Mar 2022 11:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22TBJbbP092918; Tue, 29 Mar 2022 11:19:37 GMT (envelope-from git) Date: Tue, 29 Mar 2022 11:19:37 GMT Message-Id: <202203291119.22TBJbbP092918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1aca8a6ec61c - main - linuxkpi: Add for_each_sgtable_dma_sg and for_each_sgtable_dma_page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1aca8a6ec61cce1a4673a8f7b5412b106e366aff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648552778; 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=lstos41x/q/+Ry8b7AXbldsUXFo96r/L9Os/1wpaj3U=; b=Wr4lvJ64BNGWhww5agaTzUlk7a0NoHjM82WKplobnU2blRHTDHoQmQeAkOwwmapNiR0WGT 5kl/KYDfByChnizq0KmqmlZRSX1e0oDagPFLo3KpX8pKCpPS+49sIl6le+XxFLUZU7cyO4 7H+9z8kZTEqoBqB+nkwyWOUZYumUJv1RdylnSUfFRpK1WEl0dVuzBtiy4kpeJbm/Vy3foy JmjutLoTlvF+Vhmihflqkfahu76EQIJfuf+ls07hjmuoTWG+sa7WQNpon5WDn9qyQnPiJH KpOXGfE6LiMsfk0c4gRcXqryTE7cezfn3x8DkKGpcQx+blFf78izAGfbvYGQMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648552778; a=rsa-sha256; cv=none; b=m614m8kbcs/snCc39ZTB1gjxVr9h7whLtp7rTnlLNwd7phV2nXIK4PP+fAYByFw51P4tT5 PNaKvFODVI+0HrWOJ0ESFaASoGAalmYh+NY7iiyAcQh2ZPtOB2L/l+R1ORyh/Gr0HmlcAQ rhr5EHiGd+RG75ouGDSN1JDBhAaDrSM3M7bEg+kiPvgFSSfOhFyncYUzwI6Gyr9si7gb9k OFHdxSYCwwxdQ3vVnyWGIEzC7Iynd1eQQp+oVQ5h75j0pFkSG6/GMZEYa+Md6NFQynv9PD UkBA16NQq5+qMXtB5lhTgleOvq3lsUQRkqRCIGec95bkY6gQ7IvvH/ELl23+gA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1aca8a6ec61cce1a4673a8f7b5412b106e366aff commit 1aca8a6ec61cce1a4673a8f7b5412b106e366aff Author: Emmanuel Vadot AuthorDate: 2022-03-29 11:02:25 +0000 Commit: Emmanuel Vadot CommitDate: 2022-03-29 11:19:32 +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 --- 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 a302eb87ff0a..a3da30e1b9a7 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);