From: Gabe Black Date: Thu, 12 Dec 2019 04:17:39 +0000 (-0800) Subject: kern: Stop using a pseudo instruction to quiesce the ThreadContext. X-Git-Tag: v20.0.0.0~363 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4cc270d947ec6b87d02fdff594218fd31e933ec;p=gem5.git kern: Stop using a pseudo instruction to quiesce the ThreadContext. The pseudo instruction implementation is very short, and so doing the work it was doing directly doesn't really add much to the implementation of the udelay events. By not calling the pseudo instruction we also uncouple these unrelated mechanisms and don't, for instance, cause pseudo instruction debug output every time udelay executes. Change-Id: I5c9b32509562487e53b2acfa1a3f6226d33d1cfd Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23748 Tested-by: kokoro Reviewed-by: Bobby R. Bruce Maintainer: Gabe Black --- diff --git a/src/kern/freebsd/events.cc b/src/kern/freebsd/events.cc index 15954d672..a9e2854db 100644 --- a/src/kern/freebsd/events.cc +++ b/src/kern/freebsd/events.cc @@ -40,7 +40,6 @@ #include "debug/DebugPrintf.hh" #include "kern/system_events.hh" #include "sim/arguments.hh" -#include "sim/pseudo_inst.hh" #include "sim/system.hh" namespace FreeBSD { @@ -69,9 +68,8 @@ UDelayEvent::process(ThreadContext *tc) // __delay and __loop_delay functions. One form involves setting quiesce // time to 0 with the assumption that quiesce will not happen. To avoid // the quiesce handling in this case, only execute the quiesce if time > 0. - if (time > 0) { - PseudoInst::quiesceNs(tc, time); - } + if (time > 0) + tc->quiesceTick(curTick() + SimClock::Int::ns * time); } } // namespace FreeBSD diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc index 199dfc68f..3c0cbbf88 100644 --- a/src/kern/linux/events.cc +++ b/src/kern/linux/events.cc @@ -52,7 +52,7 @@ #include "kern/linux/printk.hh" #include "kern/system_events.hh" #include "sim/arguments.hh" -#include "sim/pseudo_inst.hh" +#include "sim/core.hh" #include "sim/system.hh" namespace Linux { @@ -90,9 +90,8 @@ UDelayEvent::process(ThreadContext *tc) // __delay and __loop_delay functions. One form involves setting quiesce // time to 0 with the assumption that quiesce will not happen. To avoid // the quiesce handling in this case, only execute the quiesce if time > 0. - if (time > 0) { - PseudoInst::quiesceNs(tc, time); - } + if (time > 0) + tc->quiesceTick(curTick() + SimClock::Int::ns * time); } void