From nobody Wed Sep 07 15:10:24 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 4MN5KY0BGHz4bPBS; Wed, 7 Sep 2022 15:10:25 +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 4MN5KX302tz3Z4P; Wed, 7 Sep 2022 15:10:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563424; 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=IBx7e34K6jmTklSipN3x8TC5Y3bdQSwVjjOPnxdxcnc=; b=tA7HGgqAzNO6zKyjVPEzGO99NqWRuAwPish76BoNwV9v/2FRCtH203mmHYbMQMZYtHrT+G wKMLHA1NP3wa/YIvYmzo1xSeQi4q+njWg5YYMnfuFipYADL3s978O0sLr8RAVFduCk5A43 AUaYwOFc0Xy+qyzLGlZfLiZb2lK5ZOYy0I4hS5LlycSPed72dLz6ITTBVjvYVmGfc9mKLY lwwUa4d+6eG/cu17/65t/h7B17c1LE7BIIxRApx9fuN63ppMiyhEnPTMHpkZSPKrLTgQR8 p7SUIpNz7Xh2x2xEIlS+kpz2amRzYqTtHdMlYziM1rd+ppabhiHCNgnhf9QvWw== 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 4MN5KX25TczZ4B; Wed, 7 Sep 2022 15:10:24 +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 287FAOC3026208; Wed, 7 Sep 2022 15:10:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 287FAOj6026207; Wed, 7 Sep 2022 15:10:24 GMT (envelope-from git) Date: Wed, 7 Sep 2022 15:10:24 GMT Message-Id: <202209071510.287FAOj6026207@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: ad5366ba416b - stable/13 - linuxkpi: Add for_each_sgtable_{sg,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: ad5366ba416b0652dc833bd69277915dd4fa2994 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563424; 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=IBx7e34K6jmTklSipN3x8TC5Y3bdQSwVjjOPnxdxcnc=; b=OqBxgJF2548YizGApeJ3i78/qLF68syfP4MoQ28Fz+VQBOY69uFLFCXz0mPrANypZHyoGd sIm4cA4yRq0xbzZ0E+nHt+7kI7mwNRx7ZJE2O9P846PY65woSj2nQi4Y2mqLqFaSkRwS4d lMgVLAKnfhfYvPyGOdJHI37yTRNu0skP0+8noWnV9uFkIegQ5wp684ooCilkQIqp4dQMMz NxZ+MEy3pycGxVwhfAIftfoInKDz0xDZMrE+v89Lq6bj++J9aED4vafCgyitcbfrc5xkEI JphHMfUsDCgIu/xxa0eq75d0lc8NBxvDueyYS44Yk70vbl0GVN4DLB19xPRp5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662563424; a=rsa-sha256; cv=none; b=DHZMkgq96uxPgK9rQ6WhFxGIhzEwN3w68faj5C/hOWO1y4W2LKwVFjJ3tj5aqIDU4dM9ba /T9zfOU6OH7Le/8Tj2GeNkXEQIN+eWmrLoClsddS0MTuPgqH8bzBzyCjXxbZfe9K56D+i0 AjMtjrC5Hivk30GOa0VMzqXMdPNBEJy7Ksi3jSdIBgHBOO+xCBnJd3yxvEnaT5JhJs25R6 jCkosP7JPz2bbn+4osskXKfTq6VCOccD0uymwdRdXaaeds+IHu0eC1y1gZUMU7zu+7fSdO BfsR34+mH4Ghimx0nd9Z/A1YxQShDKFS2T4pf47Ay/vEw376JcconpoI/TjmnQ== 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=ad5366ba416b0652dc833bd69277915dd4fa2994 commit ad5366ba416b0652dc833bd69277915dd4fa2994 Author: Emmanuel Vadot AuthorDate: 2022-08-09 08:54:19 +0000 Commit: Emmanuel Vadot CommitDate: 2022-09-07 15:09:05 +0000 linuxkpi: Add for_each_sgtable_{sg,page} Needed by drm-kmod. Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36098 (cherry picked from commit 4370e9f1cfce6f43f170790be96b79f3da70be13) --- 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 a3da30e1b9a7..86aeefafb501 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_sg(sgt, sg, i) \ + for_each_sg((sgt)->sgl, sg, (sgt)->orig_nents, i) + +#define for_each_sgtable_page(sgt, iter, pgoffset) \ + for_each_sg_page((sgt)->sgl, iter, (sgt)->orig_nents, pgoffset) + #define for_each_sgtable_dma_sg(sgt, sg, iter) \ for_each_sg((sgt)->sgl, sg, (sgt)->nents, iter)