aboutsummaryrefslogtreecommitdiff
path: root/core/test
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-06-25 08:47:35 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-06 19:30:48 +1000
commit7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c (patch)
tree822c2d8da19528bbb0ded69234cce0e4655b84dd /core/test
parentfb43f202ddd86131acf14542c34fbcb9adab45f2 (diff)
downloadskiboot-7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c.zip
skiboot-7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c.tar.gz
skiboot-7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c.tar.bz2
Timebase quirk for slow simulators like AWAN and SIMICS
This will internally pretend the timebase is running 1000 times slower, which reduces some otherwise really terrible delays in some simulators. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: move cfam_chipid cleanup into own patch] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/test')
-rw-r--r--core/test/run-timebase.c2
-rw-r--r--core/test/run-timer.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/core/test/run-timebase.c b/core/test/run-timebase.c
index 2d4c83d..38c41fd 100644
--- a/core/test/run-timebase.c
+++ b/core/test/run-timebase.c
@@ -22,6 +22,8 @@
#define __TEST__
#include <timebase.h>
+unsigned long tb_hz = 512000000;
+
int main(void)
{
/* This is a fairly solid assumption that the math we're doing
diff --git a/core/test/run-timer.c b/core/test/run-timer.c
index e1a7cef..75c40fe 100644
--- a/core/test/run-timer.c
+++ b/core/test/run-timer.c
@@ -13,6 +13,8 @@ struct lock;
static inline void lock(struct lock *l) { (void)l; }
static inline void unlock(struct lock *l) { (void)l; }
+unsigned long tb_hz = 512000000;
+
#include "../timer.c"
#define NUM_TIMERS 100