Re: [RFC v3 22/45] powerpc: dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Krzysztof Kozlowski
On 06/03/2016 01:56 PM, Michael Ellerman wrote:
> On Thu, 2016-06-02 at 17:39 +0200, Krzysztof Kozlowski wrote:
> 
>> diff --git a/arch/powerpc/platforms/cell/iommu.c 
>> b/arch/powerpc/platforms/cell/iommu.c
>> index 0c2794d2b6c0..5d1a7ef3fdee 100644
>> --- a/arch/powerpc/platforms/cell/iommu.c
>> +++ b/arch/powerpc/platforms/cell/iommu.c
>> @@ -166,7 +166,7 @@ static void invalidate_tce_cache(struct cbe_iommu 
>> *iommu, unsigned long *pte,
>>  
>>  static int tce_build_cell(struct iommu_table *tbl, long index, long npages,
>>  unsigned long uaddr, enum dma_data_direction direction,
>> -struct dma_attrs *attrs)
>> +unsigned long attrs)
>>  {
>>  int i;
>>  unsigned long *io_pte, base_pte;
> 
> You missed the call site:

Right, thanks!

Best regards,
Krzysztof

> diff --git a/arch/powerpc/platforms/cell/iommu.c 
> b/arch/powerpc/platforms/cell/iommu.c
> index 2018e562d124..6128bdb428b2 100644
> --- a/arch/powerpc/platforms/cell/iommu.c
> +++ b/arch/powerpc/platforms/cell/iommu.c
> @@ -526,7 +526,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct 
> device_node *np,
>  
>   __set_bit(0, window->table.it_map);
>   tce_build_cell(>table, window->table.it_offset, 1,
> -(unsigned long)iommu->pad_page, DMA_TO_DEVICE, NULL);
> +(unsigned long)iommu->pad_page, DMA_TO_DEVICE, 0);
>  
>   return window;
>  }
> 
> 
> cheers
> 
> 
> 

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC v3 22/45] powerpc: dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Michael Ellerman
On Thu, 2016-06-02 at 17:39 +0200, Krzysztof Kozlowski wrote:

> diff --git a/arch/powerpc/platforms/cell/iommu.c 
> b/arch/powerpc/platforms/cell/iommu.c
> index 0c2794d2b6c0..5d1a7ef3fdee 100644
> --- a/arch/powerpc/platforms/cell/iommu.c
> +++ b/arch/powerpc/platforms/cell/iommu.c
> @@ -166,7 +166,7 @@ static void invalidate_tce_cache(struct cbe_iommu *iommu, 
> unsigned long *pte,
>  
>  static int tce_build_cell(struct iommu_table *tbl, long index, long npages,
>   unsigned long uaddr, enum dma_data_direction direction,
> - struct dma_attrs *attrs)
> + unsigned long attrs)
>  {
>   int i;
>   unsigned long *io_pte, base_pte;

You missed the call site:

diff --git a/arch/powerpc/platforms/cell/iommu.c 
b/arch/powerpc/platforms/cell/iommu.c
index 2018e562d124..6128bdb428b2 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -526,7 +526,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct 
device_node *np,
 
__set_bit(0, window->table.it_map);
tce_build_cell(>table, window->table.it_offset, 1,
-  (unsigned long)iommu->pad_page, DMA_TO_DEVICE, NULL);
+  (unsigned long)iommu->pad_page, DMA_TO_DEVICE, 0);
 
return window;
 }


cheers

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[RFC v3 22/45] powerpc: dma-mapping: Use unsigned long for dma_attrs

2016-06-02 Thread Krzysztof Kozlowski
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.

Signed-off-by: Krzysztof Kozlowski 
---
 arch/powerpc/include/asm/dma-mapping.h|  7 +++
 arch/powerpc/include/asm/iommu.h  | 10 +-
 arch/powerpc/kernel/dma-iommu.c   | 12 ++--
 arch/powerpc/kernel/dma.c | 18 +-
 arch/powerpc/kernel/ibmebus.c | 12 ++--
 arch/powerpc/kernel/iommu.c   | 12 ++--
 arch/powerpc/kernel/vio.c | 12 ++--
 arch/powerpc/platforms/cell/iommu.c   | 14 +++---
 arch/powerpc/platforms/pasemi/iommu.c |  2 +-
 arch/powerpc/platforms/powernv/npu-dma.c  |  8 
 arch/powerpc/platforms/powernv/pci-ioda.c |  4 ++--
 arch/powerpc/platforms/powernv/pci.c  |  2 +-
 arch/powerpc/platforms/powernv/pci.h  |  2 +-
 arch/powerpc/platforms/ps3/system-bus.c   | 18 +-
 arch/powerpc/platforms/pseries/iommu.c|  6 +++---
 arch/powerpc/sysdev/dart_iommu.c  |  2 +-
 16 files changed, 70 insertions(+), 71 deletions(-)

diff --git a/arch/powerpc/include/asm/dma-mapping.h 
b/arch/powerpc/include/asm/dma-mapping.h
index 77816acd4fd9..84e3f8dd5e4f 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -13,7 +13,6 @@
 /* need struct page definitions */
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -25,14 +24,14 @@
 /* Some dma direct funcs must be visible for use in other dma_ops */
 extern void *__dma_direct_alloc_coherent(struct device *dev, size_t size,
 dma_addr_t *dma_handle, gfp_t flag,
-struct dma_attrs *attrs);
+unsigned long attrs);
 extern void __dma_direct_free_coherent(struct device *dev, size_t size,
   void *vaddr, dma_addr_t dma_handle,
-  struct dma_attrs *attrs);
+  unsigned long attrs);
 extern int dma_direct_mmap_coherent(struct device *dev,
struct vm_area_struct *vma,
void *cpu_addr, dma_addr_t handle,
-   size_t size, struct dma_attrs *attrs);
+   size_t size, unsigned long attrs);
 
 #ifdef CONFIG_NOT_COHERENT_CACHE
 /*
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 7b87bab09564..760915241ce2 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -53,7 +53,7 @@ struct iommu_table_ops {
long index, long npages,
unsigned long uaddr,
enum dma_data_direction direction,
-   struct dma_attrs *attrs);
+   unsigned long attrs);
 #ifdef CONFIG_IOMMU_API
/*
 * Exchanges existing TCE with new TCE plus direction bits;
@@ -248,12 +248,12 @@ extern int ppc_iommu_map_sg(struct device *dev, struct 
iommu_table *tbl,
struct scatterlist *sglist, int nelems,
unsigned long mask,
enum dma_data_direction direction,
-   struct dma_attrs *attrs);
+   unsigned long attrs);
 extern void ppc_iommu_unmap_sg(struct iommu_table *tbl,
   struct scatterlist *sglist,
   int nelems,
   enum dma_data_direction direction,
-  struct dma_attrs *attrs);
+  unsigned long attrs);
 
 extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
  size_t size, dma_addr_t *dma_handle,
@@ -264,10 +264,10 @@ extern dma_addr_t iommu_map_page(struct device *dev, 
struct iommu_table *tbl,
 struct page *page, unsigned long offset,
 size_t size, unsigned long mask,
 enum dma_data_direction direction,
-struct dma_attrs *attrs);
+unsigned long attrs);
 extern void iommu_unmap_page(struct iommu_table *tbl, dma_addr_t dma_handle,
 size_t size, enum dma_data_direction direction,
-struct dma_attrs *attrs);
+unsigned long attrs);
 
 extern void iommu_init_early_pSeries(void);
 extern void iommu_init_early_dart(struct pci_controller_ops *controller_ops);
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 41a7d9d49a5a..fb7cbaa37658 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -18,7 +18,7 @@