From nobody Thu Aug 18 09:10:01 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 4M7fGy207vz4Yx0G; Thu, 18 Aug 2022 09:10:02 +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 4M7fGy1TLyz3PHN; Thu, 18 Aug 2022 09:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660813802; 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=y3ZLOYb4BsEJLeTo1gmP8V59Vhbh8QKmE7cAaslvI2U=; b=ujZCwYLAjv/4p//aA5dD0RPFTATvygfhf3pvBi6/4z5LFrCLgj5MCuughJjiIHH1K7TXmZ UkXiV+pO1nQ12zpIa+soeBg93C8MZMKfM6+9vWWrY3JZ/8l2A5bdl4QldqQxf/eVS4R4xi hSqdtAScdjGk9lP6r8sZ2JXAtepYcve6jEQFsbd4tw42/6ZRC9nliWoe4uhy9c/tp0JQqH HWRHOix6WRcAjFMLYnoeim1OEX2urvD7AkMLGEulZ6mXQeBdCKXcYixXQSoB4JF3kvzAxy LimzWtVKMlytw0Rz5JmjsCBWF5c26Pk0FQIgrGjMRbQeIgMx9uTZU1JoxdivaQ== 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 4M7fGy0Y71z1Mkl; Thu, 18 Aug 2022 09:10:02 +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 27I9A18X016381; Thu, 18 Aug 2022 09:10:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27I9A1Im016378; Thu, 18 Aug 2022 09:10:01 GMT (envelope-from git) Date: Thu, 18 Aug 2022 09:10:01 GMT Message-Id: <202208180910.27I9A1Im016378@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: 4370e9f1cfce - main - 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/main X-Git-Reftype: branch X-Git-Commit: 4370e9f1cfce6f43f170790be96b79f3da70be13 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660813802; 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=y3ZLOYb4BsEJLeTo1gmP8V59Vhbh8QKmE7cAaslvI2U=; b=tYKPk+zvPlQX/yqX5Ir0rEuTWe8ZsMcaxV/ZeetTTcZdGLZAr2A5l0SLVFhFjwOTveULL/ irUqAAmmHYbN2XeuLT0ZcFmYlPgt/+hUysiZPIrxvBXWlTmY7j9ki2fMRrdS00UTxRquMd rM458gvWiypNUBgv0wpK0oH/8HnaZ9nsYWUvsJarLbRSwhS2y2EsrNK8yzSWjfuWCfdPdB pV+4srJsncqp9fCfD8MVaw6zLrIFi2wfBWnzxoKOIOdO/y9w05ddw6TsEl1mFWS54rS59E WE7n4Cu4hSQZRZ7WY7Di8s92o27ZrIs1ydLoEOrLsT1ENGFBPu085XN0AgboiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660813802; a=rsa-sha256; cv=none; b=HjUDGK/gSReHIAaB4+FUahaXxc3rtw6XtquCDINfFrilZ/qQ8OZYQ9DLRqOSIHyEUzErKx hhNPiOE2K1CXGZdgHDsYP+eZBJxmpwQeWRNky/TKg/3kvaOAr72DkJ/8d5WKoE63U0+7Hv W9OpWNljZAR2aFHjVHfBHJbQ2naOSaNc/fqSTHjfRB9tc+bDIcoZxySzDubKjLPbNXjZ+E hrY+3YSYe8JojQQ+C/dLgbqVacLcoRktz+siozjAYIZ05GsyOiS4AyZSkD2svGw2otlb7J sW/Qkc0R9FRBG60oBtlVdVcxcFuJrti5M4w6qV3Le3dufInMpxb60fV3PO3z4w== 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=4370e9f1cfce6f43f170790be96b79f3da70be13 commit 4370e9f1cfce6f43f170790be96b79f3da70be13 Author: Emmanuel Vadot AuthorDate: 2022-08-09 08:54:19 +0000 Commit: Emmanuel Vadot CommitDate: 2022-08-18 07:46:22 +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 --- 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)