O3: Fix pipeline restart when a table walk completes in the fetch stage.
When a table walk is initiated by the fetch stage, the CPU can potentially move to the idle state and never wake up. The fetch stage must call cpu->wakeCPU() when a translation completes (in finishTranslation()).
This commit is contained in:
parent
74eff1b71b
commit
a05032f4df
|
@ -604,6 +604,9 @@ DefaultFetch<Impl>::finishTranslation(Fault fault, RequestPtr mem_req)
|
|||
ThreadID tid = mem_req->threadId();
|
||||
Addr block_PC = mem_req->getVaddr();
|
||||
|
||||
// Wake up CPU if it was idle
|
||||
cpu->wakeCPU();
|
||||
|
||||
// If translation was successful, attempt to read the icache block.
|
||||
if (fault == NoFault) {
|
||||
// Build packet here.
|
||||
|
@ -654,6 +657,9 @@ DefaultFetch<Impl>::finishTranslation(Fault fault, RequestPtr mem_req)
|
|||
instruction->fault = fault;
|
||||
wroteToTimeBuffer = true;
|
||||
|
||||
DPRINTF(Activity, "Activity this cycle.\n");
|
||||
cpu->activityThisCycle();
|
||||
|
||||
fetchStatus[tid] = TrapPending;
|
||||
|
||||
DPRINTF(Fetch, "[tid:%i]: Blocked, need to handle the trap.\n", tid);
|
||||
|
|
Loading…
Reference in a new issue