[PATCH 01/10] ARM: change ARM_DMA_ZONE_SIZE into a variable

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Jul 6 19:09:45 EDT 2011


On Tue, Jul 05, 2011 at 11:12:16PM -0400, Nicolas Pitre wrote:
> On Wed, 6 Jul 2011, Barry Song wrote:
> 
> > 2011/7/6 Nicolas Pitre <nicolas.pitre at linaro.org>:
> > > Having this value defined at compile time prevents multiple machines with
> > > conflicting definitions to coexist.  Move it to a variable in preparation
> > > for having a per machine value selected at run time.  This is relevant
> > > only when CONFIG_ZONE_DMA is selected.
> > >
> > > Signed-off-by: Nicolas Pitre <nicolas.pitre at linaro.org>
> > 
> > that is definitely good. i am not sure whether it will be better if
> > dma zone becomes a property in memory node of DT.
> 
> Certainly.  But one thing at a time.  This is the first step. Then, 
> those machines that are converted to DT could more easily provide the 
> information via this mechanism if they so desire.

Actually, putting that information into DT is probably not right -
you're describing something which is specific to Linux, not something
which is due to hardware.

What I mean is that the DMA zone is a Linux specific thing.  Another OS
could have a different way of dealing with the DMA restrictions (it
may be possible to allocate memory within a certain set of bounds.)

What is hardware specific is that the DMA devices can only address a
limited range of memory.  IMHO it's that which should be described in
DT, not that we'll have a DMA zone of X bytes in size.



More information about the linux-arm-kernel mailing list