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: 629324 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rLBds2F1Pz9t8n for ; Fri, 3 Jun 2016 01:55:45 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8UyF-0002EQ-FD; Thu, 02 Jun 2016 15:55:43 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8Uke-0001uW-0a; Thu, 02 Jun 2016 15:41:42 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_084140_362762_FBF8496E X-CRM114-Status: GOOD ( 16.80 ) X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.11 listed in wl.mailspike.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.11 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Mailman-Approved-At: Thu, 02 Jun 2016 08:55:38 -0700 X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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); }