annotate TaskManager/Fifo/PreRefDmaManager.cc @ 1479:163220e54cc0 draft

remove hard code for TaskLog
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Tue, 24 Jul 2012 17:15:15 +0900
parents 94ac6d8e73aa
children 411401d1cb71
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1286
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include "PreRefDmaManager.h"
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include "Scheduler.h"
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include "TaskManagerImpl.h"
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 void *
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 PreRefDmaManager::dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask)
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 {
1369
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
8 unsigned long long wait = 0;
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
9 (this->*start_dmawait_profile)();
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
10
1286
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 #ifdef __CERIUM_FIFO__
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 asm("prefetcht0 %0"::"m"(addr):"memory");
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #endif // __CERIUM_FIFO__
1369
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
14
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
15 (this->*end_dmawait_profile)(&wait);
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
16 global_load_time += wait;
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
17 dma_load_time += wait;
186b0681bc87 modified result of the measure
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1286
diff changeset
18
1286
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 return (void*)addr;
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 }
ddda67d4284c added Prefetch Referenced Dma Manager
Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
1413
5b024efa2429 fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1369
diff changeset
22 void
1414
94ac6d8e73aa fix free inifite loop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1413
diff changeset
23 PreRefDmaManager::free_(void *buf) {
1413
5b024efa2429 fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1369
diff changeset
24 }