[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Hvordan omgår man cpu'ens cache ved læsning fra memory?



Hej,
Jeg er ved at lave en device driver til en ARM9 cpu.
Driveren bruger DMA, og det virker fint - bortset
fra at mine læsninger fra hukommelsen går galt.

Første gang jeg bruger en given buffer er alt ok, men
anden gang er det blandet nyt og gammelt.
Nye og gamle data ligger tilfældigt i grupper af
"cacheline size" størrelse.

f.eks: (cacheline size=2 her)

read 1: (skal være aaaaaa...)
aaaaaaaaaaaaaaaaaa

read 2: (skal være bbbbbb...)
bbbbaabbbbaaaaaabb

Så jeg er rimeligt sikker på at det er cpu'ens data cache
som spiller mig et pus.

Så det store spørgsmål er har Linux et interface til at
omgås (flushe) datacachen?


Jeg troede at kmalloc(sizeof(buffer), GFP_ATOMIC | __GFP_DMA); ville løse mit problem men det ser ud til at __GFP_DMA er et fix til x86 for at deres DMA ikke kan bruge memory over 16MB.


-- med venlig hilsen / best regards

Henrik Bork Steffensen
RoseTechnology A/S




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *