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

From: Oliver Neukum (oliver@neukum.name)
Date: Tue Jun 11 2002 - 09:23:30 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:23 EST