Skip to contentSkip to conversation

DMA bus-master writes & CPU cache question

DISCUSSION Alan Arolovitch 2 participants 2 messages Jul 12, 1999

lore
Share & tools
lore
#0 lore raw

Hi,

we're developing broadband NIC driver and I have the following
question: the hardware performs PCI bus-master DMA writes into the RAM and the driver is either throgh polling or interrupt handling routine reads the DMA area.
Should CPU cache affect reading data from the DMA area, i.e. may some buffering effect or data inconherence appear? If so, what are the options?
I've seen some mention to allocation of non-cacheable memory in NDIS documentation, is it something I have to do in Linux as well?

i'd appreciate responses via email, i don't regularly monitor the list. and of course i'll summarize to the list..

rgds,

						--alan.
Signature · 7 lines
Alan Arolovitch, CTO		       Gravity Computing Solutions Ltd.	
email: [email protected] + tel.: +972-3-5474450 + fax: +972-3-5474451

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw
Quoted 3 lines

Should CPU cache affect reading data from the DMA area, i.e. may some buffering effect or data inconherence appear? If so, what are the options?

This depends on your architecture. Intel platforms are fully DMA coherent; the chipset snoops on DMA cycles and flushes the cache as required to maintain a consistent view. On some other machines this is not the case and you must deal with the caches by hand (see, for example, include/asm-arm/proc-armv/io.h).

p.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/