xen/arm,arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
Subsystems (4)
Stefano Stabellini
maintainerPATCH 1/2 xen/arm,arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
The following commit:
commit 815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800
treewide: Consolidate get_dma_ops() implementations
rearranges get_dma_ops in a way that xen_dma_ops are not returned when running on Xen anymore, dev->dma_ops is returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).
Fix the problem by storing dev->dma_ops in dev_archdata, and setting dev->dma_ops to xen_dma_ops. This way, xen_dma_ops is returned naturally by get_dma_ops. The Xen code can retrieve the original dev->dma_ops from dev_archdata when needed. It also allows us to remove __generic_dma_ops from common headers.
--- arch/arm/include/asm/device.h | 3 +++ arch/arm/include/asm/dma-mapping.h | 12 +----------- arch/arm/mm/dma-mapping.c | 7 +++++++ arch/arm64/include/asm/device.h | 3 +++ arch/arm64/include/asm/dma-mapping.h | 13 +------------ arch/arm64/mm/dma-mapping.c | 7 +++++++ include/xen/arm/page-coherent.h | 8 ++++++++ 7 files changed, 30 insertions(+), 23 deletions(-)
arch/arm/include/asm/device.h +3 -0
@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };
arch/arm/include/asm/dma-mapping.h +1 -11
@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1
arch/arm/mm/dma-mapping.c +7 -0
@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)
arch/arm64/include/asm/device.h +3 -0
@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };
arch/arm64/include/asm/dma-mapping.h +1 -12
@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time.
@@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_ops
arch/arm64/mm/dma-mapping.c +7 -0
@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }
include/xen/arm/page-coherent.h +8 -0
@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h> +static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
Signature · 1 line
1.9.1
Stefano Stabellini
maintainerPATCH 2/2 xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops
Now that __generic_dma_ops is a xen specific function, rename it to xen_get_dma_ops. Change all the call sites appropriately.
--- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-)
drivers/xen/swiotlb-xen.c +4 -4
@@ -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
include/xen/arm/page-coherent.h +10 -10
@@ -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); }
Signature · 1 line
1.9.1
Stefano Stabellini
maintainerPATCH 2/2 xen/arm, arm64: rename __generic_dma_ops to xen_get_dma_ops
In reply to Stefano StabelliniNow that __generic_dma_ops is a xen specific function, rename it to xen_get_dma_ops. Change all the call sites appropriately.
--- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-)
drivers/xen/swiotlb-xen.c +4 -4
@@ -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
include/xen/arm/page-coherent.h +10 -10
@@ -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); }
Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 2/2] xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops
In reply to Stefano StabelliniQuoted 10 lines · Stefano Stabellini
Now that
__generic_dma_opsis a xen specific function, rename it toxen_get_dma_ops. Change all the call sites appropriately.Signed-off-by Stefano Stabellini <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>
(+Konrad)
Quoted 110 lines
--- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-)drivers/xen/swiotlb-xen.c +4
-4@@ -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 include/xen/arm/page-coherent.h +10
-10@@ -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); }
Re: [PATCH 2/2] xen/arm, arm64: rename __generic_dma_ops to xen_get_dma_ops
In reply to Stefano StabelliniQuoted 10 lines · Stefano Stabellini
Now that
__generic_dma_opsis a xen specific function, rename it toxen_get_dma_ops. Change all the call sites appropriately.Signed-off-by Stefano Stabellini <[email protected]>CC Julien Grall <[email protected]>
(+Konrad)
Quoted 100 lines
--- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-)drivers/xen/swiotlb-xen.c +4
-4@@ -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 include/xen/arm/page-coherent.h +8
-8@@ -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); }
include/xen/arm/page-coherent.h static inline void xen_dma_sync_single_for_device(struct device *hwdev, · line 104
Quoted 10 lines
include/xen/arm/page-coherent.h +2
-2@@ -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); }
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Konrad Rzeszutek Wilk
Acked-byRe: [PATCH 2/2] xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops
In reply to Boris OstrovskyQuoted 14 lines · Boris Ostrovsky
Quoted 10 lines · Stefano Stabellini
Now that
__generic_dma_opsis a xen specific function, rename it toxen_get_dma_ops. Change all the call sites appropriately.Signed-off-by Stefano Stabellini <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>
Quoted 3 lines
Reviewed-by Boris Ostrovsky <[email protected]>(+Konrad)
Quoted 112 lines
Quoted 112 lines
--- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-)drivers/xen/swiotlb-xen.c +4
-4@@ -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 include/xen/arm/page-coherent.h +10
-10@@ -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); }
Konrad Rzeszutek Wilk
Acked-byRe: [PATCH 2/2] xen/arm, arm64: rename __generic_dma_ops to xen_get_dma_ops
In reply to Boris OstrovskyQuoted 14 lines · Boris Ostrovsky
Quoted 10 lines · Stefano Stabellini
Now that
__generic_dma_opsis a xen specific function, rename it toxen_get_dma_ops. Change all the call sites appropriately.Signed-off-by Stefano Stabellini <[email protected]>CC Julien Grall <[email protected]>
Quoted 3 lines
Reviewed-by Boris Ostrovsky <[email protected]>(+Konrad)
Quoted 104 lines
Quoted 104 lines
--- drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-)drivers/xen/swiotlb-xen.c +4
-4@@ -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 include/xen/arm/page-coherent.h +8
-8@@ -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)) {
Quoted 8 lines
include/xen/arm/page-coherent.h static inline void xen_dma_sync_single_for_device(struct device *hwdev, · line 104
Quoted 8 lines
include/xen/arm/page-coherent.h +2
-2-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); }
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.
Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>
Re: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.
Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC Julien Grall <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Catalin MarinasHello Russell,
Can I have your acked-by on the following fix (original patch is 1492117462-19886-1-git-send-email-sstabellini at kernel.org)?
Thanks,
Stefano
Quoted 173 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 140 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +8
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h> +static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Catalin MarinasHello Russell,
Can I have your acked-by on the following fix (original patch is [email protected])?
Thanks,
Stefano
Quoted 163 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 130 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +1
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h>
Quoted 10 lines
include/xen/arm/page-coherent.h line 17
Quoted 10 lines
include/xen/arm/page-coherent.h +7
-0+static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 4 lines · Stefano Stabellini
Hello Russell,
Can I have your acked-by on the following fix (original patch is 1492117462-19886-1-git-send-email-sstabellini at kernel.org)?
Stefano, through which tree should this go? ARM or Xen or other?
Juergen
Quoted 181 lines
Thanks,
Stefano
Quoted 173 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 140 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +8
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h> +static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
Juergen Gross
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 4 lines · Stefano Stabellini
Hello Russell,
Can I have your acked-by on the following fix (original patch is [email protected])?
Stefano, through which tree should this go? ARM or Xen or other?
Juergen
Quoted 170 lines
Thanks,
Stefano
Quoted 163 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 130 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +1
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h>
Quoted 11 lines
Quoted 10 lines
include/xen/arm/page-coherent.h line 17
Quoted 10 lines
include/xen/arm/page-coherent.h +7
-0+static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Juergen GrossQuoted 7 lines · Juergen Gross
Quoted 4 lines · Stefano Stabellini
Hello Russell,
Can I have your acked-by on the following fix (original patch is 1492117462-19886-1-git-send-email-sstabellini at kernel.org)?
Stefano, through which tree should this go? ARM or Xen or other?
I think it could go via the Xen tree, but we still need an ack from the ARM maintainer for changes to code under arch/arm.
Quoted 184 lines
Juergen
Quoted 181 lines
Thanks,
Stefano
Quoted 173 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 140 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +8
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h> +static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Juergen GrossQuoted 7 lines · Juergen Gross
Quoted 4 lines · Stefano Stabellini
Hello Russell,
Can I have your acked-by on the following fix (original patch is [email protected])?
Stefano, through which tree should this go? ARM or Xen or other?
I think it could go via the Xen tree, but we still need an ack from the ARM maintainer for changes to code under arch/arm.
Quoted 184 lines
Juergen
Quoted 181 lines
Thanks,
Stefano
Quoted 173 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 140 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +8
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h> +static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniHi Russell,
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
Please shout if you disagree.
Thank you.
- Stefano
Quoted 185 lines · Stefano Stabellini
Hello Russell,
Can I have your acked-by on the following fix (original patch is 1492117462-19886-1-git-send-email-sstabellini at kernel.org)?
Thanks,
Stefano
Quoted 173 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC linux at armlinux.org.ukCC catalin.marinas at arm.comCC will.deacon at arm.comCC boris.ostrovsky at oracle.comCC jgross at suse.comCC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 140 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +8
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h> +static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniHi Russell,
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
Please shout if you disagree.
Thank you.
- Stefano
Quoted 174 lines · Stefano Stabellini
Hello Russell,
Can I have your acked-by on the following fix (original patch is [email protected])?
Thanks,
Stefano
Quoted 163 lines · Catalin Marinas
Quoted 19 lines · Stefano Stabellini
The following commit:
commit
815dd18788fe0d41899f51b91d0560279cf16b0d
Author: Bart Van Assche <[email protected]>
Date: Fri Jan 20 13:04:04 2017 -0800treewide: Consolidate
get_dma_ops()implementationsrearranges
get_dma_opsin a way thatxen_dma_opsare not returned when running on Xen anymore,dev->dma_opsis returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops).Fix the problem by storing
dev->dma_opsindev_archdata, and settingdev->dma_opstoxen_dma_ops. This way,xen_dma_opsis returned naturally byget_dma_ops. The Xen code can retrieve the originaldev->dma_opsfromdev_archdatawhen needed. It also allows us to remove__generic_dma_opsfrom common headers.Quoted 9 lines
Signed-off-by Stefano Stabellini <[email protected]>Tested-by Julien Grall <[email protected]>Suggested-by Catalin Marinas <[email protected]>CC Julien Grall <[email protected]>Reviewed-by Catalin Marinas <[email protected]>Quoted 130 lines
arch/arm/include/asm/device.h +3
-0@@ -16,6 +16,9 @@ struct dev_archdata {#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping;#endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm/include/asm/dma-mapping.h +1
-11@@ -16,19 +16,9 @@extern const struct dma_map_ops arm_dma_ops;extern const struct dma_map_ops arm_coherent_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) -{ -if (dev && dev->dma_ops) -return dev->dma_ops; -return &arm_dma_ops; -} -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); +return &arm_dma_ops; }#define HAVE_ARCH_DMA_SUPPORTED 1arch/arm/mm/dma-mapping.c +7
-0@@ -2396,6 +2396,13 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dma_ops =arm_get_dma_map_ops (coherent);set_dma_ops (dev, dma_ops); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }void arch_teardown_dma_ops (struct device *dev)arch/arm64/include/asm/device.h +3
-0@@ -20,6 +20,9 @@ struct dev_archdata {#ifdef CONFIG_IOMMU_API void *iommu;/* private IOMMU data */ #endif +#ifdef CONFIG_XEN +const struct dma_map_ops *dev_dma_ops; +#endif bool dma_coherent; };arch/arm64/include/asm/dma-mapping.h +1
-12@@ -27,11 +27,8 @@#define DMA_ERROR_CODE (~(dma_addr_t)0)extern const struct dma_map_ops dummy_dma_ops; -static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) { -if (dev && dev->dma_ops) -return dev->dma_ops; -/* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. @@ -39,14 +36,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_arch_dma_ops (struct bus_type *bus) -{ -if (xen_initial_domain ()) -return xen_dma_ops; -else -return __generic_dma_ops (NULL ); -} -void arch_setup_dma_ops (struct device *dev,u64 dma_base,u64 size,const struct iommu_ops *iommu,bool coherent);#define arch_setup_dma_ops arch_setup_dma_opsarch/arm64/mm/dma-mapping.c +7
-0@@ -977,4 +977,11 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->archdata.dma_coherent = coherent;__iommu_setup_dma_ops (dev, dma_base, size, iommu); + +#ifdef CONFIG_XEN +if (xen_initial_domain ()) { + dev->archdata.dev_dma_ops = dev->dma_ops; + dev->dma_ops = xen_dma_ops; + } +#endif }include/xen/arm/page-coherent.h +1
-0@@ -2,8 +2,16 @@#define _ASM_ARM_XEN_PAGE_COHERENT_H#include <asm/page.h> +#include <asm/dma-mapping.h> #include <linux/dma-mapping.h>
Quoted 11 lines
Quoted 10 lines
include/xen/arm/page-coherent.h line 17
Quoted 10 lines
include/xen/arm/page-coherent.h +7
-0+static inline const struct dma_map_ops *__generic_dma_ops (struct device *dev) +{ +if (dev && dev->archdata.dev_dma_ops) +return dev->archdata.dev_dma_ops; +return get_arch_dma_ops (NULL ); +} +void __xen_dma_map_page (struct device *hwdev,struct page *page,dma_addr_t dev_addr,unsigned long offset,size_t size,enum dma_data_direction dir,unsigned long attrs);
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniHi Stefano,
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniHi Stefano,
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Julien GrallQuoted 8 lines · Julien Grall
Hi Stefano,
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Julien GrallQuoted 8 lines · Julien Grall
Hi Stefano,
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Catalin Marinas
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 9 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Signature · 1 line
Catalin
Catalin Marinas
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 9 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Signature · 6 lines
Catalin _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Catalin MarinasQuoted 9 lines · Catalin Marinas
Quoted 8 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
Quoted 7 lines
Quoted 1 line
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Fixes 815dd18788fe ("treewide: Consolidate get_dma_ops() implementations")
I did add:
I thought that would be enough to trigger a backport?
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Catalin MarinasQuoted 9 lines · Catalin Marinas
Quoted 8 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
Quoted 7 lines
Quoted 1 line
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Fixes 815dd18788fe ("treewide: Consolidate get_dma_ops() implementations")
I did add:
I thought that would be enough to trigger a backport?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Catalin Marinas
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 16 lines · Stefano Stabellini
Quoted 15 lines · Catalin Marinas
Quoted 9 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Quoted 7 lines
Quoted 1 line
Fixes 815dd18788fe ("treewide: Consolidate get_dma_ops() implementations")I did add:
Cc <[email protected]> [4.11+]I thought that would be enough to trigger a backport?
Either would do. I didn't see it in the patch you posted, that's why I mentioned it.
Signature · 1 line
Catalin
Catalin Marinas
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Stefano StabelliniQuoted 16 lines · Stefano Stabellini
Quoted 15 lines · Catalin Marinas
Quoted 9 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Quoted 7 lines
Quoted 1 line
Fixes 815dd18788fe ("treewide: Consolidate get_dma_ops() implementations")I did add:
Cc <[email protected]> [4.11+]I thought that would be enough to trigger a backport?
Either would do. I didn't see it in the patch you posted, that's why I mentioned it.
Signature · 6 lines
Catalin _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Catalin MarinasQuoted 19 lines · Catalin Marinas
Quoted 18 lines · Stefano Stabellini
Quoted 16 lines · Catalin Marinas
Quoted 9 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Fixes 815dd18788fe ("treewide: Consolidate get_dma_ops() implementations")
Quoted 8 lines
Quoted 5 lines
I did add:
Cc <[email protected]> [4.11+]I thought that would be enough to trigger a backport?
Either would do. I didn't see it in the patch you posted, that's why I mentioned it.
Thanks, I appreciated it!
Stefano Stabellini
maintainerRe: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..."
In reply to Catalin MarinasQuoted 19 lines · Catalin Marinas
Quoted 18 lines · Stefano Stabellini
Quoted 16 lines · Catalin Marinas
Quoted 9 lines · Stefano Stabellini
Quoted 6 lines · Julien Grall
Quoted 2 lines · Stefano Stabellini
Given the outstanding regression we need to fix as soon as possible, I'll queue these patches on the xentip tree for 4.12.
It looks like there is another rc for 4.11. I am wondering whether you could try to send a pull request to Linus so it can be fixed in 4.11?
No, especially without input from Russell.
You could add a "Fixes" tag to the first patch so that it gets back-ported to 4.11.x once it hits mainline (the second patch is just cosmetic):
Fixes 815dd18788fe ("treewide: Consolidate get_dma_ops() implementations")
Quoted 8 lines
Quoted 5 lines
I did add:
Cc <[email protected]> [4.11+]I thought that would be enough to trigger a backport?
Either would do. I didn't see it in the patch you posted, that's why I mentioned it.
Thanks, I appreciated it!
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel