* [PATCH v6 00/46] dma-mapping: Use unsigned long for dma_attrs
@ 2016-07-13 8:39 Krzysztof Kozlowski
[not found] ` <1468399300-5399-1-git-send-email-k.kozlowski@samsung.com>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 8:39 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-IAPFreCvJWM7uuMidbF8XWGXanvQGlWp
Hi,
The fifth version of this patchset was merged by Andrew Morton
few days ago. It was rebased on v4.7-rc5 so it missed some ongoing
changes.
This is just rebase on next-20160713.
For easier testing the patchset is available here:
repo: https://github.com/krzk/linux
branch: for-next/dma-attrs-const-v6
Changes since v5
================
1. New patches:
1/46: [media] mtk-vcodec: Remove unused dma_attrs
44/46: remoteproc: qcom: Use unsigned long for dma_attrs
2. 19/46: rebased on next, some more changes inside
3. Added accumulated acks: Marek Szyprowski, Richard Kuo,
Konrad Rzeszutek Wilk, Daniel Vetter and Joerg Roedel.
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 (46):
[media] mtk-vcodec: Remove unused dma_attrs
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
remoteproc: qcom: 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 +-
.../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 4 -
drivers/media/platform/sti/bdisp/bdisp-hw.c | 26 ++---
drivers/media/v4l2-core/videobuf2-dma-contig.c | 28 ++---
drivers/media/v4l2-core/videobuf2-dma-sg.c | 21 +---
drivers/media/v4l2-core/videobuf2-vmalloc.c | 2 +-
drivers/misc/mic/host/mic_boot.c | 20 ++--
drivers/parisc/ccio-dma.c | 16 +--
drivers/parisc/sba_iommu.c | 16 +--
drivers/remoteproc/qcom_q6v5_pil.c | 7 +-
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-core.h | 6 +-
include/media/videobuf2-dma-contig.h | 2 -
include/rdma/ib_verbs.h | 8 +-
include/xen/swiotlb-xen.h | 12 +-
lib/dma-noop.c | 9 +-
lib/swiotlb.c | 13 ++-
112 files changed, 694 insertions(+), 798 deletions(-)
delete mode 100644 include/linux/dma-attrs.h
--
1.9.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v6 17/46] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1468399300-5399-16-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-07-13 8:41 ` Krzysztof Kozlowski
[not found] ` <1468399300-5399-17-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 8:41 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Doug Ledford,
Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
drivers/infiniband/core/umem.c | 7 +++----
include/rdma/ib_verbs.h | 8 ++++----
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index fe4d2e1a8b58..c68746ce6624 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -37,7 +37,6 @@
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/hugetlb.h>
-#include <linux/dma-attrs.h>
#include <linux/slab.h>
#include <rdma/ib_umem_odp.h>
@@ -92,12 +91,12 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
unsigned long npages;
int ret;
int i;
- DEFINE_DMA_ATTRS(attrs);
+ unsigned long dma_attrs = 0;
struct scatterlist *sg, *sg_list_start;
int need_release = 0;
if (dmasync)
- dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
+ dma_attrs |= DMA_ATTR_WRITE_BARRIER;
if (!size)
return ERR_PTR(-EINVAL);
@@ -215,7 +214,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
umem->sg_head.sgl,
umem->npages,
DMA_BIDIRECTIONAL,
- &attrs);
+ dma_attrs);
if (umem->nmap <= 0) {
ret = -ENOMEM;
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 156673a80704..1eac5ebdda86 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2910,7 +2910,7 @@ static inline void ib_dma_unmap_single(struct ib_device *dev,
static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
void *cpu_addr, size_t size,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
return dma_map_single_attrs(dev->dma_device, cpu_addr, size,
direction, attrs);
@@ -2919,7 +2919,7 @@ static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
static inline void ib_dma_unmap_single_attrs(struct ib_device *dev,
u64 addr, size_t size,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
return dma_unmap_single_attrs(dev->dma_device, addr, size,
direction, attrs);
@@ -2997,7 +2997,7 @@ static inline void ib_dma_unmap_sg(struct ib_device *dev,
static inline int ib_dma_map_sg_attrs(struct ib_device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, attrs);
}
@@ -3005,7 +3005,7 @@ static inline int ib_dma_map_sg_attrs(struct ib_device *dev,
static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, attrs);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v6 17/46] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1468399300-5399-17-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-07-13 10:37 ` Bart Van Assche
[not found] ` <3ed39f35-f19e-1593-72a5-0d7240fa7a4e-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-13 11:14 ` [PATCH v6.1] " Krzysztof Kozlowski
2016-07-13 11:56 ` [PATCH v6.2] " Krzysztof Kozlowski
2 siblings, 1 reply; 10+ messages in thread
From: Bart Van Assche @ 2016-07-13 10:37 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Bartlomiej Zolnierkiewicz, Doug Ledford, Sean Hefty,
Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 07/13/2016 03:41 PM, Krzysztof Kozlowski wrote:
> Split out subsystem specific changes for easier reviews. This will be
> squashed with main commit.
Apparently my comment has been ignored
(http://thread.gmane.org/gmane.linux.ports.m68k/8746/focus=37703). Are
you aware that you are expected to reply to feedback on patches?
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v6 17/46] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <3ed39f35-f19e-1593-72a5-0d7240fa7a4e-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2016-07-13 10:47 ` Krzysztof Kozlowski
[not found] ` <57861C2A.2090206-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 10:47 UTC (permalink / raw)
To: Bart Van Assche, Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Bartlomiej Zolnierkiewicz, Doug Ledford, Sean Hefty,
Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 07/13/2016 12:37 PM, Bart Van Assche wrote:
> On 07/13/2016 03:41 PM, Krzysztof Kozlowski wrote:
>> Split out subsystem specific changes for easier reviews. This will be
>> squashed with main commit.
>
> Apparently my comment has been ignored
> (http://thread.gmane.org/gmane.linux.ports.m68k/8746/focus=37703). Are
> you aware that you are expected to reply to feedback on patches?
Of course your comment was not ignored. I am sorry that you have such
impression. However I thought you are referring only to local variable
which name I changed.
Do you want me to rename also the argument in the ib_dma_map_sg_attrs()
and ib_dma_unmap_sg_attrs() functions?
Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v6 17/46] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <57861C2A.2090206-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-07-13 10:56 ` Bart Van Assche
[not found] ` <6f3511c2-0795-ce1a-44c4-426feaf97c03-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Bart Van Assche @ 2016-07-13 10:56 UTC (permalink / raw)
To: Krzysztof Kozlowski, Bart Van Assche, Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Bartlomiej Zolnierkiewicz, Doug Ledford, Sean Hefty,
Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 07/13/2016 05:47 PM, Krzysztof Kozlowski wrote:
> On 07/13/2016 12:37 PM, Bart Van Assche wrote:
>> On 07/13/2016 03:41 PM, Krzysztof Kozlowski wrote:
>>> Split out subsystem specific changes for easier reviews. This will be
>>> squashed with main commit.
>>
>> Apparently my comment has been ignored
>> (http://thread.gmane.org/gmane.linux.ports.m68k/8746/focus=37703). Are
>> you aware that you are expected to reply to feedback on patches?
>
> Of course your comment was not ignored. I am sorry that you have such
> impression. However I thought you are referring only to local variable
> which name I changed.
>
> Do you want me to rename also the argument in the ib_dma_map_sg_attrs()
> and ib_dma_unmap_sg_attrs() functions?
Hello Krzysztof,
Sorry if I was not clear enough in the comment I had posted in reply to
the previous version of this patch series. In my comment I wanted indeed
to refer to the name of the ib_dma_map_sg_attrs() /
ib_dma_unmap_sg_attrs() function argument. An argument with the name
"attrs" namely does not explain what kind of attributes that argument
refers to ...
Thanks,
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v6 17/46] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <6f3511c2-0795-ce1a-44c4-426feaf97c03-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2016-07-13 11:03 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 11:03 UTC (permalink / raw)
To: Bart Van Assche, Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Bartlomiej Zolnierkiewicz, Doug Ledford, Sean Hefty,
Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 07/13/2016 12:56 PM, Bart Van Assche wrote:
> On 07/13/2016 05:47 PM, Krzysztof Kozlowski wrote:
>> On 07/13/2016 12:37 PM, Bart Van Assche wrote:
>>> On 07/13/2016 03:41 PM, Krzysztof Kozlowski wrote:
>>>> Split out subsystem specific changes for easier reviews. This will be
>>>> squashed with main commit.
>>>
>>> Apparently my comment has been ignored
>>> (http://thread.gmane.org/gmane.linux.ports.m68k/8746/focus=37703). Are
>>> you aware that you are expected to reply to feedback on patches?
>>
>> Of course your comment was not ignored. I am sorry that you have such
>> impression. However I thought you are referring only to local variable
>> which name I changed.
>>
>> Do you want me to rename also the argument in the ib_dma_map_sg_attrs()
>> and ib_dma_unmap_sg_attrs() functions?
>
> Hello Krzysztof,
>
> Sorry if I was not clear enough in the comment I had posted in reply to
> the previous version of this patch series. In my comment I wanted indeed
> to refer to the name of the ib_dma_map_sg_attrs() /
> ib_dma_unmap_sg_attrs() function argument. An argument with the name
> "attrs" namely does not explain what kind of attributes that argument
> refers to ...
I can rename it, no problem. It looks to me a little bit redundant
information as these are just wrappers over dma_{map,unmap}_sg_attrs()
where the attrs are also used. Everything there refers to the mapping of
scatter gather list. Anyway, renaming won't harm neither so let me send
a follow up only for this patch.
Thanks for feedback!
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v6.1] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1468399300-5399-17-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 10:37 ` Bart Van Assche
@ 2016-07-13 11:14 ` Krzysztof Kozlowski
[not found] ` <1468408466-7369-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 11:56 ` [PATCH v6.2] " Krzysztof Kozlowski
2 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 11:14 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Bart Van Assche,
Doug Ledford, Sean Hefty, Hal Rosenstock,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
Update only to this patch from the set.
Changes since v6:
1. Rename attrs->dma_attrs arguments in map/unmap functions (suggested
by Bart Van Assche).
---
drivers/infiniband/core/umem.c | 7 +++----
include/rdma/ib_verbs.h | 13 +++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index fe4d2e1a8b58..c68746ce6624 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -37,7 +37,6 @@
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/hugetlb.h>
-#include <linux/dma-attrs.h>
#include <linux/slab.h>
#include <rdma/ib_umem_odp.h>
@@ -92,12 +91,12 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
unsigned long npages;
int ret;
int i;
- DEFINE_DMA_ATTRS(attrs);
+ unsigned long dma_attrs = 0;
struct scatterlist *sg, *sg_list_start;
int need_release = 0;
if (dmasync)
- dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
+ dma_attrs |= DMA_ATTR_WRITE_BARRIER;
if (!size)
return ERR_PTR(-EINVAL);
@@ -215,7 +214,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
umem->sg_head.sgl,
umem->npages,
DMA_BIDIRECTIONAL,
- &attrs);
+ dma_attrs);
if (umem->nmap <= 0) {
ret = -ENOMEM;
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 156673a80704..ae9cfcac20f4 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2910,7 +2910,7 @@ static inline void ib_dma_unmap_single(struct ib_device *dev,
static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
void *cpu_addr, size_t size,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
return dma_map_single_attrs(dev->dma_device, cpu_addr, size,
direction, attrs);
@@ -2919,7 +2919,7 @@ static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
static inline void ib_dma_unmap_single_attrs(struct ib_device *dev,
u64 addr, size_t size,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long attrs)
{
return dma_unmap_single_attrs(dev->dma_device, addr, size,
direction, attrs);
@@ -2997,17 +2997,18 @@ static inline void ib_dma_unmap_sg(struct ib_device *dev,
static inline int ib_dma_map_sg_attrs(struct ib_device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long dma_attrs)
{
- return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, attrs);
+ return dma_map_sg_attrs(dev->dma_device, sg, nents, direction,
+ dma_attrs);
}
static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long dma_attrs)
{
- dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, attrs);
+ dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, dma_attrs);
}
/**
* ib_sg_dma_address - Return the DMA address from a scatter/gather entry
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v6.1] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1468408466-7369-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-07-13 11:17 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 11:17 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Bartlomiej Zolnierkiewicz, Bart Van Assche, Doug Ledford,
Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 07/13/2016 01:14 PM, Krzysztof Kozlowski wrote:
> Split out subsystem specific changes for easier reviews. This will be
> squashed with main commit.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>
> ---
>
> Update only to this patch from the set.
>
> Changes since v6:
> 1. Rename attrs->dma_attrs arguments in map/unmap functions (suggested
> by Bart Van Assche).
> ---
> drivers/infiniband/core/umem.c | 7 +++----
> include/rdma/ib_verbs.h | 13 +++++++------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
> index fe4d2e1a8b58..c68746ce6624 100644
> --- a/drivers/infiniband/core/umem.c
> +++ b/drivers/infiniband/core/umem.c
> @@ -37,7 +37,6 @@
> #include <linux/sched.h>
> #include <linux/export.h>
> #include <linux/hugetlb.h>
> -#include <linux/dma-attrs.h>
> #include <linux/slab.h>
> #include <rdma/ib_umem_odp.h>
>
> @@ -92,12 +91,12 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
> unsigned long npages;
> int ret;
> int i;
> - DEFINE_DMA_ATTRS(attrs);
> + unsigned long dma_attrs = 0;
> struct scatterlist *sg, *sg_list_start;
> int need_release = 0;
>
> if (dmasync)
> - dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
> + dma_attrs |= DMA_ATTR_WRITE_BARRIER;
>
> if (!size)
> return ERR_PTR(-EINVAL);
> @@ -215,7 +214,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
> umem->sg_head.sgl,
> umem->npages,
> DMA_BIDIRECTIONAL,
> - &attrs);
> + dma_attrs);
>
> if (umem->nmap <= 0) {
> ret = -ENOMEM;
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 156673a80704..ae9cfcac20f4 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -2910,7 +2910,7 @@ static inline void ib_dma_unmap_single(struct ib_device *dev,
> static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
> void *cpu_addr, size_t size,
> enum dma_data_direction direction,
> - struct dma_attrs *attrs)
> + unsigned long attrs)
> {
> return dma_map_single_attrs(dev->dma_device, cpu_addr, size,
> direction, attrs);
> @@ -2919,7 +2919,7 @@ static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
> static inline void ib_dma_unmap_single_attrs(struct ib_device *dev,
> u64 addr, size_t size,
> enum dma_data_direction direction,
> - struct dma_attrs *attrs)
> + unsigned long attrs)
Oh crap, I didn't rename it everywhere. Let me do a respin...
BR,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v6.2] infiniband: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1468399300-5399-17-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 10:37 ` Bart Van Assche
2016-07-13 11:14 ` [PATCH v6.1] " Krzysztof Kozlowski
@ 2016-07-13 11:56 ` Krzysztof Kozlowski
2016-07-13 12:29 ` Bart Van Assche
2 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-13 11:56 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, hch-wEGCiKHe2LqWVfeAwA7xHQ,
Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Bart Van Assche,
Doug Ledford, Sean Hefty, Hal Rosenstock,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
---
This is an update only to this patch from the set.
Changes since v6.1:
1. Rename attrs->dma_attrs everywhere.
Changes since v6:
1. Rename attrs->dma_attrs arguments in map/unmap functions (suggested
by Bart Van Assche).
---
drivers/infiniband/core/umem.c | 7 +++----
include/rdma/ib_verbs.h | 17 +++++++++--------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index fe4d2e1a8b58..c68746ce6624 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -37,7 +37,6 @@
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/hugetlb.h>
-#include <linux/dma-attrs.h>
#include <linux/slab.h>
#include <rdma/ib_umem_odp.h>
@@ -92,12 +91,12 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
unsigned long npages;
int ret;
int i;
- DEFINE_DMA_ATTRS(attrs);
+ unsigned long dma_attrs = 0;
struct scatterlist *sg, *sg_list_start;
int need_release = 0;
if (dmasync)
- dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
+ dma_attrs |= DMA_ATTR_WRITE_BARRIER;
if (!size)
return ERR_PTR(-EINVAL);
@@ -215,7 +214,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
umem->sg_head.sgl,
umem->npages,
DMA_BIDIRECTIONAL,
- &attrs);
+ dma_attrs);
if (umem->nmap <= 0) {
ret = -ENOMEM;
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 156673a80704..94a0bc5b5bdd 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2910,19 +2910,19 @@ static inline void ib_dma_unmap_single(struct ib_device *dev,
static inline u64 ib_dma_map_single_attrs(struct ib_device *dev,
void *cpu_addr, size_t size,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long dma_attrs)
{
return dma_map_single_attrs(dev->dma_device, cpu_addr, size,
- direction, attrs);
+ direction, dma_attrs);
}
static inline void ib_dma_unmap_single_attrs(struct ib_device *dev,
u64 addr, size_t size,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long dma_attrs)
{
return dma_unmap_single_attrs(dev->dma_device, addr, size,
- direction, attrs);
+ direction, dma_attrs);
}
/**
@@ -2997,17 +2997,18 @@ static inline void ib_dma_unmap_sg(struct ib_device *dev,
static inline int ib_dma_map_sg_attrs(struct ib_device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long dma_attrs)
{
- return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, attrs);
+ return dma_map_sg_attrs(dev->dma_device, sg, nents, direction,
+ dma_attrs);
}
static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev,
struct scatterlist *sg, int nents,
enum dma_data_direction direction,
- struct dma_attrs *attrs)
+ unsigned long dma_attrs)
{
- dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, attrs);
+ dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, dma_attrs);
}
/**
* ib_sg_dma_address - Return the DMA address from a scatter/gather entry
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v6.2] infiniband: dma-mapping: Use unsigned long for dma_attrs
2016-07-13 11:56 ` [PATCH v6.2] " Krzysztof Kozlowski
@ 2016-07-13 12:29 ` Bart Van Assche
0 siblings, 0 replies; 10+ messages in thread
From: Bart Van Assche @ 2016-07-13 12:29 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andrew Morton
Cc: linux-kernel, hch, Bartlomiej Zolnierkiewicz, Bart Van Assche,
Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma
On 07/13/2016 06:56 PM, Krzysztof Kozlowski wrote:
> Split out subsystem specific changes for easier reviews. This will be
> squashed with main commit.
Thanks !
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-07-13 12:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 8:39 [PATCH v6 00/46] dma-mapping: Use unsigned long for dma_attrs Krzysztof Kozlowski
[not found] ` <1468399300-5399-1-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-2-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-3-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-4-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-5-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-6-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-7-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-8-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-9-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-10-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-11-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-12-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-13-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-14-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-15-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-16-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1468399300-5399-16-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 8:41 ` [PATCH v6 17/46] infiniband: " Krzysztof Kozlowski
[not found] ` <1468399300-5399-17-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 10:37 ` Bart Van Assche
[not found] ` <3ed39f35-f19e-1593-72a5-0d7240fa7a4e-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-13 10:47 ` Krzysztof Kozlowski
[not found] ` <57861C2A.2090206-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 10:56 ` Bart Van Assche
[not found] ` <6f3511c2-0795-ce1a-44c4-426feaf97c03-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-13 11:03 ` Krzysztof Kozlowski
2016-07-13 11:14 ` [PATCH v6.1] " Krzysztof Kozlowski
[not found] ` <1468408466-7369-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-07-13 11:17 ` Krzysztof Kozlowski
2016-07-13 11:56 ` [PATCH v6.2] " Krzysztof Kozlowski
2016-07-13 12:29 ` Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox