dma-mapping: Define dma_{alloc,free}_attrs() for all archs
v2 cover dma-mapping: Define dma_{alloc,free}_attrs() for all archs
Most architectures that define CONFIG_HAVE_DMA=y, have implementations for both dma_alloc_attrs() and dma_free_attrs(). All achitectures that do not define CONFIG_HAVE_DMA also have both of these definitions provided by dma-mapping-broken.h.
Provide a default definition for the archs that define CONFIG_HAVE_DMA=y, but have no implementation for dma_{alloc,free}_attrs().
As I don't have hardware for any of these systems, the patches are only compile-tested where I could (arm64, s390) and untested for the archs where I couldn't find a readily available prebuilt cross-compiler (c6x, parisc).
Changes from v1
---------------
arm64, s390:
* Since these archs are using dma_ops, pass appropirate value for attrs to dma_ops->alloc().
* Indicate that these patches are compile teseted only (I don't have hardware)
c6x, parisc:
* Indicate that these patches are untested (I don't have cross compilers)
Cheers,
Damian
Damian Hobson-Garcia (4):
arm64: Provide default implementation for dma_{alloc,free}_attrs
c6x: Provide default implementation for dma_{alloc,free}_attrs
parisc: Provide default implementation for dma_{alloc,free}_attrs
s390: Provide default implementation for dma_{alloc,free}_attrs
arch/arm64/include/asm/dma-mapping.h | 17 +++++++++++------ arch/c6x/include/asm/dma-mapping.h | 3 +++ arch/parisc/include/asm/dma-mapping.h | 3 +++ arch/s390/include/asm/dma-mapping.h | 17 +++++++++++------ 4 files changed, 28 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.5.4
Hello,
Quoted 14 lines · Damian Hobson-Garcia
Most architectures that define
CONFIG_HAVE_DMA=y, have implementations for bothdma_alloc_attrs()anddma_free_attrs(). All achitectures that do not defineCONFIG_HAVE_DMAalso have both of these definitions provided bydma-mapping-broken.h.Provide a default definition for the archs that define
CONFIG_HAVE_DMA=y, but have no implementation for dma_{alloc,free}_attrs().As I don't have hardware for any of these systems, the patches are only compile-tested where I could (arm64, s390) and untested for the archs where I couldn't find a readily available prebuilt cross-compiler (c6x, parisc).
Quoted 6 lines
arch/arm64/include/asm/dma-mapping.h | 17 +++++++++++------ arch/c6x/include/asm/dma-mapping.h | 3 +++ arch/parisc/include/asm/dma-mapping.h | 3 +++ arch/s390/include/asm/dma-mapping.h | 17 +++++++++++------ 4 files changed, 28 insertions(+), 12 deletions(-)
Since this series spans several architectures, what would be the best way to have this patch series merged?
Should I resubmit each patch to the mailing list for each architecture separately?
Thank you,
Damian
Signature · 3 lines
Damian Hobson-Garcia IGEL Co.,Ltd http://www.igel.co.jp
Quoted 6 lines · Damian Hobson-Garcia
Hello,
Quoted 4 lines · Damian Hobson-Garcia
Most architectures that define
CONFIG_HAVE_DMA=y, have implementations for bothdma_alloc_attrs()anddma_free_attrs(). All achitectures that do not defineCONFIG_HAVE_DMAalso have both of these definitions provided bydma-mapping-broken.h.
BTW, shouldn't this be called CONFIG_HAVE_DMA_ATTRS?
Quoted 14 lines
Quoted 7 lines
Provide a default definition for the archs that define
CONFIG_HAVE_DMA=y, but have no implementation for dma_{alloc,free}_attrs().As I don't have hardware for any of these systems, the patches are only compile-tested where I could (arm64, s390) and untested for the archs where I couldn't find a readily available prebuilt cross-compiler (c6x, parisc).
Quoted 6 lines
arch/arm64/include/asm/dma-mapping.h | 17 +++++++++++------ arch/c6x/include/asm/dma-mapping.h | 3 +++ arch/parisc/include/asm/dma-mapping.h | 3 +++ arch/s390/include/asm/dma-mapping.h | 17 +++++++++++------ 4 files changed, 28 insertions(+), 12 deletions(-)
Quoted 4 lines
Since this series spans several architectures, what would be the best way to have this patch series merged?
Should I resubmit each patch to the mailing list for each architecture separately?
I'm happy to take the arm64 patch.
Thanks.
Signature · 1 line
Catalin
Hi Catalin,
Quoted 9 lines · Catalin Marinas
Quoted 6 lines · Damian Hobson-Garcia
Hello,
Quoted 4 lines · Damian Hobson-Garcia
Most architectures that define
CONFIG_HAVE_DMA=y, have implementations for bothdma_alloc_attrs()anddma_free_attrs(). All achitectures that do not defineCONFIG_HAVE_DMAalso have both of these definitions provided bydma-mapping-broken.h.BTW, shouldn't this be called
CONFIG_HAVE_DMA_ATTRS?
CONFIG_HAVE_DMA_ATTRS is currently used to enable the functions to set/get the DMA attribute values. Poking through the headers, it looks like the struct dma_attrs is defined regardless of the CONFIG_HAVE_DMA_ATTRS setting, so in that respect
we always seem to "have" DMA attributes (if we have DMA), but they may not always be meaningful (ie. set to some value).
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Provide a default definition for the archs that define
CONFIG_HAVE_DMA=y, but have no implementation for dma_{alloc,free}_attrs().As I don't have hardware for any of these systems, the patches are only compile-tested where I could (arm64, s390) and untested for the archs where I couldn't find a readily available prebuilt cross-compiler (c6x, parisc).
arch/arm64/include/asm/dma-mapping.h | 17 +++++++++++------ arch/c6x/include/asm/dma-mapping.h | 3 +++ arch/parisc/include/asm/dma-mapping.h | 3 +++ arch/s390/include/asm/dma-mapping.h | 17 +++++++++++------ 4 files changed, 28 insertions(+), 12 deletions(-)
Quoted 6 lines
Quoted 4 lines
Since this series spans several architectures, what would be the best way to have this patch series merged?
Should I resubmit each patch to the mailing list for each architecture separately?I'm happy to take the arm64 patch.
Very much appreciated.
Quoted 3 lines
Thanks.
Damian
Signature · 3 lines
Damian Hobson-Garcia IGEL Co.,Ltd http://www.igel.co.jp
Quoted 10 lines · Damian Hobson-Garcia
Hi Catalin,
Quoted 8 lines · Catalin Marinas
Quoted 6 lines · Damian Hobson-Garcia
Hello,
Quoted 4 lines · Damian Hobson-Garcia
Most architectures that define
CONFIG_HAVE_DMA=y, have implementations for bothdma_alloc_attrs()anddma_free_attrs(). All achitectures that do not defineCONFIG_HAVE_DMAalso have both of these definitions provided bydma-mapping-broken.h.
Quoted 8 lines
Quoted 1 line
BTW, shouldn't this be called
CONFIG_HAVE_DMA_ATTRS?
CONFIG_HAVE_DMA_ATTRSis currently used to enable the functions to set/get the DMA attribute values. Poking through the headers, it looks like the structdma_attrsis defined regardless of theCONFIG_HAVE_DMA_ATTRSsetting, so in that respect
we always seem to "have" DMA attributes (if we have DMA), but they may not always be meaningful (ie. set to some value).
My point was about the commit log - grep'ing the kernel for CONFIG_HAVE_DMA did not return anything.
Signature · 1 line
Catalin
Quoted 20 lines · Catalin Marinas
Quoted 10 lines · Damian Hobson-Garcia
Hi Catalin,
Quoted 8 lines · Catalin Marinas
Quoted 6 lines · Damian Hobson-Garcia
Hello,
Quoted 4 lines · Damian Hobson-Garcia
Most architectures that define
CONFIG_HAVE_DMA=y, have implementations for bothdma_alloc_attrs()anddma_free_attrs(). All achitectures that do not defineCONFIG_HAVE_DMAalso have both of these definitions provided bydma-mapping-broken.h.Quoted 8 lines
Quoted 1 line
BTW, shouldn't this be called
CONFIG_HAVE_DMA_ATTRS?
CONFIG_HAVE_DMA_ATTRSis currently used to enable the functions to set/get the DMA attribute values. Poking through the headers, it looks like the structdma_attrsis defined regardless of theCONFIG_HAVE_DMA_ATTRSsetting, so in that respect
we always seem to "have" DMA attributes (if we have DMA), but they may not always be meaningful (ie. set to some value).
Quoted 3 lines
My point was about the commit log - grep'ing the kernel for
CONFIG_HAVE_DMAdid not return anything.
Oh yes, my mistake. It should be CONFIG_HAS_DMA instead of CONFIG_HAVE_DMA. I'll update it.
Damian
Signature · 3 lines
Damian Hobson-Garcia IGEL Co.,Ltd http://www.igel.co.jp
Quoted 23 lines · Damian Hobson-Garcia
Hello,
Quoted 14 lines · Damian Hobson-Garcia
Most architectures that define
CONFIG_HAVE_DMA=y, have implementations for bothdma_alloc_attrs()anddma_free_attrs(). All achitectures that do not defineCONFIG_HAVE_DMAalso have both of these definitions provided bydma-mapping-broken.h.Provide a default definition for the archs that define
CONFIG_HAVE_DMA=y, but have no implementation for dma_{alloc,free}_attrs().As I don't have hardware for any of these systems, the patches are only compile-tested where I could (arm64, s390) and untested for the archs where I couldn't find a readily available prebuilt cross-compiler (c6x, parisc).
Quoted 6 lines
arch/arm64/include/asm/dma-mapping.h | 17 +++++++++++------ arch/c6x/include/asm/dma-mapping.h | 3 +++ arch/parisc/include/asm/dma-mapping.h | 3 +++ arch/s390/include/asm/dma-mapping.h | 17 +++++++++++------ 4 files changed, 28 insertions(+), 12 deletions(-)
Quoted 4 lines
Since this series spans several architectures, what would be the best way to have this patch series merged?
Should I resubmit each patch to the mailing list for each architecture separately?
I already pushed the parisc change upstream. See commit 7f64fb41aad9a8504dd76e81b2391eae64e1498a
Helge