From 7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Sat, 25 Jun 2016 08:47:35 +1000 Subject: 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 Acked-by: Michael Neuling [stewart@linux.vnet.ibm.com: move cfam_chipid cleanup into own patch] Signed-off-by: Stewart Smith --- include/chip.h | 1 + include/timebase.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/chip.h b/include/chip.h index 0038814..4541368 100644 --- a/include/chip.h +++ b/include/chip.h @@ -127,6 +127,7 @@ enum proc_chip_quirks { QUIRK_NO_PBA = 0x00000008, QUIRK_NO_OCC_IRQ = 0x00000010, QUIRK_SIMICS = 0x00000020, + QUIRK_SLOW_SIM = 0x00000040, } proc_chip_quirks; static inline bool chip_quirk(unsigned int q) diff --git a/include/timebase.h b/include/timebase.h index 7f5afe1..7fc4748 100644 --- a/include/timebase.h +++ b/include/timebase.h @@ -52,7 +52,7 @@ static inline enum tb_cmpval tb_compare(unsigned long a, } /* Architected timebase */ -static const unsigned long tb_hz = 512000000; +extern unsigned long tb_hz; static inline unsigned long secs_to_tb(unsigned long secs) { -- cgit v1.1