The patch titled Subject: arm64: dma-mapping: use unsigned long for dma_attrs has been added to the -mm tree. Its filename is arm64-dma-mapping-use-unsigned-long-for-dma_attrs.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/arm64-dma-mapping-use-unsigned-long-for-dma_attrs.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/arm64-dma-mapping-use-unsigned-long-for-dma_attrs.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> Subject: arm64: dma-mapping: use unsigned long for dma_attrs Split out subsystem specific changes for easier reviews. This will be squashed with main commit. Link: http://lkml.kernel.org/r/1468399300-5399-6-git-send-email-k.kozlowski@xxxxxxxxxxx Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> [for arm64] Acked-by: Robin Murphy <robin.murphy@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arm64/mm/dma-mapping.c | 56 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff -puN arch/arm64/mm/dma-mapping.c~arm64-dma-mapping-use-unsigned-long-for-dma_attrs arch/arm64/mm/dma-mapping.c --- a/arch/arm64/mm/dma-mapping.c~arm64-dma-mapping-use-unsigned-long-for-dma_attrs +++ a/arch/arm64/mm/dma-mapping.c @@ -32,7 +32,7 @@ static int swiotlb __read_mostly; -static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot, +static pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot, bool coherent) { if (!coherent || dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) @@ -91,7 +91,7 @@ static int __free_from_pool(void *start, static void *__dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags, - struct dma_attrs *attrs) + unsigned long attrs) { if (dev == NULL) { WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); @@ -121,7 +121,7 @@ static void *__dma_alloc_coherent(struct static void __dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle, - struct dma_attrs *attrs) + unsigned long attrs) { bool freed; phys_addr_t paddr = dma_to_phys(dev, dma_handle); @@ -140,7 +140,7 @@ static void __dma_free_coherent(struct d static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags, - struct dma_attrs *attrs) + unsigned long attrs) { struct page *page; void *ptr, *coherent_ptr; @@ -188,7 +188,7 @@ no_mem: static void __dma_free(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle, - struct dma_attrs *attrs) + unsigned long attrs) { void *swiotlb_addr = phys_to_virt(dma_to_phys(dev, dma_handle)); @@ -205,7 +205,7 @@ static void __dma_free(struct device *de static dma_addr_t __swiotlb_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { dma_addr_t dev_addr; @@ -219,7 +219,7 @@ static dma_addr_t __swiotlb_map_page(str static void __swiotlb_unmap_page(struct device *dev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { if (!is_device_dma_coherent(dev)) __dma_unmap_area(phys_to_virt(dma_to_phys(dev, dev_addr)), size, dir); @@ -228,7 +228,7 @@ static void __swiotlb_unmap_page(struct static int __swiotlb_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { struct scatterlist *sg; int i, ret; @@ -245,7 +245,7 @@ static int __swiotlb_map_sg_attrs(struct static void __swiotlb_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { struct scatterlist *sg; int i; @@ -306,7 +306,7 @@ static void __swiotlb_sync_sg_for_device static int __swiotlb_mmap(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, - struct dma_attrs *attrs) + unsigned long attrs) { int ret = -ENXIO; unsigned long nr_vma_pages = (vma->vm_end - vma->vm_start) >> @@ -333,7 +333,7 @@ static int __swiotlb_mmap(struct device static int __swiotlb_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr, dma_addr_t handle, size_t size, - struct dma_attrs *attrs) + unsigned long attrs) { int ret = sg_alloc_table(sgt, 1, GFP_KERNEL); @@ -435,21 +435,21 @@ out: static void *__dummy_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags, - struct dma_attrs *attrs) + unsigned long attrs) { return NULL; } static void __dummy_free(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle, - struct dma_attrs *attrs) + unsigned long attrs) { } static int __dummy_mmap(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, - struct dma_attrs *attrs) + unsigned long attrs) { return -ENXIO; } @@ -457,20 +457,20 @@ static int __dummy_mmap(struct device *d static dma_addr_t __dummy_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { return DMA_ERROR_CODE; } static void __dummy_unmap_page(struct device *dev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { } static int __dummy_map_sg(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { return 0; } @@ -478,7 +478,7 @@ static int __dummy_map_sg(struct device static void __dummy_unmap_sg(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { } @@ -553,7 +553,7 @@ static void flush_page(struct device *de static void *__iommu_alloc_attrs(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, - struct dma_attrs *attrs) + unsigned long attrs) { bool coherent = is_device_dma_coherent(dev); int ioprot = dma_direction_to_prot(DMA_BIDIRECTIONAL, coherent); @@ -613,7 +613,7 @@ static void *__iommu_alloc_attrs(struct } static void __iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr, - dma_addr_t handle, struct dma_attrs *attrs) + dma_addr_t handle, unsigned long attrs) { size_t iosize = size; @@ -629,7 +629,7 @@ static void __iommu_free_attrs(struct de * Hence how dodgy the below logic looks... */ if (__in_atomic_pool(cpu_addr, size)) { - iommu_dma_unmap_page(dev, handle, iosize, 0, NULL); + iommu_dma_unmap_page(dev, handle, iosize, 0, 0); __free_from_pool(cpu_addr, size); } else if (is_vmalloc_addr(cpu_addr)){ struct vm_struct *area = find_vm_area(cpu_addr); @@ -639,14 +639,14 @@ static void __iommu_free_attrs(struct de iommu_dma_free(dev, area->pages, iosize, &handle); dma_common_free_remap(cpu_addr, size, VM_USERMAP); } else { - iommu_dma_unmap_page(dev, handle, iosize, 0, NULL); + iommu_dma_unmap_page(dev, handle, iosize, 0, 0); __free_pages(virt_to_page(cpu_addr), get_order(size)); } } static int __iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, - struct dma_attrs *attrs) + unsigned long attrs) { struct vm_struct *area; int ret; @@ -666,7 +666,7 @@ static int __iommu_mmap_attrs(struct dev static int __iommu_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr, dma_addr_t dma_addr, - size_t size, struct dma_attrs *attrs) + size_t size, unsigned long attrs) { unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; struct vm_struct *area = find_vm_area(cpu_addr); @@ -707,7 +707,7 @@ static void __iommu_sync_single_for_devi static dma_addr_t __iommu_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { bool coherent = is_device_dma_coherent(dev); int prot = dma_direction_to_prot(dir, coherent); @@ -722,7 +722,7 @@ static dma_addr_t __iommu_map_page(struc static void __iommu_unmap_page(struct device *dev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) __iommu_sync_single_for_cpu(dev, dev_addr, size, dir); @@ -760,7 +760,7 @@ static void __iommu_sync_sg_for_device(s static int __iommu_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { bool coherent = is_device_dma_coherent(dev); @@ -774,7 +774,7 @@ static int __iommu_map_sg_attrs(struct d static void __iommu_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, - struct dma_attrs *attrs) + unsigned long attrs) { if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) __iommu_sync_sg_for_cpu(dev, sgl, nelems, dir); _ Patches currently in -mm which might be from k.kozlowski@xxxxxxxxxxx are media-mtk-vcodec-remove-unused-dma_attrs.patch dma-mapping-use-unsigned-long-for-dma_attrs.patch alpha-dma-mapping-use-unsigned-long-for-dma_attrs.patch arc-dma-mapping-use-unsigned-long-for-dma_attrs.patch arm-dma-mapping-use-unsigned-long-for-dma_attrs.patch arm64-dma-mapping-use-unsigned-long-for-dma_attrs.patch avr32-dma-mapping-use-unsigned-long-for-dma_attrs.patch blackfin-dma-mapping-use-unsigned-long-for-dma_attrs.patch c6x-dma-mapping-use-unsigned-long-for-dma_attrs.patch cris-dma-mapping-use-unsigned-long-for-dma_attrs.patch frv-dma-mapping-use-unsigned-long-for-dma_attrs.patch drm-exynos-dma-mapping-use-unsigned-long-for-dma_attrs.patch drm-mediatek-dma-mapping-use-unsigned-long-for-dma_attrs.patch drm-msm-dma-mapping-use-unsigned-long-for-dma_attrs.patch drm-nouveau-dma-mapping-use-unsigned-long-for-dma_attrs.patch drm-rockship-dma-mapping-use-unsigned-long-for-dma_attrs.patch infiniband-dma-mapping-use-unsigned-long-for-dma_attrs.patch iommu-dma-mapping-use-unsigned-long-for-dma_attrs.patch media-dma-mapping-use-unsigned-long-for-dma_attrs.patch xen-dma-mapping-use-unsigned-long-for-dma_attrs.patch swiotlb-dma-mapping-use-unsigned-long-for-dma_attrs.patch powerpc-dma-mapping-use-unsigned-long-for-dma_attrs.patch video-dma-mapping-use-unsigned-long-for-dma_attrs.patch x86-dma-mapping-use-unsigned-long-for-dma_attrs.patch iommu-intel-dma-mapping-use-unsigned-long-for-dma_attrs.patch h8300-dma-mapping-use-unsigned-long-for-dma_attrs.patch hexagon-dma-mapping-use-unsigned-long-for-dma_attrs.patch ia64-dma-mapping-use-unsigned-long-for-dma_attrs.patch m68k-dma-mapping-use-unsigned-long-for-dma_attrs.patch metag-dma-mapping-use-unsigned-long-for-dma_attrs.patch microblaze-dma-mapping-use-unsigned-long-for-dma_attrs.patch mips-dma-mapping-use-unsigned-long-for-dma_attrs.patch mn10300-dma-mapping-use-unsigned-long-for-dma_attrs.patch nios2-dma-mapping-use-unsigned-long-for-dma_attrs.patch openrisc-dma-mapping-use-unsigned-long-for-dma_attrs.patch parisc-dma-mapping-use-unsigned-long-for-dma_attrs.patch misc-mic-dma-mapping-use-unsigned-long-for-dma_attrs.patch s390-dma-mapping-use-unsigned-long-for-dma_attrs.patch sh-dma-mapping-use-unsigned-long-for-dma_attrs.patch sparc-dma-mapping-use-unsigned-long-for-dma_attrs.patch tile-dma-mapping-use-unsigned-long-for-dma_attrs.patch unicore32-dma-mapping-use-unsigned-long-for-dma_attrs.patch xtensa-dma-mapping-use-unsigned-long-for-dma_attrs.patch remoteproc-qcom-use-unsigned-long-for-dma_attrs.patch dma-mapping-remove-dma_get_attr.patch dma-mapping-document-the-dma-attributes-next-to-the-declaration.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html