From: Stefano Stabellini <sstabellini@kernel.org> To: xen-devel@lists.xen.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sstabellini@kernel.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, boris.ostrovsky@oracle.com, jgross@suse.com, Julien Grall <julien.grall@arm.com> Subject: [PATCH 2/2] xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops Date: Thu, 13 Apr 2017 14:04:22 -0700 [thread overview] Message-ID: <1492117462-19886-2-git-send-email-sstabellini@kernel.org> (raw) In-Reply-To: <1492117462-19886-1-git-send-email-sstabellini@kernel.org> Now that __generic_dma_ops is a xen specific function, rename it to xen_get_dma_ops. Change all the call sites appropriately. Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> CC: linux@armlinux.org.uk CC: catalin.marinas@arm.com CC: will.deacon@arm.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: Julien Grall <julien.grall@arm.com> --- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index e8cef1a..8dab0d3 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -693,8 +693,8 @@ void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, unsigned long attrs) { #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) - if (__generic_dma_ops(dev)->mmap) - return __generic_dma_ops(dev)->mmap(dev, vma, cpu_addr, + if (xen_get_dma_ops(dev)->mmap) + return xen_get_dma_ops(dev)->mmap(dev, vma, cpu_addr, dma_addr, size, attrs); #endif return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); @@ -711,7 +711,7 @@ void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, unsigned long attrs) { #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) - if (__generic_dma_ops(dev)->get_sgtable) { + if (xen_get_dma_ops(dev)->get_sgtable) { #if 0 /* * This check verifies that the page belongs to the current domain and @@ -721,7 +721,7 @@ void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, unsigned long bfn = PHYS_PFN(dma_to_phys(dev, handle)); BUG_ON (!page_is_ram(bfn)); #endif - return __generic_dma_ops(dev)->get_sgtable(dev, sgt, cpu_addr, + return xen_get_dma_ops(dev)->get_sgtable(dev, sgt, cpu_addr, handle, size, attrs); } #endif diff --git a/include/xen/arm/page-coherent.h b/include/xen/arm/page-coherent.h index b0a2bfc..b1b4ecd 100644 --- a/include/xen/arm/page-coherent.h +++ b/include/xen/arm/page-coherent.h @@ -5,7 +5,7 @@ #include <asm/dma-mapping.h> #include <linux/dma-mapping.h> -static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev) +static inline const struct dma_map_ops *xen_get_dma_ops(struct device *dev) { if (dev && dev->archdata.dev_dma_ops) return dev->archdata.dev_dma_ops; @@ -27,13 +27,13 @@ void __xen_dma_sync_single_for_device(struct device *hwdev, static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs) { - return __generic_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs); + return xen_get_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs); } static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs) { - __generic_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs); + xen_get_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs); } static inline void xen_dma_map_page(struct device *hwdev, struct page *page, @@ -57,7 +57,7 @@ static inline void xen_dma_map_page(struct device *hwdev, struct page *page, * specific function. */ if (local) - __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); + xen_get_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); else __xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs); } @@ -75,8 +75,8 @@ static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, * specific function. */ if (pfn_valid(pfn)) { - if (__generic_dma_ops(hwdev)->unmap_page) - __generic_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs); + if (xen_get_dma_ops(hwdev)->unmap_page) + xen_get_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs); } else __xen_dma_unmap_page(hwdev, handle, size, dir, attrs); } @@ -86,8 +86,8 @@ static inline void xen_dma_sync_single_for_cpu(struct device *hwdev, { unsigned long pfn = PFN_DOWN(handle); if (pfn_valid(pfn)) { - if (__generic_dma_ops(hwdev)->sync_single_for_cpu) - __generic_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir); + if (xen_get_dma_ops(hwdev)->sync_single_for_cpu) + xen_get_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir); } else __xen_dma_sync_single_for_cpu(hwdev, handle, size, dir); } @@ -97,8 +97,8 @@ static inline void xen_dma_sync_single_for_device(struct device *hwdev, { unsigned long pfn = PFN_DOWN(handle); if (pfn_valid(pfn)) { - if (__generic_dma_ops(hwdev)->sync_single_for_device) - __generic_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir); + if (xen_get_dma_ops(hwdev)->sync_single_for_device) + xen_get_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir); } else __xen_dma_sync_single_for_device(hwdev, handle, size, dir); } -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: sstabellini@kernel.org (Stefano Stabellini) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] xen/arm, arm64: rename __generic_dma_ops to xen_get_dma_ops Date: Thu, 13 Apr 2017 14:04:22 -0700 [thread overview] Message-ID: <1492117462-19886-2-git-send-email-sstabellini@kernel.org> (raw) In-Reply-To: <1492117462-19886-1-git-send-email-sstabellini@kernel.org> Now that __generic_dma_ops is a xen specific function, rename it to xen_get_dma_ops. Change all the call sites appropriately. Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> CC: linux at armlinux.org.uk CC: catalin.marinas at arm.com CC: will.deacon at arm.com CC: boris.ostrovsky at oracle.com CC: jgross at suse.com CC: Julien Grall <julien.grall@arm.com> --- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index e8cef1a..8dab0d3 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -693,8 +693,8 @@ void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, unsigned long attrs) { #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) - if (__generic_dma_ops(dev)->mmap) - return __generic_dma_ops(dev)->mmap(dev, vma, cpu_addr, + if (xen_get_dma_ops(dev)->mmap) + return xen_get_dma_ops(dev)->mmap(dev, vma, cpu_addr, dma_addr, size, attrs); #endif return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); @@ -711,7 +711,7 @@ void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, unsigned long attrs) { #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) - if (__generic_dma_ops(dev)->get_sgtable) { + if (xen_get_dma_ops(dev)->get_sgtable) { #if 0 /* * This check verifies that the page belongs to the current domain and @@ -721,7 +721,7 @@ void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, unsigned long bfn = PHYS_PFN(dma_to_phys(dev, handle)); BUG_ON (!page_is_ram(bfn)); #endif - return __generic_dma_ops(dev)->get_sgtable(dev, sgt, cpu_addr, + return xen_get_dma_ops(dev)->get_sgtable(dev, sgt, cpu_addr, handle, size, attrs); } #endif diff --git a/include/xen/arm/page-coherent.h b/include/xen/arm/page-coherent.h index b0a2bfc..b1b4ecd 100644 --- a/include/xen/arm/page-coherent.h +++ b/include/xen/arm/page-coherent.h @@ -5,7 +5,7 @@ #include <asm/dma-mapping.h> #include <linux/dma-mapping.h> -static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev) +static inline const struct dma_map_ops *xen_get_dma_ops(struct device *dev) { if (dev && dev->archdata.dev_dma_ops) return dev->archdata.dev_dma_ops; @@ -27,13 +27,13 @@ void __xen_dma_sync_single_for_device(struct device *hwdev, static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs) { - return __generic_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs); + return xen_get_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs); } static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs) { - __generic_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs); + xen_get_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs); } static inline void xen_dma_map_page(struct device *hwdev, struct page *page, @@ -57,7 +57,7 @@ static inline void xen_dma_map_page(struct device *hwdev, struct page *page, * specific function. */ if (local) - __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); + xen_get_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); else __xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs); } @@ -75,8 +75,8 @@ static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, * specific function. */ if (pfn_valid(pfn)) { - if (__generic_dma_ops(hwdev)->unmap_page) - __generic_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs); + if (xen_get_dma_ops(hwdev)->unmap_page) + xen_get_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs); } else __xen_dma_unmap_page(hwdev, handle, size, dir, attrs); } @@ -86,8 +86,8 @@ static inline void xen_dma_sync_single_for_cpu(struct device *hwdev, { unsigned long pfn = PFN_DOWN(handle); if (pfn_valid(pfn)) { - if (__generic_dma_ops(hwdev)->sync_single_for_cpu) - __generic_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir); + if (xen_get_dma_ops(hwdev)->sync_single_for_cpu) + xen_get_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir); } else __xen_dma_sync_single_for_cpu(hwdev, handle, size, dir); } @@ -97,8 +97,8 @@ static inline void xen_dma_sync_single_for_device(struct device *hwdev, { unsigned long pfn = PFN_DOWN(handle); if (pfn_valid(pfn)) { - if (__generic_dma_ops(hwdev)->sync_single_for_device) - __generic_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir); + if (xen_get_dma_ops(hwdev)->sync_single_for_device) + xen_get_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir); } else __xen_dma_sync_single_for_device(hwdev, handle, size, dir); } -- 1.9.1
next prev parent reply other threads:[~2017-04-13 21:04 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-13 21:04 [PATCH 1/2] xen/arm,arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..." Stefano Stabellini 2017-04-13 21:04 ` [PATCH 1/2] xen/arm, arm64: " Stefano Stabellini 2017-04-13 21:04 ` Stefano Stabellini [this message] 2017-04-13 21:04 ` [PATCH 2/2] xen/arm, arm64: rename __generic_dma_ops to xen_get_dma_ops Stefano Stabellini 2017-04-14 0:48 ` [PATCH 2/2] xen/arm,arm64: " Boris Ostrovsky 2017-04-14 0:48 ` Boris Ostrovsky 2017-04-14 2:14 ` [PATCH 2/2] xen/arm, arm64: " Konrad Rzeszutek Wilk 2017-04-14 2:14 ` [PATCH 2/2] xen/arm,arm64: " Konrad Rzeszutek Wilk 2017-04-14 2:14 ` Konrad Rzeszutek Wilk 2017-04-14 0:48 ` [PATCH 2/2] xen/arm, arm64: " Boris Ostrovsky 2017-04-13 21:04 ` Stefano Stabellini 2017-04-18 14:21 ` [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..." Catalin Marinas 2017-04-18 14:21 ` Catalin Marinas 2017-04-19 17:25 ` Stefano Stabellini 2017-04-19 17:25 ` Stefano Stabellini 2017-04-19 17:25 ` Stefano Stabellini 2017-04-19 18:20 ` Juergen Gross 2017-04-19 18:20 ` Juergen Gross 2017-04-19 18:32 ` Stefano Stabellini 2017-04-19 18:32 ` Stefano Stabellini 2017-04-19 18:32 ` Stefano Stabellini 2017-04-19 18:20 ` Juergen Gross 2017-04-24 19:16 ` Stefano Stabellini 2017-04-24 19:16 ` Stefano Stabellini 2017-04-24 19:16 ` Stefano Stabellini 2017-04-25 12:51 ` Julien Grall 2017-04-25 12:51 ` Julien Grall 2017-04-25 12:51 ` Julien Grall 2017-04-25 17:22 ` Stefano Stabellini 2017-04-25 17:22 ` Stefano Stabellini 2017-04-25 17:22 ` Stefano Stabellini 2017-04-26 11:19 ` Catalin Marinas 2017-04-26 11:19 ` Catalin Marinas 2017-04-26 17:00 ` Stefano Stabellini 2017-04-26 17:00 ` Stefano Stabellini 2017-04-26 17:00 ` Stefano Stabellini 2017-04-26 17:13 ` Catalin Marinas 2017-04-26 17:13 ` Catalin Marinas 2017-04-26 17:13 ` Catalin Marinas 2017-04-26 17:17 ` Stefano Stabellini 2017-04-26 17:17 ` Stefano Stabellini 2017-04-26 17:17 ` Stefano Stabellini 2017-04-26 11:19 ` Catalin Marinas 2017-04-18 14:21 ` Catalin Marinas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1492117462-19886-2-git-send-email-sstabellini@kernel.org \ --to=sstabellini@kernel.org \ --cc=boris.ostrovsky@oracle.com \ --cc=catalin.marinas@arm.com \ --cc=jgross@suse.com \ --cc=julien.grall@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=will.deacon@arm.com \ --cc=xen-devel@lists.xen.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.