----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2857/#review6442 -----------------------------------------------------------
Ship it!
I had to code this up as well. Everything here looks fine.
For most places I had to convert to be thread-aware, I found using a reference
to be cleaner. Didn't hae to append a "[tid]" everywhere.
Example of my current mwait()
bool
BaseCPU::mwait(ThreadID tid, PacketPtr pkt)
{
assert(tid < numThreads);
AddressMonitor &monitor = addressMonitor[tid];
if(monitor.gotWakeup == false) {
int block_size = cacheLineSize();
uint64_t mask = ~((uint64_t)(block_size - 1));
assert(pkt->req->hasPaddr());
monitor.pAddr = pkt->getAddr() & mask;
monitor.waiting = true;
DPRINTF(Mwait,"[tid:%d] mwait called (vAddr=0x%lx, paddr=0x%lx)\n",
tid, monitor.vAddr, monitor.pAddr);
return true;
} else {
monitor.gotWakeup = false;
return false;
}
}
- Mitch Hayenga
On May 28, 2015, 3:40 p.m., Alexandru Dutu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/2857/
> -----------------------------------------------------------
>
> (Updated May 28, 2015, 3:40 p.m.)
>
>
> Review request for Default.
>
>
> Repository: gem5
>
>
> Description
> -------
>
> Changeset 10863:27ededc60d38
> ---------------------------
> cpu: Adding AddressMonitor structs for every hardware thread
> This patch builds toward having the ability to mwait on a ThreadContext,
> rather then on a CPU core. This is achieved by having a vector of
> AddressMonitor structs in BaseCPU.
>
>
> Diffs
> -----
>
> src/cpu/base.hh d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/base.cc d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/base_dyn_inst.hh d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/checker/cpu.hh d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/minor/exec_context.hh d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/o3/cpu.cc d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/simple/atomic.cc d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/simple/base.hh d02b45a554b52c68cce41e1b3895fb8582a639dd
> src/cpu/simple/timing.cc d02b45a554b52c68cce41e1b3895fb8582a639dd
>
> Diff: http://reviews.gem5.org/r/2857/diff/
>
>
> Testing
> -------
>
> Quick regressions passed for all ISAs.
>
>
> Thanks,
>
> Alexandru Dutu
>
>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev
