From patchwork Thu Jun 2 15:39:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9151341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CAE560221 for ; Fri, 3 Jun 2016 00:20:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CC1225404 for ; Fri, 3 Jun 2016 00:20:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 100A028330; Fri, 3 Jun 2016 00:20:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9C4725404 for ; Fri, 3 Jun 2016 00:20:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 318336ECCC; Fri, 3 Jun 2016 00:19:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 82DE56EC06; Thu, 2 Jun 2016 15:41:20 +0000 (UTC) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8500NYBI8T0I00@mailout1.w1.samsung.com>; Thu, 02 Jun 2016 16:41:18 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-3b-5750539cc507 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 0D.3A.05254.C9350575; Thu, 2 Jun 2016 16:41:17 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O85008BCI6FXK50@eusync1.samsung.com>; Thu, 02 Jun 2016 16:41:16 +0100 (BST) From: Krzysztof Kozlowski To: Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Stefano Stabellini , Catalin Marinas , Will Deacon , Haavard Skinnemoen , Hans-Christian Egtvedt , Steven Miao , Mark Salter , Aurelien Jacquiot , Mikael Starvik , Jesper Nilsson , Yoshinori Sato , Richard Kuo , Tony Luck , Fenghua Yu , Konrad Rzeszutek Wilk , Geert Uytterhoeven , James Hogan , Michal Simek , Ralf Baechle , David Howells , Ley Foon Tan , Jonas Bonn , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , Olof Johansson , Geoff Levand , Martin Schwidefsky , Guan Xuetao , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Boris Ostrovsky , David Vrabel , Juergen Gross , Muli Ben-Yehuda , Bjorn Helgaas , David Airlie , Joerg Roedel , David Woodhouse , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, adi-buildroot-devel@lists.sourceforge.net, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-am33-list@redhat.com, nios2-dev@lists.rocketboards.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, discuss@x86-64.org, linux-pci@vger.kernel.org, linux-xtensa@linux-xtensa.org, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux-foundation.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [RFC v3 17/45] infiniband: dma-mapping: Use unsigned long for dma_attrs Date: Thu, 02 Jun 2016 17:39:19 +0200 Message-id: <1464881987-13203-18-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1464881987-13203-1-git-send-email-k.kozlowski@samsung.com> References: <1464881987-13203-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzVSbUxTZxjde9/70RKb3BSnV5f4o9lmhgOtGn3mNpXsh/ePWReWkDQOqXoH boCktaib2zoQRD7clULXQSGAnVAHpaXbQskYozFUvrQVxS8qSxGFMWglflJFW4j/znnOOXlO njwSLL9DrZYczDksaHM0WQo6jhxY8A4n1qaoUjeUjhNwyh1hwOsw0FB+qY8AS1sLDS8qehlw mtsoCOcXYrDmZ4L/50ISQufKEDQ174axudsIZvMjJCzM/I/h6qMQDWdsRgyl9iADRaZksNwf QnDvVhcB1qnt0HPjMQMDYiMBJudKePqoIBrsd2Ko7/4QZusmMYzZz1Nw31ONwXJzIzz/JRwt VuNgYHpSCefOTiCYEEdpmA1cQFDdHSChfXyEgjPdQwxcqBEJaP7NjqGhyErCxdNhCkInOmgI F89SMNxpoaHpbiuGMscfUVrgj7U6SYJYVcFAjfUnEoL9PgKG6rw03POUkzD370sMYkMBBvPl v6P3eF6JoXC0lQDbUCsDnqouBJEnC9RONX+3p47gC7tEmm+pa0H88Igf85H5CsRft6v4aaMY HZ0uJ/ieoIfmG6cMJO+uDjB8+EEaX9+u52uqRhBf5h5EvKs5QbVFHffRASHrYJ6gXb89PS5z vPgFmfsnd7TIWIIMyBlfgqQSjt3M1fp8zBJewfnutNElKE4iZ39FXId3klgiPxKc29lPxFw0 u4lzNVkXXctZJ8cZxv04JmD2ODflnUcxHM+quGeDM4sBkn2HOznRQsawjOW5a6WDxNK6NVxf r5GKYWl0bm2zLXrk7C7OX+CiRCSrR2+cR28K+v25un0Z2coknSZbp8/JSNp/KLsdLX3dww50 tnebB7ESpFgma37v01Q5pcnTHcv2IE6CFctlRbtVqXLZAc2xbwTtob1afZag86C3JKRipay2 M/S5nM3QHBa+FoRcQftaJSTS1QaUUl0R2PPF3oTjWar/1q7wOJQ2M/Xtd3n25GS12n1FXTpz IzGx/+N1Smnfg4fp1k+27NBbB0Z3pqWbPxhbN236flvxBtdX8yiY4kipPGVOurws8O4R45Pe ysFVTZve/yy+M9H116ht6z+msbKA74e5YMPbZGNm5HfplxYxzRTCqVfWKkhdpkaZgLU6zSsL v1nocQMAAA== X-Mailman-Approved-At: Fri, 03 Jun 2016 00:19:26 +0000 Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Split out subsystem specific changes for easier reviews. This will be squashed with main commit. Signed-off-by: Krzysztof Kozlowski --- drivers/infiniband/core/umem.c | 7 +++---- include/rdma/ib_verbs.h | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index fe4d2e1a8b58..75d8a8b178a5 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -92,12 +91,12 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, unsigned long npages; int ret; int i; - DEFINE_DMA_ATTRS(attrs); + unsigned long attrs = 0; struct scatterlist *sg, *sg_list_start; int need_release = 0; if (dmasync) - dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs); + attrs |= DMA_ATTR_WRITE_BARRIER; if (!size) return ERR_PTR(-EINVAL); @@ -215,7 +214,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, umem->sg_head.sgl, umem->npages, DMA_BIDIRECTIONAL, - &attrs); + attrs); if (umem->nmap <= 0) { ret = -ENOMEM; diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 432bed510369..4d73928962c7 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -2819,7 +2819,7 @@ static inline void ib_dma_unmap_single(struct ib_device *dev, static inline u64 ib_dma_map_single_attrs(struct ib_device *dev, void *cpu_addr, size_t size, enum dma_data_direction direction, - struct dma_attrs *attrs) + unsigned long attrs) { return dma_map_single_attrs(dev->dma_device, cpu_addr, size, direction, attrs); @@ -2828,7 +2828,7 @@ static inline u64 ib_dma_map_single_attrs(struct ib_device *dev, static inline void ib_dma_unmap_single_attrs(struct ib_device *dev, u64 addr, size_t size, enum dma_data_direction direction, - struct dma_attrs *attrs) + unsigned long attrs) { return dma_unmap_single_attrs(dev->dma_device, addr, size, direction, attrs); @@ -2906,7 +2906,7 @@ static inline void ib_dma_unmap_sg(struct ib_device *dev, static inline int ib_dma_map_sg_attrs(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, - struct dma_attrs *attrs) + unsigned long attrs) { return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, attrs); } @@ -2914,7 +2914,7 @@ static inline int ib_dma_map_sg_attrs(struct ib_device *dev, static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, - struct dma_attrs *attrs) + unsigned long attrs) { dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, attrs); }