Re: DMA API issues

From: Ian Molton
Date: Fri Jun 18 2004 - 20:01:19 EST


On Fri, 18 Jun 2004 20:22:07 -0400
Jeff Garzik <jgarzik@xxxxxxxxx> wrote:

> > my CPU can write directly to this 32K of SRAM. the chip can DMA from
> > it.
>
>
> Yes, write via MMIO. Non-local RAM is not DMA.

I fail to see your point. this is NOT MMIO. in MMIO you write and the
device reads as you write. in DMA, you write and then tell the chip to
read from the memory you wrote to.

this is exactly what Im talking about.

Heres what the DMA mapping code deals with:

CPU-----host bus------>RAM-----io bus---->device


and heres what I have:

CPU-----host bus----->RAM-----io bus----->device

the *only* difference is that the RAM in the first case is SDRAM and in
the latter is SRAM. the type of RAM is irrelevant to the DMA system.

I *could* (at great expense) replace the SDRAM in a PC with SRAM. DMA
would still work the same way.

sure, the SRAM is *on* the die of my OCHI/multi-io controller. whats
that got to do with it?

and theres the other issue - if I made an ohci allocator for the SRAM
I'd have to partition off a small ammount ONLY for OHCI. with only 32K
to begin with thats a huge penalty for all the other devices in the
multi IO chip. a bus level DMA allocator solves this AND makes drivers
cleaner/more maintainable.

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