[uClinux-dev] SCSI problem for USB mass storage devices
davidm at snapgear.com
Wed Oct 19 06:09:20 EDT 2005
Jivin Erwin Authried lays it down ...
> On Wed, 2005-10-19 at 01:27, David McCullough wrote:
> > 1) Make a big DMA zone and no normal zone, possibly risk slowing down
> > normal allocations as they will switch to DMA if there is nothing else
> > to use.
> > 2) Not have a DMA zone
> > I think for "in kernel" use you actually want DMA to be the fastest
> > allocation, since net drivers and most HW will normally want DMA
> > memory. The only problem with 1 then would be most people would feel a
> > little uncomfortable with only having DMA memory available :-)
> > Also most !MMU systems don't use DMA.
> > So your solution below is ok, but maybe a little too generic. Some
> > uClinux systems (who know what other processors do) may actually have a
> > limited memory they can DMA from. Or you may want to limit it to some
> > faster memory ?
> what about making this
> #ifndef __GFP_DMA
> #define __GFP_DMA 0x01
> in linux/mm.h and defining __GFP_DMA in asm/arch/memory.h, if required?
> That wouldn't break any architectures that make use of the "standard"
> dma zone.
Or perhaps a kernel config option:
or some much better name. That way if it is not defined you get the
normal behaviour and platforms that want it can add it to their config.
#define __GFP_DMA 0x01
#define __GFP_DMA 0x00
Then in the m68knommu/armnommu you can add the config option, or just
define it as always on in the config if the platform is hardcoded.
David McCullough, davidm at cyberguard.com.au, Custom Embedded Solutions + Security
Ph:+61 734352815 Fx:+61 738913630 http://www.uCdot.org http://www.cyberguard.com
More information about the uClinux-dev