From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8671CA90AF for ; Wed, 13 May 2020 09:03:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7636206CC for ; Wed, 13 May 2020 09:03:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732330AbgEMJDX (ORCPT ); Wed, 13 May 2020 05:03:23 -0400 Received: from 8bytes.org ([81.169.241.247]:42288 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730634AbgEMJDX (ORCPT ); Wed, 13 May 2020 05:03:23 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 63BBB46A; Wed, 13 May 2020 11:03:22 +0200 (CEST) Date: Wed, 13 May 2020 11:03:21 +0200 From: Joerg Roedel To: Marek Szyprowski Cc: dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Robin Murphy , Bartlomiej Zolnierkiewicz , linux-arm-kernel@lists.infradead.org, David Airlie , Daniel Vetter Subject: Re: [PATCH v4 03/38] iommu: add generic helper for mapping sgtable objects Message-ID: <20200513090320.GH9820@8bytes.org> References: <20200512085710.14688-1-m.szyprowski@samsung.com> <20200512090058.14910-1-m.szyprowski@samsung.com> <20200512090058.14910-3-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200512090058.14910-3-m.szyprowski@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marek, On Tue, May 12, 2020 at 11:00:23AM +0200, Marek Szyprowski wrote: > --- > include/linux/iommu.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) Some nits below, with those fixed: Acked-by: Joerg Roedel > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 7cfd2dd..ba662ba 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -478,6 +478,22 @@ extern size_t iommu_map_sg_atomic(struct iommu_domain *domain, > extern void iommu_set_fault_handler(struct iommu_domain *domain, > iommu_fault_handler_t handler, void *token); > > +/** > + * iommu_map_sgtable - Map the given buffer to the IOMMU domain > + * @domain: The IOMMU domain to perfor ^^^^^^ Truncated comment? > + * @iova: The start addrees to map the buffer ^^^^^^^ Typo > + * @sgt: The sg_table object describing the buffer > + * @prot: IOMMU protection bits > + * > + * Create a mapping at @iova for the buffer described by a scatterlist > + * stored in the given sg_table object in the provided IOMMU domain. > + */ > +static inline size_t iommu_map_sgtable(struct iommu_domain *domain, > + unsigned long iova, struct sg_table *sgt, int prot) > +{ > + return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); > +} > + > extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); > extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); > extern void generic_iommu_put_resv_regions(struct device *dev, > -- > 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99BB5CA90AF for ; Wed, 13 May 2020 09:03:29 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6418B206CC for ; Wed, 13 May 2020 09:03:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6418B206CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2B83F8840B; Wed, 13 May 2020 09:03:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j-WRKVWBIePZ; Wed, 13 May 2020 09:03:26 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id E0578883D2; Wed, 13 May 2020 09:03:26 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C3A47C088B; Wed, 13 May 2020 09:03:26 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4C89FC016F for ; Wed, 13 May 2020 09:03:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 229A42033B for ; Wed, 13 May 2020 09:03:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xITH23EkiVWs for ; Wed, 13 May 2020 09:03:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by silver.osuosl.org (Postfix) with ESMTPS id 0A15220198 for ; Wed, 13 May 2020 09:03:23 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 63BBB46A; Wed, 13 May 2020 11:03:22 +0200 (CEST) Date: Wed, 13 May 2020 11:03:21 +0200 From: Joerg Roedel To: Marek Szyprowski Subject: Re: [PATCH v4 03/38] iommu: add generic helper for mapping sgtable objects Message-ID: <20200513090320.GH9820@8bytes.org> References: <20200512085710.14688-1-m.szyprowski@samsung.com> <20200512090058.14910-1-m.szyprowski@samsung.com> <20200512090058.14910-3-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200512090058.14910-3-m.szyprowski@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Bartlomiej Zolnierkiewicz , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, iommu@lists.linux-foundation.org, Daniel Vetter , Robin Murphy , Christoph Hellwig , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Marek, On Tue, May 12, 2020 at 11:00:23AM +0200, Marek Szyprowski wrote: > --- > include/linux/iommu.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) Some nits below, with those fixed: Acked-by: Joerg Roedel > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 7cfd2dd..ba662ba 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -478,6 +478,22 @@ extern size_t iommu_map_sg_atomic(struct iommu_domain *domain, > extern void iommu_set_fault_handler(struct iommu_domain *domain, > iommu_fault_handler_t handler, void *token); > > +/** > + * iommu_map_sgtable - Map the given buffer to the IOMMU domain > + * @domain: The IOMMU domain to perfor ^^^^^^ Truncated comment? > + * @iova: The start addrees to map the buffer ^^^^^^^ Typo > + * @sgt: The sg_table object describing the buffer > + * @prot: IOMMU protection bits > + * > + * Create a mapping at @iova for the buffer described by a scatterlist > + * stored in the given sg_table object in the provided IOMMU domain. > + */ > +static inline size_t iommu_map_sgtable(struct iommu_domain *domain, > + unsigned long iova, struct sg_table *sgt, int prot) > +{ > + return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); > +} > + > extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); > extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); > extern void generic_iommu_put_resv_regions(struct device *dev, > -- > 1.9.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27499CA90AF for ; Wed, 13 May 2020 09:03:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAC702054F for ; Wed, 13 May 2020 09:03:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lepQcfqt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAC702054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o9cypj5aWzb1DCgRr6+NHHCgJFaBMY7yE+283wcVNxA=; b=lepQcfqtdk13+l vvr3NNUYPFCSDULeJ/o5gWkY4TTR3p8SYcWw0gaJIVqEiWp7lguVHF5TasHB614VHmfDHXST3cXFf TQl4RxY+4eVHafM9DrwB/E2+GE90c/mYwyI20jJyMccFYIIl0z1V9sSRfimJYUd0Mgg1jWmoglZ+w FjJ0uYAU+ZMwa+6+DvQRNBB9821unOAISbrSfyKpRO4u/HcI/y73cp+bTbTLfmGFFuMPKutarCzIW /FRvrXCTM5drjMnt3E6kmHmBNUBVD2C2/iD04E+c+n52wGbMShMrWNth/2K7/0QzzxhjzZAzah7rk Mlcku/uVl94oGjbx9jzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYnId-0004eV-M3; Wed, 13 May 2020 09:03:35 +0000 Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYnIa-0004dE-Hc for linux-arm-kernel@lists.infradead.org; Wed, 13 May 2020 09:03:34 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id 63BBB46A; Wed, 13 May 2020 11:03:22 +0200 (CEST) Date: Wed, 13 May 2020 11:03:21 +0200 From: Joerg Roedel To: Marek Szyprowski Subject: Re: [PATCH v4 03/38] iommu: add generic helper for mapping sgtable objects Message-ID: <20200513090320.GH9820@8bytes.org> References: <20200512085710.14688-1-m.szyprowski@samsung.com> <20200512090058.14910-1-m.szyprowski@samsung.com> <20200512090058.14910-3-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200512090058.14910-3-m.szyprowski@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200513_020332_732661_CC6F774E X-CRM114-Status: GOOD ( 13.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, iommu@lists.linux-foundation.org, Daniel Vetter , Robin Murphy , Christoph Hellwig , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Marek, On Tue, May 12, 2020 at 11:00:23AM +0200, Marek Szyprowski wrote: > --- > include/linux/iommu.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) Some nits below, with those fixed: Acked-by: Joerg Roedel > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 7cfd2dd..ba662ba 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -478,6 +478,22 @@ extern size_t iommu_map_sg_atomic(struct iommu_domain *domain, > extern void iommu_set_fault_handler(struct iommu_domain *domain, > iommu_fault_handler_t handler, void *token); > > +/** > + * iommu_map_sgtable - Map the given buffer to the IOMMU domain > + * @domain: The IOMMU domain to perfor ^^^^^^ Truncated comment? > + * @iova: The start addrees to map the buffer ^^^^^^^ Typo > + * @sgt: The sg_table object describing the buffer > + * @prot: IOMMU protection bits > + * > + * Create a mapping at @iova for the buffer described by a scatterlist > + * stored in the given sg_table object in the provided IOMMU domain. > + */ > +static inline size_t iommu_map_sgtable(struct iommu_domain *domain, > + unsigned long iova, struct sg_table *sgt, int prot) > +{ > + return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); > +} > + > extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); > extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); > extern void generic_iommu_put_resv_regions(struct device *dev, > -- > 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA18FC433E4 for ; Fri, 15 May 2020 06:53:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84E54206F1 for ; Fri, 15 May 2020 06:53:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84E54206F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DADD86EBDD; Fri, 15 May 2020 06:53:27 +0000 (UTC) X-Greylist: delayed 549 seconds by postgrey-1.36 at gabe; Wed, 13 May 2020 09:12:33 UTC Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by gabe.freedesktop.org (Postfix) with ESMTPS id CF5B76E9D8 for ; Wed, 13 May 2020 09:12:33 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 63BBB46A; Wed, 13 May 2020 11:03:22 +0200 (CEST) Date: Wed, 13 May 2020 11:03:21 +0200 From: Joerg Roedel To: Marek Szyprowski Subject: Re: [PATCH v4 03/38] iommu: add generic helper for mapping sgtable objects Message-ID: <20200513090320.GH9820@8bytes.org> References: <20200512085710.14688-1-m.szyprowski@samsung.com> <20200512090058.14910-1-m.szyprowski@samsung.com> <20200512090058.14910-3-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200512090058.14910-3-m.szyprowski@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Mailman-Approved-At: Fri, 15 May 2020 06:52:55 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, iommu@lists.linux-foundation.org, Robin Murphy , Christoph Hellwig , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Marek, On Tue, May 12, 2020 at 11:00:23AM +0200, Marek Szyprowski wrote: > --- > include/linux/iommu.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) Some nits below, with those fixed: Acked-by: Joerg Roedel > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 7cfd2dd..ba662ba 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -478,6 +478,22 @@ extern size_t iommu_map_sg_atomic(struct iommu_domain *domain, > extern void iommu_set_fault_handler(struct iommu_domain *domain, > iommu_fault_handler_t handler, void *token); > > +/** > + * iommu_map_sgtable - Map the given buffer to the IOMMU domain > + * @domain: The IOMMU domain to perfor ^^^^^^ Truncated comment? > + * @iova: The start addrees to map the buffer ^^^^^^^ Typo > + * @sgt: The sg_table object describing the buffer > + * @prot: IOMMU protection bits > + * > + * Create a mapping at @iova for the buffer described by a scatterlist > + * stored in the given sg_table object in the provided IOMMU domain. > + */ > +static inline size_t iommu_map_sgtable(struct iommu_domain *domain, > + unsigned long iova, struct sg_table *sgt, int prot) > +{ > + return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); > +} > + > extern void iommu_get_resv_regions(struct device *dev, struct list_head *list); > extern void iommu_put_resv_regions(struct device *dev, struct list_head *list); > extern void generic_iommu_put_resv_regions(struct device *dev, > -- > 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel