diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2011-03-17 19:20:20 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2011-03-17 19:20:20 -0500 |
commit | b78be240cf1c1269ed83548bf71095193487ca33 (patch) | |
tree | 6ee8630c22e3c72291bd9fb647a91d70efed332d /src/cpu | |
parent | fe3d790ac8da41e8a0b9af93510cd874585c37e7 (diff) | |
download | gem5-b78be240cf1c1269ed83548bf71095193487ca33.tar.xz |
ARM: Detect and skip udelay() functions in linux kernel.
This change speeds up booting, especially in MP cases, by not executing
udelay() on the core but instead skipping ahead tha amount of time that is being
delayed.
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/simple/atomic.cc | 3 | ||||
-rw-r--r-- | src/cpu/simple/timing.cc | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 27635d3ce..6aa0eb64e 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -641,6 +641,9 @@ AtomicSimpleCPU::tick() checkForInterrupts(); checkPcEventQueue(); + // We must have just got suspended by a PC event + if (_status == Idle) + return; Fault fault = NoFault; diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 632e83356..aca48e5d4 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -714,6 +714,10 @@ TimingSimpleCPU::fetch() checkPcEventQueue(); + // We must have just got suspended by a PC event + if (_status == Idle) + return; + TheISA::PCState pcState = thread->pcState(); bool needToFetch = !isRomMicroPC(pcState.microPC()) && !curMacroStaticInst; |