From patchwork Thu Jun 2 15:39:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9170783 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 E87E9607D9 for ; Fri, 10 Jun 2016 23:38:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D700428210 for ; Fri, 10 Jun 2016 23:38:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB1D22833F; Fri, 10 Jun 2016 23:38:24 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 73ED82824F for ; Fri, 10 Jun 2016 23:38:24 +0000 (UTC) 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 1bBW0N-00051c-Th; Fri, 10 Jun 2016 23:38:23 +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 1b8Ukh-0001uW-Ky; Thu, 02 Jun 2016 15:41:44 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8500MZAI959W00@mailout1.w1.samsung.com>; Thu, 02 Jun 2016 16:41:30 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-b5-575053a92338 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 60.0C.04866.9A350575; Thu, 2 Jun 2016 16:41:29 +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:29 +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 21/45] swiotlb: dma-mapping: Use unsigned long for dma_attrs Date: Thu, 02 Jun 2016 17:39:23 +0200 Message-id: <1464881987-13203-22-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: H4sIAAAAAAAAAzVSe0xTZxT3u999FGaXmyp6g8ElTTQZmfhgcSdqjMuScZPFrNlmWIjMdXpD jbxsBRX3R6UPEAELDLRAGpRCAYFSiBHU0lALDLAbDdrhAyU8CgxXOpfiAg7WQvzv9zr5nZwc EZa8pKJFp9PPCcp0eaqUjiSHVvpHdjV+K0vco/VGwZWuZQb629Q0FP02QEC1tZmG/0r7GLDd sFIQyNVhMOcqwHNdR8JCfSECS8NRePXmOQJ/7jIJK3+9xvA4uEBDSWMZhqutEwzoKz6H6hk3 At8zOwHmucPQM7rIwJDhFgEVtq3wb1ATGhy0YahxHAS/aRbDq9YmCmaclRiqn+6Dd8YAAVeq 2hiYn90L9bXTCKYNL2jwj7kQVDrGSGif9FJQ4nAz4KoyENBwuxXDTb2ZhF+LAxQsaDtpCOT7 KRi5V02DZaoFQ2HbnRDVeMJb5ZFgKC9loMp8jYSJwWEC3KZ+GnzOIhLejK9iMNzUYLjxe3fo Hu9+waB70UJAo7uFAWe5HcHy2xXqSBI/1WMieJ3dQPPNpmbEj3g9mF9eKkX8H60yfr7MEJKK iwi+Z8JJ87fm1CTfVTnG8IG/f+Br2rP4qnIv4gu7HiG+oyFWtj8p8tApIfV0tqDcffjHSIV2 3oEziz+60G20M2rk4wpQhIhjP+Wu1T2m1vEWbvillS5AkSIJW4e4cZ8Xr5PLBHd/rJgMp2g2 nuuwmNdSm1kbx6knPThsYPZnbq5/CYXxJvYot3pdT4Qxye7gCrQVaxVilud6NFp6vW47N9BX tqZHhHSztXGtQMImcB5NB2VA4hq0oQlFCVknM1U/paTti1PJ01RZ6SlxJzPS2tH61wU7UV3f ASdiRUi6Ubzhk68TJZQ8W3UxzYk4EZZuFn/2jSxRIj4lv5gjKDNOKLNSBZUTbROR0q1i472F 7yRsivyccEYQMgXle5cQRUSrUfLg1dG+Sxmo++6hqDt/6onR5JgB35G3VkWn/3jbk+CODy29 yYtxizNBvyPBojAfq6/9/tFk7wV7U9EWfXL59ofxHz/IMQ4lZOdvO193IOVsIEY77tqZZCzR xeR7ak649/8TfT5PWzhvPZardO18/qX0i7ylD3Z95bINy0yrysp8i5RUKeR7Y7FSJf8fFpIK mXEDAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_084143_950826_50CC6844 X-CRM114-Status: GOOD ( 17.20 ) X-Mailman-Approved-At: Fri, 10 Jun 2016 16:37:14 -0700 X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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 --- include/linux/swiotlb.h | 10 +++++----- lib/swiotlb.c | 13 +++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 017fced60242..5f81f8a187f2 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -6,7 +6,6 @@ #include struct device; -struct dma_attrs; struct page; struct scatterlist; @@ -68,10 +67,10 @@ swiotlb_free_coherent(struct device *hwdev, size_t size, extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs); + unsigned long attrs); extern void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs); + unsigned long attrs); extern int swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, @@ -83,12 +82,13 @@ swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, extern int swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, - enum dma_data_direction dir, struct dma_attrs *attrs); + enum dma_data_direction dir, + unsigned long attrs); extern void swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs); + unsigned long attrs); extern void swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 76f29ecba8f4..22e13a0e19d7 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -738,7 +738,7 @@ swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir, dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { phys_addr_t map, phys = page_to_phys(page) + offset; dma_addr_t dev_addr = phys_to_dma(dev, phys); @@ -807,7 +807,7 @@ static void unmap_single(struct device *hwdev, dma_addr_t dev_addr, void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { unmap_single(hwdev, dev_addr, size, dir); } @@ -877,7 +877,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_device); */ int swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, - enum dma_data_direction dir, struct dma_attrs *attrs) + enum dma_data_direction dir, unsigned long attrs) { struct scatterlist *sg; int i; @@ -914,7 +914,7 @@ int swiotlb_map_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir) { - return swiotlb_map_sg_attrs(hwdev, sgl, nelems, dir, NULL); + return swiotlb_map_sg_attrs(hwdev, sgl, nelems, dir, 0); } EXPORT_SYMBOL(swiotlb_map_sg); @@ -924,7 +924,8 @@ EXPORT_SYMBOL(swiotlb_map_sg); */ void swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, - int nelems, enum dma_data_direction dir, struct dma_attrs *attrs) + int nelems, enum dma_data_direction dir, + unsigned long attrs) { struct scatterlist *sg; int i; @@ -941,7 +942,7 @@ void swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir) { - return swiotlb_unmap_sg_attrs(hwdev, sgl, nelems, dir, NULL); + return swiotlb_unmap_sg_attrs(hwdev, sgl, nelems, dir, 0); } EXPORT_SYMBOL(swiotlb_unmap_sg);