Re: PCI DMA to small buffers on cache-incoherent arch

Oliver Neukum
2002-06-11T17:54:45Z

Am Dienstag, 11. Juni 2002 14:04 schrieb David S. Miller:
> From: Oliver Neukum <oliver@neukum.name>
> Date: Tue, 11 Jun 2002 14:06:14 +0200
>
> A sparc64 is unlikely to be short on memory, or is it ?
> What's wrong with always aligning on 128 bytes on sparc64 ?
> A runtime check would be expensive.
>
> Maybe on arch FOO, target X needs no alignment when using PCI
> controller Y, but for PCI controller Z it does need alignment.

Still does that justify the overhead and the complications ?
Couldn't we provide for the worst case in a generic kernel
and make it a compile time option ?

If I understand you correctly, we even couldn't use kmalloc()
for allocating the buffers. IMHO you cannot expose that to
driver writers and hope to get a useful result.
So what are the alternatives ?
We could either use a bounce buffer or disable caching for the
page in question, which has its own set of problems.

Regards
Oliver