* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-mips, Krzysztof Kozlowski, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA, Krzysztof Kozlowski, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XcXa4x6EXUF0 Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ======== 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ======== 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ======== 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ====The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: linux-arm-kernel Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: linux-snps-arc Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, hch, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, linux-doc, linux-alpha, linux-snps-arc, linux-arm-kernel, xen-devel, linux-c6x-dev, linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k, linux-metag, linux-mips, linux-parisc, linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-pci, linux-xtensa, dri-devel, linux-samsung-soc, linux-mediatek, linux-arm-msm, freedreno, nouveau, linux-rockchip, linux-rdma, iommu, linux-media, linux-omap, linux-fbdev Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, hch, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, linux-doc, linux-alpha, linux-snps-arc, linux-arm-kernel, xen-devel, linux-c6x-dev, linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k, linux-metag, linux-mips, linux-parisc, linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-pci, linux-xtensa, dri-devel, linux-samsung-soc, linux-mediatek, linux-arm-msm, freedreno, nouveau, linux-rockchip, linux-rdma, iommu, linux-media, linux-omap, linux-fbdev Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA, Krzysztof Kozlowski, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XcXa4x6EXUF0 SGksCgoKVGhpcyBpcyBmaWZ0aCBhcHByb2FjaCBmb3IgcmVwbGFjaW5nIHN0cnVjdCBkbWFfYXR0 cnMgd2l0aCB1bnNpZ25lZApsb25nLgoKVGhlIG1haW4gcGF0Y2ggKDEvNDQpIGRvaW5nIHRoZSBj aGFuZ2UgaXMgc3BsaXQgaW50byBtYW55IHN1YnBhdGNoZXMKZm9yIGVhc2llciByZXZpZXcgKDIt NDIpLiAgVGhleSBzaG91bGQgYmUgc3F1YXNoZWQgdG9nZXRoZXIgd2hlbgphcHBseWluZy4KCgpS ZWJhc2VkIG9uIHY0LjctcmM1LgoKRm9yIGVhc2llciB0ZXN0aW5nIHRoZSBwYXRjaHNldCBpcyBh dmFpbGFibGUgaGVyZToKcmVwbzogICBodHRwczovL2dpdGh1Yi5jb20va3J6ay9saW51eApicmFu Y2g6IGZvci1uZXh0L2RtYS1hdHRycy1jb25zdC12NQoKCkNoYW5nZXMgc2luY2UgdjQKPT09PT09 PT09PT09PT09PQoxLiBDb2xsZWN0IHNvbWUgYWNrcy4gU3RpbGwgbmVlZCBtb3JlLgoyLiBNaW5v ciBmaXhlcyBwb2ludGVkIGJ5IFJvYmluIE11cnBoeS4KMy4gQXBwbGllZCBjaGFuZ2VzIGZyb20g QmFydCBWYW4gQXNzY2hlJ3MgY29tbWVudC4KNC4gTW9yZSB0ZXN0cyBhbmQgYnVpbGRzICh1c2lu ZyBodHRwczovL3d3dy5rZXJuZWwub3JnL3B1Yi90b29scy9jcm9zc3Rvb2wvKS4KCgpDaGFuZ2Vz IHNpbmNlIHYzCj09PT09PT09PT09PT09PT0KMS4gQ29sbGVjdCBzb21lIGFja3MuCjIuIERyb3Ag d3JvbmcgcGF0Y2ggMS80NSAoInBvd2VycGM6IGRtYS1tYXBwaW5nOiBEb24ndCBoYXJkLWNvZGUK ICAgdGhlIHZhbHVlIG9mIERNQV9BVFRSX1dFQUtfT1JERVJJTkciKS4KMy4gTWlub3IgZml4IHBv aW50ZWQgb3V0IGJ5IE1pY2hhZWwgRWxsZXJtYW4uCgoKQ2hhbmdlcyBzaW5jZSB2Mgo9PT09PT09 PT09PT09PT09CjEuIEZvbGxvdyBDaHJpc3RvcGggSGVsbHdpZydzIGNvbW1lbnRzIChkb24ndCB1 c2UgQklUIGFkZAogICBkb2N1bWVudGF0aW9uLCByZW1vdmUgZG1hX2dldF9hdHRyKS4KCgpSYXRp b25hbGUKPT09PT09PT09ClRoZSBkbWEtbWFwcGluZyBjb3JlIGFuZCB0aGUgaW1wbGVtZW50YXRp b25zIGRvIG5vdCBjaGFuZ2UgdGhlCkRNQSBhdHRyaWJ1dGVzIHBhc3NlZCBieSBwb2ludGVyLiAg VGh1cyB0aGUgcG9pbnRlciBjYW4gcG9pbnQgdG8gY29uc3QKZGF0YS4gIEhvd2V2ZXIgdGhlIGF0 dHJpYnV0ZXMgZG8gbm90IGhhdmUgdG8gYmUgYSBiaXRmaWVsZC4gSW5zdGVhZAp1bnNpZ25lZCBs b25nIHdpbGwgZG8gZmluZToKCjEuIFRoaXMgaXMganVzdCBzaW1wbGVyLiAgQm90aCBpbiB0ZXJt cyBvZiByZWFkaW5nIHRoZSBjb2RlIGFuZCBzZXR0aW5nCiAgIGF0dHJpYnV0ZXMuICBJbnN0ZWFk IG9mIGluaXRpYWxpemluZyBsb2NhbCBhdHRyaWJ1dGVzIG9uIHRoZSBzdGFjawogICBhbmQgcGFz c2luZyBwb2ludGVyIHRvIGl0IHRvIGRtYV9zZXRfYXR0cigpLCBqdXN0IHNldCB0aGUgYml0cy4K CjIuIEl0IGJyaW5ncyBzYWZlbmVzcyBhbmQgY2hlY2tpbmcgZm9yIGNvbnN0IGNvcnJlY3RuZXNz IGJlY2F1c2UgdGhlCiAgIGF0dHJpYnV0ZXMgYXJlIHBhc3NlZCBieSB2YWx1ZS4KCgpCZXN0IHJl Z2FyZHMsCktyenlzenRvZgoKCktyenlzenRvZiBLb3psb3dza2kgKDQ0KToKICBkbWEtbWFwcGlu ZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwogIGFscGhhOiBkbWEtbWFwcGluZzog VXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwogIGFyYzogZG1hLW1hcHBpbmc6IFVzZSB1 bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBBUk06IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWdu ZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgYXJtNjQ6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQg bG9uZyBmb3IgZG1hX2F0dHJzCiAgYXZyMzI6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9u ZyBmb3IgZG1hX2F0dHJzCiAgYmxhY2tmaW46IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9u ZyBmb3IgZG1hX2F0dHJzCiAgYzZ4OiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9y IGRtYV9hdHRycwogIGNyaXM6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1h X2F0dHJzCiAgZnJ2OiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRy cwogIGRybS9leHlub3M6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0 dHJzCiAgZHJtL21lZGlhdGVrOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRt YV9hdHRycwogIGRybS9tc206IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1h X2F0dHJzCiAgZHJtL25vdXZlYXU6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3Ig ZG1hX2F0dHJzCiAgZHJtL3JvY2tzaGlwOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcg Zm9yIGRtYV9hdHRycwogIGluZmluaWJhbmQ6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9u ZyBmb3IgZG1hX2F0dHJzCiAgaW9tbXU6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBm b3IgZG1hX2F0dHJzCiAgW21lZGlhXSBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9y IGRtYV9hdHRycwogIHhlbjogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFf YXR0cnMKICBzd2lvdGxiOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9h dHRycwogIHBvd2VycGM6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0 dHJzCiAgdmlkZW86IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJz CiAgeDg2OiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwogIGlv bW11OiBpbnRlbDogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMK ICBoODMwMDogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBo ZXhhZ29uOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwogIGlh NjQ6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgbTY4azog ZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBtZXRhZzogZG1h LW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBtaWNyb2JsYXplOiBk bWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwogIG1pcHM6IGRtYS1t YXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgbW4xMDMwMDogZG1hLW1h cHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBuaW9zMjogZG1hLW1hcHBp bmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBvcGVucmlzYzogZG1hLW1hcHBp bmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMKICBwYXJpc2M6IGRtYS1tYXBwaW5n OiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgbWlzYzogbWljOiBkbWEtbWFwcGlu ZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwogIHMzOTA6IGRtYS1tYXBwaW5nOiBV c2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgc2g6IGRtYS1tYXBwaW5nOiBVc2UgdW5z aWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgc3BhcmM6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWdu ZWQgbG9uZyBmb3IgZG1hX2F0dHJzCiAgdGlsZTogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBs b25nIGZvciBkbWFfYXR0cnMKICB1bmljb3JlMzI6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQg bG9uZyBmb3IgZG1hX2F0dHJzCiAgeHRlbnNhOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwogIGRtYS1tYXBwaW5nOiBSZW1vdmUgZG1hX2dldF9hdHRyCiAgZG1h LW1hcHBpbmc6IERvY3VtZW50IHRoZSBETUEgYXR0cmlidXRlcyBuZXh0IHRvIHRoZSBkZWNsYXJh dGlvbgoKIERvY3VtZW50YXRpb24vRE1BLUFQSS50eHQgICAgICAgICAgICAgICAgICAgICAgICAg IHwgIDMzICsrKy0tLQogRG9jdW1lbnRhdGlvbi9ETUEtYXR0cmlidXRlcy50eHQgICAgICAgICAg ICAgICAgICAgfCAgIDIgKy0KIGFyY2gvYWxwaGEvaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaCAg ICAgICAgICAgICAgIHwgICAyIC0KIGFyY2gvYWxwaGEva2VybmVsL3BjaS1ub29wLmMgICAgICAg ICAgICAgICAgICAgICAgIHwgICAyICstCiBhcmNoL2FscGhhL2tlcm5lbC9wY2lfaW9tbXUuYyAg ICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQogYXJjaC9hcmMvbW0vZG1hLmMgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KIGFyY2gvYXJtL2NvbW1vbi9kbWFib3Vu Y2UuYyAgICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICstCiBhcmNoL2FybS9pbmNsdWRlL2Fz bS9kbWEtbWFwcGluZy5oICAgICAgICAgICAgICAgICB8ICAxMyArLS0KIGFyY2gvYXJtL2luY2x1 ZGUvYXNtL3hlbi9wYWdlLWNvaGVyZW50LmggICAgICAgICAgIHwgIDE2ICstLQogYXJjaC9hcm0v bW0vZG1hLW1hcHBpbmcuYyAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxMTcgKysrKysrKysr LS0tLS0tLS0tLQogYXJjaC9hcm0veGVuL21tLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgfCAgIDggKy0KIGFyY2gvYXJtNjQvbW0vZG1hLW1hcHBpbmcuYyAgICAgICAgICAgICAg ICAgICAgICAgIHwgIDY2ICsrKysrLS0tLS0tCiBhcmNoL2F2cjMyL21tL2RtYS1jb2hlcmVudC5j ICAgICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQogYXJjaC9ibGFja2Zpbi9rZXJuZWwvZG1h LW1hcHBpbmcuYyAgICAgICAgICAgICAgICAgfCAgIDggKy0KIGFyY2gvYzZ4L2luY2x1ZGUvYXNt L2RtYS1tYXBwaW5nLmggICAgICAgICAgICAgICAgIHwgICA0ICstCiBhcmNoL2M2eC9rZXJuZWwv ZG1hLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgOSArLQogYXJjaC9jNngvbW0v ZG1hLWNvaGVyZW50LmMgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDQgKy0KIGFyY2gvY3Jp cy9hcmNoLXYzMi9kcml2ZXJzL3BjaS9kbWEuYyAgICAgICAgICAgICAgIHwgICA5ICstCiBhcmNo L2Zydi9tYjkzMDkwLW1iMDAvcGNpLWRtYS1ub21tdS5jICAgICAgICAgICAgICB8ICAgOCArLQog YXJjaC9mcnYvbWI5MzA5MC1tYjAwL3BjaS1kbWEuYyAgICAgICAgICAgICAgICAgICAgfCAgIDkg Ky0KIGFyY2gvaDgzMDAva2VybmVsL2RtYS5jICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwg ICA4ICstCiBhcmNoL2hleGFnb24vaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaCAgICAgICAgICAg ICB8ICAgMSAtCiBhcmNoL2hleGFnb24va2VybmVsL2RtYS5jICAgICAgICAgICAgICAgICAgICAg ICAgICB8ICAgOCArLQogYXJjaC9pYTY0L2hwL2NvbW1vbi9zYmFfaW9tbXUuYyAgICAgICAgICAg ICAgICAgICAgfCAgMjIgKystLQogYXJjaC9pYTY0L2luY2x1ZGUvYXNtL21hY2h2ZWMuaCAgICAg ICAgICAgICAgICAgICAgfCAgIDEgLQogYXJjaC9pYTY0L2tlcm5lbC9wY2ktc3dpb3RsYi5jICAg ICAgICAgICAgICAgICAgICAgfCAgIDQgKy0KIGFyY2gvaWE2NC9zbi9wY2kvcGNpX2RtYS5jICAg ICAgICAgICAgICAgICAgICAgICAgIHwgIDIyICsrLS0KIGFyY2gvbTY4ay9rZXJuZWwvZG1hLmMg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDEyICstCiBhcmNoL21ldGFnL2tlcm5lbC9k bWEuYyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAxNiArLS0KIGFyY2gvbWljcm9ibGF6 ZS9pbmNsdWRlL2FzbS9kbWEtbWFwcGluZy5oICAgICAgICAgIHwgICAxIC0KIGFyY2gvbWljcm9i bGF6ZS9rZXJuZWwvZG1hLmMgICAgICAgICAgICAgICAgICAgICAgIHwgIDEyICstCiBhcmNoL21p cHMvY2F2aXVtLW9jdGVvbi9kbWEtb2N0ZW9uLmMgICAgICAgICAgICAgICB8ICAgOCArLQogYXJj aC9taXBzL2xvb25nc29uNjQvY29tbW9uL2RtYS1zd2lvdGxiLmMgICAgICAgICAgfCAgMTAgKy0K IGFyY2gvbWlwcy9tbS9kbWEtZGVmYXVsdC5jICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDIw ICsrLS0KIGFyY2gvbWlwcy9uZXRsb2dpYy9jb21tb24vbmxtLWRtYS5jICAgICAgICAgICAgICAg IHwgICA0ICstCiBhcmNoL21uMTAzMDAvbW0vZG1hLWFsbG9jLmMgICAgICAgICAgICAgICAgICAg ICAgICB8ICAgOCArLQogYXJjaC9uaW9zMi9tbS9kbWEtbWFwcGluZy5jICAgICAgICAgICAgICAg ICAgICAgICAgfCAgMTIgKy0KIGFyY2gvb3BlbnJpc2Mva2VybmVsL2RtYS5jICAgICAgICAgICAg ICAgICAgICAgICAgIHwgIDIxICsrLS0KIGFyY2gvcGFyaXNjL2tlcm5lbC9wY2ktZG1hLmMgICAg ICAgICAgICAgICAgICAgICAgIHwgIDE4ICstLQogYXJjaC9wb3dlcnBjL2luY2x1ZGUvYXNtL2Rt YS1tYXBwaW5nLmggICAgICAgICAgICAgfCAgIDcgKy0KIGFyY2gvcG93ZXJwYy9pbmNsdWRlL2Fz bS9pb21tdS5oICAgICAgICAgICAgICAgICAgIHwgIDEwICstCiBhcmNoL3Bvd2VycGMva2VybmVs L2RtYS1pb21tdS5jICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQogYXJjaC9wb3dlcnBjL2tl cm5lbC9kbWEuYyAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTggKy0tCiBhcmNoL3Bvd2Vy cGMva2VybmVsL2libWVidXMuYyAgICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQogYXJjaC9w b3dlcnBjL2tlcm5lbC9pb21tdS5jICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KIGFy Y2gvcG93ZXJwYy9rZXJuZWwvdmlvLmMgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDEyICst CiBhcmNoL3Bvd2VycGMvcGxhdGZvcm1zL2NlbGwvaW9tbXUuYyAgICAgICAgICAgICAgICB8ICAy OCArKy0tLQogYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wYXNlbWkvaW9tbXUuYyAgICAgICAgICAg ICAgfCAgIDIgKy0KIGFyY2gvcG93ZXJwYy9wbGF0Zm9ybXMvcG93ZXJudi9ucHUtZG1hLmMgICAg ICAgICAgIHwgICA4ICstCiBhcmNoL3Bvd2VycGMvcGxhdGZvcm1zL3Bvd2VybnYvcGNpLWlvZGEu YyAgICAgICAgICB8ICAgNCArLQogYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L3BjaS5j ICAgICAgICAgICAgICAgfCAgIDIgKy0KIGFyY2gvcG93ZXJwYy9wbGF0Zm9ybXMvcG93ZXJudi9w Y2kuaCAgICAgICAgICAgICAgIHwgICAyICstCiBhcmNoL3Bvd2VycGMvcGxhdGZvcm1zL3BzMy9z eXN0ZW0tYnVzLmMgICAgICAgICAgICB8ICAxOCArLS0KIGFyY2gvcG93ZXJwYy9wbGF0Zm9ybXMv cHNlcmllcy9pb21tdS5jICAgICAgICAgICAgIHwgICA2ICstCiBhcmNoL3Bvd2VycGMvc3lzZGV2 L2RhcnRfaW9tbXUuYyAgICAgICAgICAgICAgICAgICB8ICAgMiArLQogYXJjaC9zMzkwL2luY2x1 ZGUvYXNtL2RtYS1tYXBwaW5nLmggICAgICAgICAgICAgICAgfCAgIDEgLQogYXJjaC9zMzkwL3Bj aS9wY2lfZG1hLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMjMgKystLQogYXJjaC9z aC9pbmNsdWRlL2FzbS9kbWEtbWFwcGluZy5oICAgICAgICAgICAgICAgICAgfCAgIDQgKy0KIGFy Y2gvc2gva2VybmVsL2RtYS1ub21tdS5jICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICst CiBhcmNoL3NoL21tL2NvbnNpc3RlbnQuYyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAg NCArLQogYXJjaC9zcGFyYy9rZXJuZWwvaW9tbXUuYyAgICAgICAgICAgICAgICAgICAgICAgICAg fCAgMTIgKy0KIGFyY2gvc3BhcmMva2VybmVsL2lvcG9ydC5jICAgICAgICAgICAgICAgICAgICAg ICAgIHwgIDI0ICsrLS0KIGFyY2gvc3BhcmMva2VybmVsL3BjaV9zdW40di5jICAgICAgICAgICAg ICAgICAgICAgIHwgIDEyICstCiBhcmNoL3RpbGUva2VybmVsL3BjaS1kbWEuYyAgICAgICAgICAg ICAgICAgICAgICAgICB8ICAyOCArKy0tLQogYXJjaC91bmljb3JlMzIvbW0vZG1hLXN3aW90bGIu YyAgICAgICAgICAgICAgICAgICAgfCAgIDQgKy0KIGFyY2gveDg2L2luY2x1ZGUvYXNtL2RtYS1t YXBwaW5nLmggICAgICAgICAgICAgICAgIHwgICA1ICstCiBhcmNoL3g4Ni9pbmNsdWRlL2FzbS9z d2lvdGxiLmggICAgICAgICAgICAgICAgICAgICB8ICAgNCArLQogYXJjaC94ODYvaW5jbHVkZS9h c20veGVuL3BhZ2UtY29oZXJlbnQuaCAgICAgICAgICAgfCAgIDkgKy0KIGFyY2gveDg2L2tlcm5l bC9hbWRfZ2FydF82NC5jICAgICAgICAgICAgICAgICAgICAgIHwgIDIwICsrLS0KIGFyY2gveDg2 L2tlcm5lbC9wY2ktY2FsZ2FyeV82NC5jICAgICAgICAgICAgICAgICAgIHwgIDE0ICstLQogYXJj aC94ODYva2VybmVsL3BjaS1kbWEuYyAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDQgKy0K IGFyY2gveDg2L2tlcm5lbC9wY2ktbm9tbXUuYyAgICAgICAgICAgICAgICAgICAgICAgIHwgICA0 ICstCiBhcmNoL3g4Ni9rZXJuZWwvcGNpLXN3aW90bGIuYyAgICAgICAgICAgICAgICAgICAgICB8 ICAgNCArLQogYXJjaC94ODYvcGNpL3N0YTJ4MTEtZml4dXAuYyAgICAgICAgICAgICAgICAgICAg ICAgfCAgIDIgKy0KIGFyY2gveDg2L3BjaS92bWQuYyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHwgIDE2ICstLQogYXJjaC94dGVuc2Eva2VybmVsL3BjaS1kbWEuYyAgICAgICAgICAg ICAgICAgICAgICAgfCAgMTIgKy0KIGRyaXZlcnMvZ3B1L2RybS9leHlub3MvZXh5bm9zX2RybV9m YmRldi5jICAgICAgICAgIHwgICAyICstCiBkcml2ZXJzL2dwdS9kcm0vZXh5bm9zL2V4eW5vc19k cm1fZzJkLmMgICAgICAgICAgICB8ICAxMiArLQogZHJpdmVycy9ncHUvZHJtL2V4eW5vcy9leHlu b3NfZHJtX2dlbS5jICAgICAgICAgICAgfCAgMjAgKystLQogZHJpdmVycy9ncHUvZHJtL2V4eW5v cy9leHlub3NfZHJtX2dlbS5oICAgICAgICAgICAgfCAgIDIgKy0KIGRyaXZlcnMvZ3B1L2RybS9t ZWRpYXRlay9tdGtfZHJtX2dlbS5jICAgICAgICAgICAgIHwgIDEzICstLQogZHJpdmVycy9ncHUv ZHJtL21lZGlhdGVrL210a19kcm1fZ2VtLmggICAgICAgICAgICAgfCAgIDIgKy0KIGRyaXZlcnMv Z3B1L2RybS9tc20vbXNtX2Rydi5jICAgICAgICAgICAgICAgICAgICAgIHwgIDEzICstLQogLi4u L2dwdS9kcm0vbm91dmVhdS9udmttL3N1YmRldi9pbnN0bWVtL2drMjBhLmMgICAgfCAgMTMgKy0t CiBkcml2ZXJzL2dwdS9kcm0vcm9ja2NoaXAvcm9ja2NoaXBfZHJtX2dlbS5jICAgICAgICB8ICAx NyArKy0KIGRyaXZlcnMvZ3B1L2RybS9yb2NrY2hpcC9yb2NrY2hpcF9kcm1fZ2VtLmggICAgICAg IHwgICAyICstCiBkcml2ZXJzL2luZmluaWJhbmQvY29yZS91bWVtLmMgICAgICAgICAgICAgICAg ICAgICB8ICAgNyArLQogZHJpdmVycy9pb21tdS9hbWRfaW9tbXUuYyAgICAgICAgICAgICAgICAg ICAgICAgICAgfCAgMTIgKy0KIGRyaXZlcnMvaW9tbXUvZG1hLWlvbW11LmMgICAgICAgICAgICAg ICAgICAgICAgICAgIHwgICA4ICstCiBkcml2ZXJzL2lvbW11L2ludGVsLWlvbW11LmMgICAgICAg ICAgICAgICAgICAgICAgICB8ICAxMiArLQogZHJpdmVycy9tZWRpYS9wbGF0Zm9ybS9zdGkvYmRp c3AvYmRpc3AtaHcuYyAgICAgICAgfCAgMjYgKystLS0KIGRyaXZlcnMvbWVkaWEvdjRsMi1jb3Jl L3ZpZGVvYnVmMi1kbWEtY29udGlnLmMgICAgIHwgIDMwICsrLS0tCiBkcml2ZXJzL21lZGlhL3Y0 bDItY29yZS92aWRlb2J1ZjItZG1hLXNnLmMgICAgICAgICB8ICAxOSArLS0KIGRyaXZlcnMvbWlz Yy9taWMvaG9zdC9taWNfYm9vdC5jICAgICAgICAgICAgICAgICAgIHwgIDIwICsrLS0KIGRyaXZl cnMvcGFyaXNjL2NjaW8tZG1hLmMgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDE2ICstLQog ZHJpdmVycy9wYXJpc2Mvc2JhX2lvbW11LmMgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTYg Ky0tCiBkcml2ZXJzL3ZpZGVvL2ZiZGV2L29tYXAyL29tYXBmYi9vbWFwZmItbWFpbi5jICAgICB8 ICAxMiArLQogZHJpdmVycy92aWRlby9mYmRldi9vbWFwMi9vbWFwZmIvb21hcGZiLmggICAgICAg ICAgfCAgIDMgKy0KIGRyaXZlcnMveGVuL3N3aW90bGIteGVuLmMgICAgICAgICAgICAgICAgICAg ICAgICAgIHwgIDE0ICstLQogaW5jbHVkZS9saW51eC9kbWEtYXR0cnMuaCAgICAgICAgICAgICAg ICAgICAgICAgICAgfCAgNzEgLS0tLS0tLS0tLS0tCiBpbmNsdWRlL2xpbnV4L2RtYS1pb21tdS5o ICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgNiArLQogaW5jbHVkZS9saW51eC9kbWEtbWFw cGluZy5oICAgICAgICAgICAgICAgICAgICAgICAgfCAxMjggKysrKysrKysrKysrKystLS0tLS0t CiBpbmNsdWRlL2xpbnV4L3N3aW90bGIuaCAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAx MCArLQogaW5jbHVkZS9tZWRpYS92aWRlb2J1ZjItZG1hLWNvbnRpZy5oICAgICAgICAgICAgICAg fCAgIDcgKy0KIGluY2x1ZGUvcmRtYS9pYl92ZXJicy5oICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHwgICA4ICstCiBpbmNsdWRlL3hlbi9zd2lvdGxiLXhlbi5oICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAxMiArLQogbGliL2RtYS1ub29wLmMgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgfCAgIDkgKy0KIGxpYi9zd2lvdGxiLmMgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHwgIDEzICsrLQogMTA4IGZpbGVzIGNoYW5nZWQsIDY4OSBpbnNlcnRp b25zKCspLCA3ODkgZGVsZXRpb25zKC0pCiBkZWxldGUgbW9kZSAxMDA2NDQgaW5jbHVkZS9saW51 eC9kbWEtYXR0cnMuaAoKLS0gCjEuOS4xCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fXwpGcmVlZHJlbm8gbWFpbGluZyBsaXN0CkZyZWVkcmVub0BsaXN0cy5m cmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0 aW5mby9mcmVlZHJlbm8K ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA, Krzysztof Kozlowski, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XcXa4x6EXUF0 Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 _______________________________________________ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs 2016-06-30 8:23 ` Krzysztof Kozlowski ` (5 preceding siblings ...) (?) @ 2016-07-12 12:16 ` Daniel Vetter -1 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <1467275019-30789-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>]
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs [not found] ` <1467275019-30789-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> ` (4 preceding siblings ...) (?) @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-cris-kernel-VrBV9hrLPhE, linux-parisc On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ======== > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ======== > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ======== > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ====> The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: linux-arm-kernel On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: linux-snps-arc On Thu, Jun 30, 2016@10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel, linux-parisc, linux-cris-kernel, freedreno, linux-kernel, iommu, linux-alpha, linuxppc-dev On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel, linux-parisc, linux-cris-kernel, freedreno, linux-kernel, iommu, linux-alpha, linuxppc-dev On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-cris-kernel-VrBV9hrLPhE, linux-parisc T24gVGh1LCBKdW4gMzAsIDIwMTYgYXQgMTA6MjM6MzlBTSArMDIwMCwgS3J6eXN6dG9mIEtvemxv d3NraSB3cm90ZToKPiBIaSwKPiAKPiAKPiBUaGlzIGlzIGZpZnRoIGFwcHJvYWNoIGZvciByZXBs YWNpbmcgc3RydWN0IGRtYV9hdHRycyB3aXRoIHVuc2lnbmVkCj4gbG9uZy4KPiAKPiBUaGUgbWFp biBwYXRjaCAoMS80NCkgZG9pbmcgdGhlIGNoYW5nZSBpcyBzcGxpdCBpbnRvIG1hbnkgc3VicGF0 Y2hlcwo+IGZvciBlYXNpZXIgcmV2aWV3ICgyLTQyKS4gIFRoZXkgc2hvdWxkIGJlIHNxdWFzaGVk IHRvZ2V0aGVyIHdoZW4KPiBhcHBseWluZy4KCkZvciBhbGwgdGhlIGRybSBkcml2ZXIgcGF0Y2hl czoKCkFja2VkLWJ5OiBEYW5pZWwgVmV0dGVyIDxkYW5pZWwudmV0dGVyQGZmd2xsLmNoPgoKU2hv dWxkIEkgcHVsbCB0aGVzZSBpbiB0aHJvdWdoIGRybS1taXNjLCBvciBkbyB5b3UgcHJlZmVyIHRv IG1lcmdlIHRoZW0KdGhyb3VnaCBhIHNwZWNpYWwgdG9waWMgYnJhbmNoICh3aXRoIGV2ZXJ5dGhp bmcgZWxzZSkgaW5zdGVhZCBvbiB5b3VyIG93bj8KLURhbmllbAoKPiAKPiAKPiBSZWJhc2VkIG9u IHY0LjctcmM1Lgo+IAo+IEZvciBlYXNpZXIgdGVzdGluZyB0aGUgcGF0Y2hzZXQgaXMgYXZhaWxh YmxlIGhlcmU6Cj4gcmVwbzogICBodHRwczovL2dpdGh1Yi5jb20va3J6ay9saW51eAo+IGJyYW5j aDogZm9yLW5leHQvZG1hLWF0dHJzLWNvbnN0LXY1Cj4gCj4gCj4gQ2hhbmdlcyBzaW5jZSB2NAo+ ID09PT09PT09PT09PT09PT0KPiAxLiBDb2xsZWN0IHNvbWUgYWNrcy4gU3RpbGwgbmVlZCBtb3Jl Lgo+IDIuIE1pbm9yIGZpeGVzIHBvaW50ZWQgYnkgUm9iaW4gTXVycGh5Lgo+IDMuIEFwcGxpZWQg Y2hhbmdlcyBmcm9tIEJhcnQgVmFuIEFzc2NoZSdzIGNvbW1lbnQuCj4gNC4gTW9yZSB0ZXN0cyBh bmQgYnVpbGRzICh1c2luZyBodHRwczovL3d3dy5rZXJuZWwub3JnL3B1Yi90b29scy9jcm9zc3Rv b2wvKS4KPiAKPiAKPiBDaGFuZ2VzIHNpbmNlIHYzCj4gPT09PT09PT09PT09PT09PQo+IDEuIENv bGxlY3Qgc29tZSBhY2tzLgo+IDIuIERyb3Agd3JvbmcgcGF0Y2ggMS80NSAoInBvd2VycGM6IGRt YS1tYXBwaW5nOiBEb24ndCBoYXJkLWNvZGUKPiAgICB0aGUgdmFsdWUgb2YgRE1BX0FUVFJfV0VB S19PUkRFUklORyIpLgo+IDMuIE1pbm9yIGZpeCBwb2ludGVkIG91dCBieSBNaWNoYWVsIEVsbGVy bWFuLgo+IAo+IAo+IENoYW5nZXMgc2luY2UgdjIKPiA9PT09PT09PT09PT09PT09Cj4gMS4gRm9s bG93IENocmlzdG9waCBIZWxsd2lnJ3MgY29tbWVudHMgKGRvbid0IHVzZSBCSVQgYWRkCj4gICAg ZG9jdW1lbnRhdGlvbiwgcmVtb3ZlIGRtYV9nZXRfYXR0cikuCj4gCj4gCj4gUmF0aW9uYWxlCj4g PT09PT09PT09Cj4gVGhlIGRtYS1tYXBwaW5nIGNvcmUgYW5kIHRoZSBpbXBsZW1lbnRhdGlvbnMg ZG8gbm90IGNoYW5nZSB0aGUKPiBETUEgYXR0cmlidXRlcyBwYXNzZWQgYnkgcG9pbnRlci4gIFRo dXMgdGhlIHBvaW50ZXIgY2FuIHBvaW50IHRvIGNvbnN0Cj4gZGF0YS4gIEhvd2V2ZXIgdGhlIGF0 dHJpYnV0ZXMgZG8gbm90IGhhdmUgdG8gYmUgYSBiaXRmaWVsZC4gSW5zdGVhZAo+IHVuc2lnbmVk IGxvbmcgd2lsbCBkbyBmaW5lOgo+IAo+IDEuIFRoaXMgaXMganVzdCBzaW1wbGVyLiAgQm90aCBp biB0ZXJtcyBvZiByZWFkaW5nIHRoZSBjb2RlIGFuZCBzZXR0aW5nCj4gICAgYXR0cmlidXRlcy4g IEluc3RlYWQgb2YgaW5pdGlhbGl6aW5nIGxvY2FsIGF0dHJpYnV0ZXMgb24gdGhlIHN0YWNrCj4g ICAgYW5kIHBhc3NpbmcgcG9pbnRlciB0byBpdCB0byBkbWFfc2V0X2F0dHIoKSwganVzdCBzZXQg dGhlIGJpdHMuCj4gCj4gMi4gSXQgYnJpbmdzIHNhZmVuZXNzIGFuZCBjaGVja2luZyBmb3IgY29u c3QgY29ycmVjdG5lc3MgYmVjYXVzZSB0aGUKPiAgICBhdHRyaWJ1dGVzIGFyZSBwYXNzZWQgYnkg dmFsdWUuCj4gCj4gCj4gQmVzdCByZWdhcmRzLAo+IEtyenlzenRvZgo+IAo+IAo+IEtyenlzenRv ZiBLb3psb3dza2kgKDQ0KToKPiAgIGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3Ig ZG1hX2F0dHJzCj4gICBhbHBoYTogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBk bWFfYXR0cnMKPiAgIGFyYzogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFf YXR0cnMKPiAgIEFSTTogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0 cnMKPiAgIGFybTY0OiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRy cwo+ICAgYXZyMzI6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJz Cj4gICBibGFja2ZpbjogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0 cnMKPiAgIGM2eDogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFfYXR0cnMK PiAgIGNyaXM6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCj4g ICBmcnY6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9uZyBmb3IgZG1hX2F0dHJzCj4gICBk cm0vZXh5bm9zOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9hdHRycwo+ ICAgZHJtL21lZGlhdGVrOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9yIGRtYV9h dHRycwo+ICAgZHJtL21zbTogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25nIGZvciBkbWFf YXR0cnMKPiAgIGRybS9ub3V2ZWF1OiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcgZm9y IGRtYV9hdHRycwo+ICAgZHJtL3JvY2tzaGlwOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwo+ICAgaW5maW5pYmFuZDogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25l ZCBsb25nIGZvciBkbWFfYXR0cnMKPiAgIGlvbW11OiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVk IGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgW21lZGlhXSBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVk IGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgeGVuOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwo+ICAgc3dpb3RsYjogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBs b25nIGZvciBkbWFfYXR0cnMKPiAgIHBvd2VycGM6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQg bG9uZyBmb3IgZG1hX2F0dHJzCj4gICB2aWRlbzogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBs b25nIGZvciBkbWFfYXR0cnMKPiAgIHg4NjogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBsb25n IGZvciBkbWFfYXR0cnMKPiAgIGlvbW11OiBpbnRlbDogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25l ZCBsb25nIGZvciBkbWFfYXR0cnMKPiAgIGg4MzAwOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVk IGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgaGV4YWdvbjogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25l ZCBsb25nIGZvciBkbWFfYXR0cnMKPiAgIGlhNjQ6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQg bG9uZyBmb3IgZG1hX2F0dHJzCj4gICBtNjhrOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwo+ICAgbWV0YWc6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9u ZyBmb3IgZG1hX2F0dHJzCj4gICBtaWNyb2JsYXplOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVk IGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgbWlwczogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBs b25nIGZvciBkbWFfYXR0cnMKPiAgIG1uMTAzMDA6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQg bG9uZyBmb3IgZG1hX2F0dHJzCj4gICBuaW9zMjogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25lZCBs b25nIGZvciBkbWFfYXR0cnMKPiAgIG9wZW5yaXNjOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVk IGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgcGFyaXNjOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVk IGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgbWlzYzogbWljOiBkbWEtbWFwcGluZzogVXNlIHVuc2ln bmVkIGxvbmcgZm9yIGRtYV9hdHRycwo+ICAgczM5MDogZG1hLW1hcHBpbmc6IFVzZSB1bnNpZ25l ZCBsb25nIGZvciBkbWFfYXR0cnMKPiAgIHNoOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwo+ICAgc3BhcmM6IGRtYS1tYXBwaW5nOiBVc2UgdW5zaWduZWQgbG9u ZyBmb3IgZG1hX2F0dHJzCj4gICB0aWxlOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxvbmcg Zm9yIGRtYV9hdHRycwo+ICAgdW5pY29yZTMyOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwo+ICAgeHRlbnNhOiBkbWEtbWFwcGluZzogVXNlIHVuc2lnbmVkIGxv bmcgZm9yIGRtYV9hdHRycwo+ICAgZG1hLW1hcHBpbmc6IFJlbW92ZSBkbWFfZ2V0X2F0dHIKPiAg IGRtYS1tYXBwaW5nOiBEb2N1bWVudCB0aGUgRE1BIGF0dHJpYnV0ZXMgbmV4dCB0byB0aGUgZGVj bGFyYXRpb24KPiAKPiAgRG9jdW1lbnRhdGlvbi9ETUEtQVBJLnR4dCAgICAgICAgICAgICAgICAg ICAgICAgICAgfCAgMzMgKysrLS0tCj4gIERvY3VtZW50YXRpb24vRE1BLWF0dHJpYnV0ZXMudHh0 ICAgICAgICAgICAgICAgICAgIHwgICAyICstCj4gIGFyY2gvYWxwaGEvaW5jbHVkZS9hc20vZG1h LW1hcHBpbmcuaCAgICAgICAgICAgICAgIHwgICAyIC0KPiAgYXJjaC9hbHBoYS9rZXJuZWwvcGNp LW5vb3AuYyAgICAgICAgICAgICAgICAgICAgICAgfCAgIDIgKy0KPiAgYXJjaC9hbHBoYS9rZXJu ZWwvcGNpX2lvbW11LmMgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KPiAgYXJjaC9hcmMv bW0vZG1hLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KPiAgYXJj aC9hcm0vY29tbW9uL2RtYWJvdW5jZS5jICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDQgKy0K PiAgYXJjaC9hcm0vaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaCAgICAgICAgICAgICAgICAgfCAg MTMgKy0tCj4gIGFyY2gvYXJtL2luY2x1ZGUvYXNtL3hlbi9wYWdlLWNvaGVyZW50LmggICAgICAg ICAgIHwgIDE2ICstLQo+ICBhcmNoL2FybS9tbS9kbWEtbWFwcGluZy5jICAgICAgICAgICAgICAg ICAgICAgICAgICB8IDExNyArKysrKysrKystLS0tLS0tLS0tCj4gIGFyY2gvYXJtL3hlbi9tbS5j ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA4ICstCj4gIGFyY2gvYXJtNjQv bW0vZG1hLW1hcHBpbmcuYyAgICAgICAgICAgICAgICAgICAgICAgIHwgIDY2ICsrKysrLS0tLS0t Cj4gIGFyY2gvYXZyMzIvbW0vZG1hLWNvaGVyZW50LmMgICAgICAgICAgICAgICAgICAgICAgIHwg IDEyICstCj4gIGFyY2gvYmxhY2tmaW4va2VybmVsL2RtYS1tYXBwaW5nLmMgICAgICAgICAgICAg ICAgIHwgICA4ICstCj4gIGFyY2gvYzZ4L2luY2x1ZGUvYXNtL2RtYS1tYXBwaW5nLmggICAgICAg ICAgICAgICAgIHwgICA0ICstCj4gIGFyY2gvYzZ4L2tlcm5lbC9kbWEuYyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHwgICA5ICstCj4gIGFyY2gvYzZ4L21tL2RtYS1jb2hlcmVudC5jICAg ICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICstCj4gIGFyY2gvY3Jpcy9hcmNoLXYzMi9kcml2 ZXJzL3BjaS9kbWEuYyAgICAgICAgICAgICAgIHwgICA5ICstCj4gIGFyY2gvZnJ2L21iOTMwOTAt bWIwMC9wY2ktZG1hLW5vbW11LmMgICAgICAgICAgICAgIHwgICA4ICstCj4gIGFyY2gvZnJ2L21i OTMwOTAtbWIwMC9wY2ktZG1hLmMgICAgICAgICAgICAgICAgICAgIHwgICA5ICstCj4gIGFyY2gv aDgzMDAva2VybmVsL2RtYS5jICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA4ICstCj4g IGFyY2gvaGV4YWdvbi9pbmNsdWRlL2FzbS9kbWEtbWFwcGluZy5oICAgICAgICAgICAgIHwgICAx IC0KPiAgYXJjaC9oZXhhZ29uL2tlcm5lbC9kbWEuYyAgICAgICAgICAgICAgICAgICAgICAgICAg fCAgIDggKy0KPiAgYXJjaC9pYTY0L2hwL2NvbW1vbi9zYmFfaW9tbXUuYyAgICAgICAgICAgICAg ICAgICAgfCAgMjIgKystLQo+ICBhcmNoL2lhNjQvaW5jbHVkZS9hc20vbWFjaHZlYy5oICAgICAg ICAgICAgICAgICAgICB8ICAgMSAtCj4gIGFyY2gvaWE2NC9rZXJuZWwvcGNpLXN3aW90bGIuYyAg ICAgICAgICAgICAgICAgICAgIHwgICA0ICstCj4gIGFyY2gvaWE2NC9zbi9wY2kvcGNpX2RtYS5j ICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDIyICsrLS0KPiAgYXJjaC9tNjhrL2tlcm5lbC9k bWEuYyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KPiAgYXJjaC9tZXRhZy9r ZXJuZWwvZG1hLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTYgKy0tCj4gIGFyY2gv bWljcm9ibGF6ZS9pbmNsdWRlL2FzbS9kbWEtbWFwcGluZy5oICAgICAgICAgIHwgICAxIC0KPiAg YXJjaC9taWNyb2JsYXplL2tlcm5lbC9kbWEuYyAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIg Ky0KPiAgYXJjaC9taXBzL2Nhdml1bS1vY3Rlb24vZG1hLW9jdGVvbi5jICAgICAgICAgICAgICAg fCAgIDggKy0KPiAgYXJjaC9taXBzL2xvb25nc29uNjQvY29tbW9uL2RtYS1zd2lvdGxiLmMgICAg ICAgICAgfCAgMTAgKy0KPiAgYXJjaC9taXBzL21tL2RtYS1kZWZhdWx0LmMgICAgICAgICAgICAg ICAgICAgICAgICAgfCAgMjAgKystLQo+ICBhcmNoL21pcHMvbmV0bG9naWMvY29tbW9uL25sbS1k bWEuYyAgICAgICAgICAgICAgICB8ICAgNCArLQo+ICBhcmNoL21uMTAzMDAvbW0vZG1hLWFsbG9j LmMgICAgICAgICAgICAgICAgICAgICAgICB8ICAgOCArLQo+ICBhcmNoL25pb3MyL21tL2RtYS1t YXBwaW5nLmMgICAgICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQo+ICBhcmNoL29wZW5yaXNj L2tlcm5lbC9kbWEuYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAyMSArKy0tCj4gIGFyY2gv cGFyaXNjL2tlcm5lbC9wY2ktZG1hLmMgICAgICAgICAgICAgICAgICAgICAgIHwgIDE4ICstLQo+ ICBhcmNoL3Bvd2VycGMvaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaCAgICAgICAgICAgICB8ICAg NyArLQo+ICBhcmNoL3Bvd2VycGMvaW5jbHVkZS9hc20vaW9tbXUuaCAgICAgICAgICAgICAgICAg ICB8ICAxMCArLQo+ICBhcmNoL3Bvd2VycGMva2VybmVsL2RtYS1pb21tdS5jICAgICAgICAgICAg ICAgICAgICB8ICAxMiArLQo+ICBhcmNoL3Bvd2VycGMva2VybmVsL2RtYS5jICAgICAgICAgICAg ICAgICAgICAgICAgICB8ICAxOCArLS0KPiAgYXJjaC9wb3dlcnBjL2tlcm5lbC9pYm1lYnVzLmMg ICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KPiAgYXJjaC9wb3dlcnBjL2tlcm5lbC9pb21t dS5jICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KPiAgYXJjaC9wb3dlcnBjL2tlcm5l bC92aW8uYyAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTIgKy0KPiAgYXJjaC9wb3dlcnBj L3BsYXRmb3Jtcy9jZWxsL2lvbW11LmMgICAgICAgICAgICAgICAgfCAgMjggKystLS0KPiAgYXJj aC9wb3dlcnBjL3BsYXRmb3Jtcy9wYXNlbWkvaW9tbXUuYyAgICAgICAgICAgICAgfCAgIDIgKy0K PiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L25wdS1kbWEuYyAgICAgICAgICAgfCAg IDggKy0KPiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L3BjaS1pb2RhLmMgICAgICAg ICAgfCAgIDQgKy0KPiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L3BjaS5jICAgICAg ICAgICAgICAgfCAgIDIgKy0KPiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L3BjaS5o ICAgICAgICAgICAgICAgfCAgIDIgKy0KPiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wczMvc3lz dGVtLWJ1cy5jICAgICAgICAgICAgfCAgMTggKy0tCj4gIGFyY2gvcG93ZXJwYy9wbGF0Zm9ybXMv cHNlcmllcy9pb21tdS5jICAgICAgICAgICAgIHwgICA2ICstCj4gIGFyY2gvcG93ZXJwYy9zeXNk ZXYvZGFydF9pb21tdS5jICAgICAgICAgICAgICAgICAgIHwgICAyICstCj4gIGFyY2gvczM5MC9p bmNsdWRlL2FzbS9kbWEtbWFwcGluZy5oICAgICAgICAgICAgICAgIHwgICAxIC0KPiAgYXJjaC9z MzkwL3BjaS9wY2lfZG1hLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMjMgKystLQo+ ICBhcmNoL3NoL2luY2x1ZGUvYXNtL2RtYS1tYXBwaW5nLmggICAgICAgICAgICAgICAgICB8ICAg NCArLQo+ICBhcmNoL3NoL2tlcm5lbC9kbWEtbm9tbXUuYyAgICAgICAgICAgICAgICAgICAgICAg ICB8ICAgNCArLQo+ICBhcmNoL3NoL21tL2NvbnNpc3RlbnQuYyAgICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAgNCArLQo+ICBhcmNoL3NwYXJjL2tlcm5lbC9pb21tdS5jICAgICAgICAgICAg ICAgICAgICAgICAgICB8ICAxMiArLQo+ICBhcmNoL3NwYXJjL2tlcm5lbC9pb3BvcnQuYyAgICAg ICAgICAgICAgICAgICAgICAgICB8ICAyNCArKy0tCj4gIGFyY2gvc3BhcmMva2VybmVsL3BjaV9z dW40di5jICAgICAgICAgICAgICAgICAgICAgIHwgIDEyICstCj4gIGFyY2gvdGlsZS9rZXJuZWwv cGNpLWRtYS5jICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDI4ICsrLS0tCj4gIGFyY2gvdW5p Y29yZTMyL21tL2RtYS1zd2lvdGxiLmMgICAgICAgICAgICAgICAgICAgIHwgICA0ICstCj4gIGFy Y2gveDg2L2luY2x1ZGUvYXNtL2RtYS1tYXBwaW5nLmggICAgICAgICAgICAgICAgIHwgICA1ICst Cj4gIGFyY2gveDg2L2luY2x1ZGUvYXNtL3N3aW90bGIuaCAgICAgICAgICAgICAgICAgICAgIHwg ICA0ICstCj4gIGFyY2gveDg2L2luY2x1ZGUvYXNtL3hlbi9wYWdlLWNvaGVyZW50LmggICAgICAg ICAgIHwgICA5ICstCj4gIGFyY2gveDg2L2tlcm5lbC9hbWRfZ2FydF82NC5jICAgICAgICAgICAg ICAgICAgICAgIHwgIDIwICsrLS0KPiAgYXJjaC94ODYva2VybmVsL3BjaS1jYWxnYXJ5XzY0LmMg ICAgICAgICAgICAgICAgICAgfCAgMTQgKy0tCj4gIGFyY2gveDg2L2tlcm5lbC9wY2ktZG1hLmMg ICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICstCj4gIGFyY2gveDg2L2tlcm5lbC9wY2kt bm9tbXUuYyAgICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICstCj4gIGFyY2gveDg2L2tlcm5l bC9wY2ktc3dpb3RsYi5jICAgICAgICAgICAgICAgICAgICAgIHwgICA0ICstCj4gIGFyY2gveDg2 L3BjaS9zdGEyeDExLWZpeHVwLmMgICAgICAgICAgICAgICAgICAgICAgIHwgICAyICstCj4gIGFy Y2gveDg2L3BjaS92bWQuYyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDE2ICst LQo+ICBhcmNoL3h0ZW5zYS9rZXJuZWwvcGNpLWRtYS5jICAgICAgICAgICAgICAgICAgICAgICB8 ICAxMiArLQo+ICBkcml2ZXJzL2dwdS9kcm0vZXh5bm9zL2V4eW5vc19kcm1fZmJkZXYuYyAgICAg ICAgICB8ICAgMiArLQo+ICBkcml2ZXJzL2dwdS9kcm0vZXh5bm9zL2V4eW5vc19kcm1fZzJkLmMg ICAgICAgICAgICB8ICAxMiArLQo+ICBkcml2ZXJzL2dwdS9kcm0vZXh5bm9zL2V4eW5vc19kcm1f Z2VtLmMgICAgICAgICAgICB8ICAyMCArKy0tCj4gIGRyaXZlcnMvZ3B1L2RybS9leHlub3MvZXh5 bm9zX2RybV9nZW0uaCAgICAgICAgICAgIHwgICAyICstCj4gIGRyaXZlcnMvZ3B1L2RybS9tZWRp YXRlay9tdGtfZHJtX2dlbS5jICAgICAgICAgICAgIHwgIDEzICstLQo+ICBkcml2ZXJzL2dwdS9k cm0vbWVkaWF0ZWsvbXRrX2RybV9nZW0uaCAgICAgICAgICAgICB8ICAgMiArLQo+ICBkcml2ZXJz L2dwdS9kcm0vbXNtL21zbV9kcnYuYyAgICAgICAgICAgICAgICAgICAgICB8ICAxMyArLS0KPiAg Li4uL2dwdS9kcm0vbm91dmVhdS9udmttL3N1YmRldi9pbnN0bWVtL2drMjBhLmMgICAgfCAgMTMg Ky0tCj4gIGRyaXZlcnMvZ3B1L2RybS9yb2NrY2hpcC9yb2NrY2hpcF9kcm1fZ2VtLmMgICAgICAg IHwgIDE3ICsrLQo+ICBkcml2ZXJzL2dwdS9kcm0vcm9ja2NoaXAvcm9ja2NoaXBfZHJtX2dlbS5o ICAgICAgICB8ICAgMiArLQo+ICBkcml2ZXJzL2luZmluaWJhbmQvY29yZS91bWVtLmMgICAgICAg ICAgICAgICAgICAgICB8ICAgNyArLQo+ICBkcml2ZXJzL2lvbW11L2FtZF9pb21tdS5jICAgICAg ICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQo+ICBkcml2ZXJzL2lvbW11L2RtYS1pb21tdS5j ICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgOCArLQo+ICBkcml2ZXJzL2lvbW11L2ludGVs LWlvbW11LmMgICAgICAgICAgICAgICAgICAgICAgICB8ICAxMiArLQo+ICBkcml2ZXJzL21lZGlh L3BsYXRmb3JtL3N0aS9iZGlzcC9iZGlzcC1ody5jICAgICAgICB8ICAyNiArKy0tLQo+ICBkcml2 ZXJzL21lZGlhL3Y0bDItY29yZS92aWRlb2J1ZjItZG1hLWNvbnRpZy5jICAgICB8ICAzMCArKy0t LQo+ICBkcml2ZXJzL21lZGlhL3Y0bDItY29yZS92aWRlb2J1ZjItZG1hLXNnLmMgICAgICAgICB8 ICAxOSArLS0KPiAgZHJpdmVycy9taXNjL21pYy9ob3N0L21pY19ib290LmMgICAgICAgICAgICAg ICAgICAgfCAgMjAgKystLQo+ICBkcml2ZXJzL3BhcmlzYy9jY2lvLWRtYS5jICAgICAgICAgICAg ICAgICAgICAgICAgICB8ICAxNiArLS0KPiAgZHJpdmVycy9wYXJpc2Mvc2JhX2lvbW11LmMgICAg ICAgICAgICAgICAgICAgICAgICAgfCAgMTYgKy0tCj4gIGRyaXZlcnMvdmlkZW8vZmJkZXYvb21h cDIvb21hcGZiL29tYXBmYi1tYWluLmMgICAgIHwgIDEyICstCj4gIGRyaXZlcnMvdmlkZW8vZmJk ZXYvb21hcDIvb21hcGZiL29tYXBmYi5oICAgICAgICAgIHwgICAzICstCj4gIGRyaXZlcnMveGVu L3N3aW90bGIteGVuLmMgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDE0ICstLQo+ICBpbmNs dWRlL2xpbnV4L2RtYS1hdHRycy5oICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA3MSAtLS0t LS0tLS0tLS0KPiAgaW5jbHVkZS9saW51eC9kbWEtaW9tbXUuaCAgICAgICAgICAgICAgICAgICAg ICAgICAgfCAgIDYgKy0KPiAgaW5jbHVkZS9saW51eC9kbWEtbWFwcGluZy5oICAgICAgICAgICAg ICAgICAgICAgICAgfCAxMjggKysrKysrKysrKysrKystLS0tLS0tCj4gIGluY2x1ZGUvbGludXgv c3dpb3RsYi5oICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDEwICstCj4gIGluY2x1ZGUv bWVkaWEvdmlkZW9idWYyLWRtYS1jb250aWcuaCAgICAgICAgICAgICAgIHwgICA3ICstCj4gIGlu Y2x1ZGUvcmRtYS9pYl92ZXJicy5oICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA4ICst Cj4gIGluY2x1ZGUveGVuL3N3aW90bGIteGVuLmggICAgICAgICAgICAgICAgICAgICAgICAgIHwg IDEyICstCj4gIGxpYi9kbWEtbm9vcC5jICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHwgICA5ICstCj4gIGxpYi9zd2lvdGxiLmMgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHwgIDEzICsrLQo+ICAxMDggZmlsZXMgY2hhbmdlZCwgNjg5IGluc2VydGlvbnMo KyksIDc4OSBkZWxldGlvbnMoLSkKPiAgZGVsZXRlIG1vZGUgMTAwNjQ0IGluY2x1ZGUvbGludXgv ZG1hLWF0dHJzLmgKPiAKPiAtLSAKPiAxLjkuMQo+IAo+IF9fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fCj4gZHJpLWRldmVsIG1haWxpbmcgbGlzdAo+IGRyaS1k ZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKPiBodHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9y Zy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZlbAoKLS0gCkRhbmllbCBWZXR0ZXIKU29mdHdhcmUg RW5naW5lZXIsIEludGVsIENvcnBvcmF0aW9uCmh0dHA6Ly9ibG9nLmZmd2xsLmNoCl9fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkZyZWVkcmVubyBtYWlsaW5n IGxpc3QKRnJlZWRyZW5vQGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRwczovL2xpc3RzLmZyZWVk ZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2ZyZWVkcmVubwo= ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:16 ` Daniel Vetter 0 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-cris-kernel-VrBV9hrLPhE, linux-parisc On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs 2016-07-12 12:16 ` Daniel Vetter ` (5 preceding siblings ...) (?) @ 2016-07-12 12:19 ` Krzysztof Kozlowski -1 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs 2016-07-12 12:16 ` Daniel Vetter ` (6 preceding siblings ...) (?) @ 2016-07-12 12:19 ` Krzysztof Kozlowski -1 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20160712121625.GP23520-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>]
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs [not found] ` <20160712121625.GP23520-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org> @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips-6z/3iImG2C8G8FEW9MqTrA, linux-ia64-u79uwXL29TY76Z2rM5mHXA, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-fbdev-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, sparclinux-u79uwXL29TY76Z2rM5mHXA, linux-s390-u79uwXL29TY76Z2rM5mHXA, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-hexagon-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Bartlomiej Zolnierkiewicz, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-metag-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter-/w4YWyX8dFk@public.gmane.org> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs 2016-07-12 12:16 ` Daniel Vetter ` (4 preceding siblings ...) (?) @ 2016-07-12 12:19 ` Krzysztof Kozlowski -1 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: linux-arm-kernel On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: linux-snps-arc On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016@10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel, linux-parisc, linux-cris-kernel, freedreno, linux-kernel, iommu, linux-alpha, linuxppc-dev On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel, linux-parisc, linux-cris-kernel, freedreno, linux-kernel, iommu, linux-alpha, linuxppc-dev On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-07-12 12:19 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-07-12 12:19 UTC (permalink / raw) To: Andrew Morton, linux-mips, linux-ia64, linux-doc, linux-pci, linux-fbdev, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel On 07/12/2016 02:16 PM, Daniel Vetter wrote: > On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> >> This is fifth approach for replacing struct dma_attrs with unsigned >> long. >> >> The main patch (1/44) doing the change is split into many subpatches >> for easier review (2-42). They should be squashed together when >> applying. > > For all the drm driver patches: > > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Should I pull these in through drm-misc, or do you prefer to merge them > through a special topic branch (with everything else) instead on your own? > -Daniel Thanks. I saw today that Andrew Morton applied the patchset so I think he will handle it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs 2016-06-30 8:23 ` Krzysztof Kozlowski ` (7 preceding siblings ...) (?) @ 2016-07-12 12:16 ` Daniel Vetter -1 siblings, 0 replies; 28+ messages in thread From: Daniel Vetter @ 2016-07-12 12:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-mips, linux-fbdev, linux-ia64, linux-doc, linux-pci, dri-devel, sparclinux, linux-s390, linux-samsung-soc, linux-c6x-dev, linux-rdma, linux-hexagon, linux-sh, hch, linux-rockchip, nouveau, xen-devel, linux-snps-arc, linux-media, linux-xtensa, Bartlomiej Zolnierkiewicz, linux-arm-msm, linux-m68k, linux-mediatek, linux-omap, linux-metag, linux-arm-kernel, linux-cris-kernel, linux-parisc On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote: > Hi, > > > This is fifth approach for replacing struct dma_attrs with unsigned > long. > > The main patch (1/44) doing the change is split into many subpatches > for easier review (2-42). They should be squashed together when > applying. For all the drm driver patches: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Should I pull these in through drm-misc, or do you prefer to merge them through a special topic branch (with everything else) instead on your own? -Daniel > > > Rebased on v4.7-rc5. > > For easier testing the patchset is available here: > repo: https://github.com/krzk/linux > branch: for-next/dma-attrs-const-v5 > > > Changes since v4 > ================ > 1. Collect some acks. Still need more. > 2. Minor fixes pointed by Robin Murphy. > 3. Applied changes from Bart Van Assche's comment. > 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). > > > Changes since v3 > ================ > 1. Collect some acks. > 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code > the value of DMA_ATTR_WEAK_ORDERING"). > 3. Minor fix pointed out by Michael Ellerman. > > > Changes since v2 > ================ > 1. Follow Christoph Hellwig's comments (don't use BIT add > documentation, remove dma_get_attr). > > > Rationale > ========= > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will do fine: > > 1. This is just simpler. Both in terms of reading the code and setting > attributes. Instead of initializing local attributes on the stack > and passing pointer to it to dma_set_attr(), just set the bits. > > 2. It brings safeness and checking for const correctness because the > attributes are passed by value. > > > Best regards, > Krzysztof > > > Krzysztof Kozlowski (44): > dma-mapping: Use unsigned long for dma_attrs > alpha: dma-mapping: Use unsigned long for dma_attrs > arc: dma-mapping: Use unsigned long for dma_attrs > ARM: dma-mapping: Use unsigned long for dma_attrs > arm64: dma-mapping: Use unsigned long for dma_attrs > avr32: dma-mapping: Use unsigned long for dma_attrs > blackfin: dma-mapping: Use unsigned long for dma_attrs > c6x: dma-mapping: Use unsigned long for dma_attrs > cris: dma-mapping: Use unsigned long for dma_attrs > frv: dma-mapping: Use unsigned long for dma_attrs > drm/exynos: dma-mapping: Use unsigned long for dma_attrs > drm/mediatek: dma-mapping: Use unsigned long for dma_attrs > drm/msm: dma-mapping: Use unsigned long for dma_attrs > drm/nouveau: dma-mapping: Use unsigned long for dma_attrs > drm/rockship: dma-mapping: Use unsigned long for dma_attrs > infiniband: dma-mapping: Use unsigned long for dma_attrs > iommu: dma-mapping: Use unsigned long for dma_attrs > [media] dma-mapping: Use unsigned long for dma_attrs > xen: dma-mapping: Use unsigned long for dma_attrs > swiotlb: dma-mapping: Use unsigned long for dma_attrs > powerpc: dma-mapping: Use unsigned long for dma_attrs > video: dma-mapping: Use unsigned long for dma_attrs > x86: dma-mapping: Use unsigned long for dma_attrs > iommu: intel: dma-mapping: Use unsigned long for dma_attrs > h8300: dma-mapping: Use unsigned long for dma_attrs > hexagon: dma-mapping: Use unsigned long for dma_attrs > ia64: dma-mapping: Use unsigned long for dma_attrs > m68k: dma-mapping: Use unsigned long for dma_attrs > metag: dma-mapping: Use unsigned long for dma_attrs > microblaze: dma-mapping: Use unsigned long for dma_attrs > mips: dma-mapping: Use unsigned long for dma_attrs > mn10300: dma-mapping: Use unsigned long for dma_attrs > nios2: dma-mapping: Use unsigned long for dma_attrs > openrisc: dma-mapping: Use unsigned long for dma_attrs > parisc: dma-mapping: Use unsigned long for dma_attrs > misc: mic: dma-mapping: Use unsigned long for dma_attrs > s390: dma-mapping: Use unsigned long for dma_attrs > sh: dma-mapping: Use unsigned long for dma_attrs > sparc: dma-mapping: Use unsigned long for dma_attrs > tile: dma-mapping: Use unsigned long for dma_attrs > unicore32: dma-mapping: Use unsigned long for dma_attrs > xtensa: dma-mapping: Use unsigned long for dma_attrs > dma-mapping: Remove dma_get_attr > dma-mapping: Document the DMA attributes next to the declaration > > Documentation/DMA-API.txt | 33 +++--- > Documentation/DMA-attributes.txt | 2 +- > arch/alpha/include/asm/dma-mapping.h | 2 - > arch/alpha/kernel/pci-noop.c | 2 +- > arch/alpha/kernel/pci_iommu.c | 12 +- > arch/arc/mm/dma.c | 12 +- > arch/arm/common/dmabounce.c | 4 +- > arch/arm/include/asm/dma-mapping.h | 13 +-- > arch/arm/include/asm/xen/page-coherent.h | 16 +-- > arch/arm/mm/dma-mapping.c | 117 +++++++++---------- > arch/arm/xen/mm.c | 8 +- > arch/arm64/mm/dma-mapping.c | 66 +++++------ > arch/avr32/mm/dma-coherent.c | 12 +- > arch/blackfin/kernel/dma-mapping.c | 8 +- > arch/c6x/include/asm/dma-mapping.h | 4 +- > arch/c6x/kernel/dma.c | 9 +- > arch/c6x/mm/dma-coherent.c | 4 +- > arch/cris/arch-v32/drivers/pci/dma.c | 9 +- > arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- > arch/frv/mb93090-mb00/pci-dma.c | 9 +- > arch/h8300/kernel/dma.c | 8 +- > arch/hexagon/include/asm/dma-mapping.h | 1 - > arch/hexagon/kernel/dma.c | 8 +- > arch/ia64/hp/common/sba_iommu.c | 22 ++-- > arch/ia64/include/asm/machvec.h | 1 - > arch/ia64/kernel/pci-swiotlb.c | 4 +- > arch/ia64/sn/pci/pci_dma.c | 22 ++-- > arch/m68k/kernel/dma.c | 12 +- > arch/metag/kernel/dma.c | 16 +-- > arch/microblaze/include/asm/dma-mapping.h | 1 - > arch/microblaze/kernel/dma.c | 12 +- > arch/mips/cavium-octeon/dma-octeon.c | 8 +- > arch/mips/loongson64/common/dma-swiotlb.c | 10 +- > arch/mips/mm/dma-default.c | 20 ++-- > arch/mips/netlogic/common/nlm-dma.c | 4 +- > arch/mn10300/mm/dma-alloc.c | 8 +- > arch/nios2/mm/dma-mapping.c | 12 +- > arch/openrisc/kernel/dma.c | 21 ++-- > arch/parisc/kernel/pci-dma.c | 18 +-- > 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 | 28 ++--- > 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 +- > arch/s390/include/asm/dma-mapping.h | 1 - > arch/s390/pci/pci_dma.c | 23 ++-- > arch/sh/include/asm/dma-mapping.h | 4 +- > arch/sh/kernel/dma-nommu.c | 4 +- > arch/sh/mm/consistent.c | 4 +- > arch/sparc/kernel/iommu.c | 12 +- > arch/sparc/kernel/ioport.c | 24 ++-- > arch/sparc/kernel/pci_sun4v.c | 12 +- > arch/tile/kernel/pci-dma.c | 28 ++--- > arch/unicore32/mm/dma-swiotlb.c | 4 +- > arch/x86/include/asm/dma-mapping.h | 5 +- > arch/x86/include/asm/swiotlb.h | 4 +- > arch/x86/include/asm/xen/page-coherent.h | 9 +- > arch/x86/kernel/amd_gart_64.c | 20 ++-- > arch/x86/kernel/pci-calgary_64.c | 14 +-- > arch/x86/kernel/pci-dma.c | 4 +- > arch/x86/kernel/pci-nommu.c | 4 +- > arch/x86/kernel/pci-swiotlb.c | 4 +- > arch/x86/pci/sta2x11-fixup.c | 2 +- > arch/x86/pci/vmd.c | 16 +-- > arch/xtensa/kernel/pci-dma.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- > drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- > drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- > drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- > drivers/gpu/drm/msm/msm_drv.c | 13 +-- > .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- > drivers/infiniband/core/umem.c | 7 +- > drivers/iommu/amd_iommu.c | 12 +- > drivers/iommu/dma-iommu.c | 8 +- > drivers/iommu/intel-iommu.c | 12 +- > drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- > drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- > drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- > drivers/misc/mic/host/mic_boot.c | 20 ++-- > drivers/parisc/ccio-dma.c | 16 +-- > drivers/parisc/sba_iommu.c | 16 +-- > drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- > drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- > drivers/xen/swiotlb-xen.c | 14 +-- > include/linux/dma-attrs.h | 71 ------------ > include/linux/dma-iommu.h | 6 +- > include/linux/dma-mapping.h | 128 ++++++++++++++------- > include/linux/swiotlb.h | 10 +- > include/media/videobuf2-dma-contig.h | 7 +- > include/rdma/ib_verbs.h | 8 +- > include/xen/swiotlb-xen.h | 12 +- > lib/dma-noop.c | 9 +- > lib/swiotlb.c | 13 ++- > 108 files changed, 689 insertions(+), 789 deletions(-) > delete mode 100644 include/linux/dma-attrs.h > > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs @ 2016-06-30 8:23 Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2016-06-30 8:23 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, hch, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, linux-doc, linux-alpha, linux-snps-arc, linux-arm-kernel, xen-devel, linux-c6x-dev, linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k, linux-metag, linux-mips, linux-parisc, linuxppc-dev, linux-s390, linux-sh, sparclinux, linux-pci, linux-xtensa, dri-devel, linux-samsung-soc, linux-mediatek, linux-arm-msm, freedreno Hi, This is fifth approach for replacing struct dma_attrs with unsigned long. The main patch (1/44) doing the change is split into many subpatches for easier review (2-42). They should be squashed together when applying. Rebased on v4.7-rc5. For easier testing the patchset is available here: repo: https://github.com/krzk/linux branch: for-next/dma-attrs-const-v5 Changes since v4 ================ 1. Collect some acks. Still need more. 2. Minor fixes pointed by Robin Murphy. 3. Applied changes from Bart Van Assche's comment. 4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/). Changes since v3 ================ 1. Collect some acks. 2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING"). 3. Minor fix pointed out by Michael Ellerman. Changes since v2 ================ 1. Follow Christoph Hellwig's comments (don't use BIT add documentation, remove dma_get_attr). Rationale ========= The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Best regards, Krzysztof Krzysztof Kozlowski (44): dma-mapping: Use unsigned long for dma_attrs alpha: dma-mapping: Use unsigned long for dma_attrs arc: dma-mapping: Use unsigned long for dma_attrs ARM: dma-mapping: Use unsigned long for dma_attrs arm64: dma-mapping: Use unsigned long for dma_attrs avr32: dma-mapping: Use unsigned long for dma_attrs blackfin: dma-mapping: Use unsigned long for dma_attrs c6x: dma-mapping: Use unsigned long for dma_attrs cris: dma-mapping: Use unsigned long for dma_attrs frv: dma-mapping: Use unsigned long for dma_attrs drm/exynos: dma-mapping: Use unsigned long for dma_attrs drm/mediatek: dma-mapping: Use unsigned long for dma_attrs drm/msm: dma-mapping: Use unsigned long for dma_attrs drm/nouveau: dma-mapping: Use unsigned long for dma_attrs drm/rockship: dma-mapping: Use unsigned long for dma_attrs infiniband: dma-mapping: Use unsigned long for dma_attrs iommu: dma-mapping: Use unsigned long for dma_attrs [media] dma-mapping: Use unsigned long for dma_attrs xen: dma-mapping: Use unsigned long for dma_attrs swiotlb: dma-mapping: Use unsigned long for dma_attrs powerpc: dma-mapping: Use unsigned long for dma_attrs video: dma-mapping: Use unsigned long for dma_attrs x86: dma-mapping: Use unsigned long for dma_attrs iommu: intel: dma-mapping: Use unsigned long for dma_attrs h8300: dma-mapping: Use unsigned long for dma_attrs hexagon: dma-mapping: Use unsigned long for dma_attrs ia64: dma-mapping: Use unsigned long for dma_attrs m68k: dma-mapping: Use unsigned long for dma_attrs metag: dma-mapping: Use unsigned long for dma_attrs microblaze: dma-mapping: Use unsigned long for dma_attrs mips: dma-mapping: Use unsigned long for dma_attrs mn10300: dma-mapping: Use unsigned long for dma_attrs nios2: dma-mapping: Use unsigned long for dma_attrs openrisc: dma-mapping: Use unsigned long for dma_attrs parisc: dma-mapping: Use unsigned long for dma_attrs misc: mic: dma-mapping: Use unsigned long for dma_attrs s390: dma-mapping: Use unsigned long for dma_attrs sh: dma-mapping: Use unsigned long for dma_attrs sparc: dma-mapping: Use unsigned long for dma_attrs tile: dma-mapping: Use unsigned long for dma_attrs unicore32: dma-mapping: Use unsigned long for dma_attrs xtensa: dma-mapping: Use unsigned long for dma_attrs dma-mapping: Remove dma_get_attr dma-mapping: Document the DMA attributes next to the declaration Documentation/DMA-API.txt | 33 +++--- Documentation/DMA-attributes.txt | 2 +- arch/alpha/include/asm/dma-mapping.h | 2 - arch/alpha/kernel/pci-noop.c | 2 +- arch/alpha/kernel/pci_iommu.c | 12 +- arch/arc/mm/dma.c | 12 +- arch/arm/common/dmabounce.c | 4 +- arch/arm/include/asm/dma-mapping.h | 13 +-- arch/arm/include/asm/xen/page-coherent.h | 16 +-- arch/arm/mm/dma-mapping.c | 117 +++++++++---------- arch/arm/xen/mm.c | 8 +- arch/arm64/mm/dma-mapping.c | 66 +++++------ arch/avr32/mm/dma-coherent.c | 12 +- arch/blackfin/kernel/dma-mapping.c | 8 +- arch/c6x/include/asm/dma-mapping.h | 4 +- arch/c6x/kernel/dma.c | 9 +- arch/c6x/mm/dma-coherent.c | 4 +- arch/cris/arch-v32/drivers/pci/dma.c | 9 +- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 +- arch/frv/mb93090-mb00/pci-dma.c | 9 +- arch/h8300/kernel/dma.c | 8 +- arch/hexagon/include/asm/dma-mapping.h | 1 - arch/hexagon/kernel/dma.c | 8 +- arch/ia64/hp/common/sba_iommu.c | 22 ++-- arch/ia64/include/asm/machvec.h | 1 - arch/ia64/kernel/pci-swiotlb.c | 4 +- arch/ia64/sn/pci/pci_dma.c | 22 ++-- arch/m68k/kernel/dma.c | 12 +- arch/metag/kernel/dma.c | 16 +-- arch/microblaze/include/asm/dma-mapping.h | 1 - arch/microblaze/kernel/dma.c | 12 +- arch/mips/cavium-octeon/dma-octeon.c | 8 +- arch/mips/loongson64/common/dma-swiotlb.c | 10 +- arch/mips/mm/dma-default.c | 20 ++-- arch/mips/netlogic/common/nlm-dma.c | 4 +- arch/mn10300/mm/dma-alloc.c | 8 +- arch/nios2/mm/dma-mapping.c | 12 +- arch/openrisc/kernel/dma.c | 21 ++-- arch/parisc/kernel/pci-dma.c | 18 +-- 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 | 28 ++--- 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 +- arch/s390/include/asm/dma-mapping.h | 1 - arch/s390/pci/pci_dma.c | 23 ++-- arch/sh/include/asm/dma-mapping.h | 4 +- arch/sh/kernel/dma-nommu.c | 4 +- arch/sh/mm/consistent.c | 4 +- arch/sparc/kernel/iommu.c | 12 +- arch/sparc/kernel/ioport.c | 24 ++-- arch/sparc/kernel/pci_sun4v.c | 12 +- arch/tile/kernel/pci-dma.c | 28 ++--- arch/unicore32/mm/dma-swiotlb.c | 4 +- arch/x86/include/asm/dma-mapping.h | 5 +- arch/x86/include/asm/swiotlb.h | 4 +- arch/x86/include/asm/xen/page-coherent.h | 9 +- arch/x86/kernel/amd_gart_64.c | 20 ++-- arch/x86/kernel/pci-calgary_64.c | 14 +-- arch/x86/kernel/pci-dma.c | 4 +- arch/x86/kernel/pci-nommu.c | 4 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/pci/sta2x11-fixup.c | 2 +- arch/x86/pci/vmd.c | 16 +-- arch/xtensa/kernel/pci-dma.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 ++-- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 13 +-- drivers/gpu/drm/mediatek/mtk_drm_gem.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +-- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/infiniband/core/umem.c | 7 +- drivers/iommu/amd_iommu.c | 12 +- drivers/iommu/dma-iommu.c | 8 +- drivers/iommu/intel-iommu.c | 12 +- drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++--- drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 ++--- drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 +-- drivers/misc/mic/host/mic_boot.c | 20 ++-- drivers/parisc/ccio-dma.c | 16 +-- drivers/parisc/sba_iommu.c | 16 +-- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 12 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +- drivers/xen/swiotlb-xen.c | 14 +-- include/linux/dma-attrs.h | 71 ------------ include/linux/dma-iommu.h | 6 +- include/linux/dma-mapping.h | 128 ++++++++++++++------- include/linux/swiotlb.h | 10 +- include/media/videobuf2-dma-contig.h | 7 +- include/rdma/ib_verbs.h | 8 +- include/xen/swiotlb-xen.h | 12 +- lib/dma-noop.c | 9 +- lib/swiotlb.c | 13 ++- 108 files changed, 689 insertions(+), 789 deletions(-) delete mode 100644 include/linux/dma-attrs.h -- 1.9.1 ^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2016-07-12 12:19 UTC | newest] Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-06-30 8:23 [PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs Krzysztof Kozlowski -- strict thread matches above, loose matches on Subject: below -- 2016-06-30 8:23 Krzysztof Kozlowski 2016-06-30 8:23 ` Krzysztof Kozlowski 2016-06-30 8:23 ` Krzysztof Kozlowski 2016-06-30 8:23 ` Krzysztof Kozlowski 2016-06-30 8:23 ` Krzysztof Kozlowski 2016-06-30 8:23 ` Krzysztof Kozlowski 2016-06-30 8:23 ` Krzysztof Kozlowski 2016-07-12 12:16 ` Daniel Vetter [not found] ` <1467275019-30789-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:16 ` Daniel Vetter 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski [not found] ` <20160712121625.GP23520-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org> 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:19 ` Krzysztof Kozlowski 2016-07-12 12:16 ` Daniel Vetter 2016-06-30 8:23 Krzysztof Kozlowski
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.