All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-04-30  3:01 ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-04-30  3:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-s390, catalin.marinas, will.deacon, linux-arm-kernel,
	msalter, linux-c6x-dev, deller, linux-parisc,
	Damian Hobson-Garcia

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(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc, free}_attrs() for all archs
@ 2013-04-30  3:01 ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-04-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
  2013-04-30  3:01 ` [PATCH v2 0/4] dma-mapping: Define dma_{alloc, free}_attrs() " Damian Hobson-Garcia
@ 2013-05-22  2:37   ` Damian Hobson-Garcia
  -1 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-22  2:37 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: linux-kernel, linux-s390, catalin.marinas, will.deacon,
	linux-arm-kernel, msalter, linux-c6x-dev, deller, linux-parisc

Hello,
On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> 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).
> 


>  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

-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-22  2:37   ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-22  2:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,
On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> 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).
> 


>  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

-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
  2013-05-22  2:37   ` Damian Hobson-Garcia
  (?)
@ 2013-05-22  9:47     ` Catalin Marinas
  -1 siblings, 0 replies; 18+ messages in thread
From: Catalin Marinas @ 2013-05-22  9:47 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: linux-s390, linux-c6x-dev, linux-parisc, deller, Will Deacon,
	linux-kernel, msalter, linux-arm-kernel

On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
> Hello,
> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> > 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.

BTW, shouldn't this be called CONFIG_HAVE_DMA_ATTRS?

> > 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(-)
> > 
> 
> 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.

-- 
Catalin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-22  9:47     ` Catalin Marinas
  0 siblings, 0 replies; 18+ messages in thread
From: Catalin Marinas @ 2013-05-22  9:47 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
> Hello,
> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> > 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.

BTW, shouldn't this be called CONFIG_HAVE_DMA_ATTRS?

> > 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(-)
> > 
> 
> 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.

-- 
Catalin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-22  9:47     ` Catalin Marinas
  0 siblings, 0 replies; 18+ messages in thread
From: Catalin Marinas @ 2013-05-22  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
> Hello,
> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> > 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.

BTW, shouldn't this be called CONFIG_HAVE_DMA_ATTRS?

> > 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(-)
> > 
> 
> 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.

-- 
Catalin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
  2013-05-22  2:37   ` Damian Hobson-Garcia
@ 2013-05-22 18:19     ` Helge Deller
  -1 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2013-05-22 18:19 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: linux-kernel, linux-s390, catalin.marinas, will.deacon,
	linux-arm-kernel, msalter, linux-c6x-dev, linux-parisc

On 05/22/2013 04:37 AM, Damian Hobson-Garcia wrote:
> Hello,
> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>> 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).
>>
> 
> 
>>  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?

I already pushed the parisc change upstream.
See commit 7f64fb41aad9a8504dd76e81b2391eae64e1498a

Helge

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-22 18:19     ` Helge Deller
  0 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2013-05-22 18:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/22/2013 04:37 AM, Damian Hobson-Garcia wrote:
> Hello,
> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>> 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).
>>
> 
> 
>>  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?

I already pushed the parisc change upstream.
See commit 7f64fb41aad9a8504dd76e81b2391eae64e1498a

Helge

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
  2013-05-22  9:47     ` Catalin Marinas
  (?)
@ 2013-05-23  2:47       ` Damian Hobson-Garcia
  -1 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-23  2:47 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

Hi Catalin,
On 2013/05/22 18:47, Catalin Marinas wrote:
> On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
>> Hello,
>> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>>> 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.
> 
> 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).

> 
>>> 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(-)
>>>
>>
>> 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.

> 
> Thanks.
> 
Damian
-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-23  2:47       ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-23  2:47 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

Hi Catalin,
On 2013/05/22 18:47, Catalin Marinas wrote:
> On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
>> Hello,
>> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>>> 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.
> 
> 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).

> 
>>> 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(-)
>>>
>>
>> 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.

> 
> Thanks.
> 
Damian
-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-23  2:47       ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-23  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Catalin,
On 2013/05/22 18:47, Catalin Marinas wrote:
> On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
>> Hello,
>> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>>> 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.
> 
> 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).

> 
>>> 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(-)
>>>
>>
>> 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.

> 
> Thanks.
> 
Damian
-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
  2013-05-23  2:47       ` Damian Hobson-Garcia
  (?)
@ 2013-05-23  9:47         ` Catalin Marinas
  -1 siblings, 0 replies; 18+ messages in thread
From: Catalin Marinas @ 2013-05-23  9:47 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

On Thu, May 23, 2013 at 03:47:13AM +0100, Damian Hobson-Garcia wrote:
> Hi Catalin,
> On 2013/05/22 18:47, Catalin Marinas wrote:
> > On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
> >> Hello,
> >> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> >>> 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.
> > 
> > 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).

My point was about the commit log - grep'ing the kernel for
CONFIG_HAVE_DMA did not return anything.

-- 
Catalin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-23  9:47         ` Catalin Marinas
  0 siblings, 0 replies; 18+ messages in thread
From: Catalin Marinas @ 2013-05-23  9:47 UTC (permalink / raw)
  To: Damian Hobson-Garcia
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

On Thu, May 23, 2013 at 03:47:13AM +0100, Damian Hobson-Garcia wrote:
> Hi Catalin,
> On 2013/05/22 18:47, Catalin Marinas wrote:
> > On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
> >> Hello,
> >> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> >>> 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.
> > 
> > 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).

My point was about the commit log - grep'ing the kernel for
CONFIG_HAVE_DMA did not return anything.

-- 
Catalin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-23  9:47         ` Catalin Marinas
  0 siblings, 0 replies; 18+ messages in thread
From: Catalin Marinas @ 2013-05-23  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 23, 2013 at 03:47:13AM +0100, Damian Hobson-Garcia wrote:
> Hi Catalin,
> On 2013/05/22 18:47, Catalin Marinas wrote:
> > On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
> >> Hello,
> >> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
> >>> 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.
> > 
> > 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).

My point was about the commit log - grep'ing the kernel for
CONFIG_HAVE_DMA did not return anything.

-- 
Catalin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
  2013-05-23  9:47         ` Catalin Marinas
  (?)
@ 2013-05-24  2:52           ` Damian Hobson-Garcia
  -1 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-24  2:52 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

On 2013/05/23 18:47, Catalin Marinas wrote:
> On Thu, May 23, 2013 at 03:47:13AM +0100, Damian Hobson-Garcia wrote:
>> Hi Catalin,
>> On 2013/05/22 18:47, Catalin Marinas wrote:
>>> On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
>>>> Hello,
>>>> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>>>>> 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.
>>>
>>> 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).
> 
> My point was about the commit log - grep'ing the kernel for
> CONFIG_HAVE_DMA did not return anything.
> 

Oh yes, my mistake.  It should be CONFIG_HAS_DMA instead of
CONFIG_HAVE_DMA.  I'll update it.

Damian


-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-24  2:52           ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-24  2:52 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-kernel, linux-s390, Will Deacon, linux-arm-kernel, msalter,
	linux-c6x-dev, deller, linux-parisc

On 2013/05/23 18:47, Catalin Marinas wrote:
> On Thu, May 23, 2013 at 03:47:13AM +0100, Damian Hobson-Garcia wrote:
>> Hi Catalin,
>> On 2013/05/22 18:47, Catalin Marinas wrote:
>>> On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
>>>> Hello,
>>>> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>>>>> 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.
>>>
>>> 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).
> 
> My point was about the commit log - grep'ing the kernel for
> CONFIG_HAVE_DMA did not return anything.
> 

Oh yes, my mistake.  It should be CONFIG_HAS_DMA instead of
CONFIG_HAVE_DMA.  I'll update it.

Damian


-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs
@ 2013-05-24  2:52           ` Damian Hobson-Garcia
  0 siblings, 0 replies; 18+ messages in thread
From: Damian Hobson-Garcia @ 2013-05-24  2:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 2013/05/23 18:47, Catalin Marinas wrote:
> On Thu, May 23, 2013 at 03:47:13AM +0100, Damian Hobson-Garcia wrote:
>> Hi Catalin,
>> On 2013/05/22 18:47, Catalin Marinas wrote:
>>> On Wed, May 22, 2013 at 03:37:17AM +0100, Damian Hobson-Garcia wrote:
>>>> Hello,
>>>> On 2013/04/30 12:01, Damian Hobson-Garcia wrote:
>>>>> 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.
>>>
>>> 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).
> 
> My point was about the commit log - grep'ing the kernel for
> CONFIG_HAVE_DMA did not return anything.
> 

Oh yes, my mistake.  It should be CONFIG_HAS_DMA instead of
CONFIG_HAVE_DMA.  I'll update it.

Damian


-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-05-24  2:52 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30  3:01 [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() for all archs Damian Hobson-Garcia
2013-04-30  3:01 ` [PATCH v2 0/4] dma-mapping: Define dma_{alloc, free}_attrs() " Damian Hobson-Garcia
2013-05-22  2:37 ` [PATCH v2 0/4] dma-mapping: Define dma_{alloc,free}_attrs() " Damian Hobson-Garcia
2013-05-22  2:37   ` Damian Hobson-Garcia
2013-05-22  9:47   ` Catalin Marinas
2013-05-22  9:47     ` Catalin Marinas
2013-05-22  9:47     ` Catalin Marinas
2013-05-23  2:47     ` Damian Hobson-Garcia
2013-05-23  2:47       ` Damian Hobson-Garcia
2013-05-23  2:47       ` Damian Hobson-Garcia
2013-05-23  9:47       ` Catalin Marinas
2013-05-23  9:47         ` Catalin Marinas
2013-05-23  9:47         ` Catalin Marinas
2013-05-24  2:52         ` Damian Hobson-Garcia
2013-05-24  2:52           ` Damian Hobson-Garcia
2013-05-24  2:52           ` Damian Hobson-Garcia
2013-05-22 18:19   ` Helge Deller
2013-05-22 18:19     ` Helge Deller

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.