Skip to contentSkip to conversation

Workaround for USB DMA bugs

DISCUSSION Jeremy Rosen 3 participants 3 messages Apr 4, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

I guess if we can ensure a DMA-only pool, simple alignment will work. You just can't kmalloc() because you don't know what may follow

something

Quoted 1 line

that isn't modulo cache line size. You also have to be careful of

code

Quoted 2 lines

that allocates a large object, then uses part of it for DMA and other parts for processor core data. I'm not sure we want to require

kmalloc()

Quoted 1 line

to always cache align due to the potential for wasted memory space.

can't we use the __GFP_DMA flag to specify that the area must have algnment enforced ?
or did I misunderstand the use of this flag ?

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 2 lines · Jeremy Rosen

can't we use the __GFP_DMA flag to specify that the area must have algnment enforced ?

Maybe, but that isn't its intended use.

Quoted 1 line

or did I misunderstand the use of this flag ?

This flag is used on architectures that have memory only accessible from the processor, not from a DMA device, to ensure a DMA device gets a memory bank that it can access.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 7 lines · Dan Malek
Quoted 2 lines · Jeremy Rosen

can't we use the __GFP_DMA flag to specify that the area must have algnment enforced ?

Quoted 7 lines

Maybe, but that isn't its intended use.

Quoted 1 line

or did I misunderstand the use of this flag ?

This flag is used on architectures that have memory only accessible from the processor, not from a DMA device, to ensure a DMA device gets a memory bank that it can access.

More specifically it's used on x86 for old ISA devices.

--
David Gibson | For every complex problem there is a
[email protected] | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/