Skip to contentSkip to conversation

Remove CLOCK_TICK_RATE from tsc code

PATCH Applied Deepak Saxena 2 participants 2 messages Nov 1, 2011 – Nov 2, 2011 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove CLOCK_TICK_RATE from tsc code

The tsc code uses CLOCK_TICK_RATE which on x86 is defined to just be the same as PIT_TICK_RATE. This patch updates the code use the later as we want to depecrate and remove the global CLOCK_TICK_RATE symbol.

---
 arch/x86/kernel/tsc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/tsc.c +2 -2
index db48336..1e88c8e 100644
@@ -178,11 +178,11 @@ static unsigned long calc_pmtimer_ref(u64 deltatsc, u64 pm1, u64 pm2)
 }
 
 #define CAL_MS		10
-#define CAL_LATCH	(CLOCK_TICK_RATE / (1000 / CAL_MS))
+#define CAL_LATCH	(PIT_TICK_RATE / (1000 / CAL_MS))
 #define CAL_PIT_LOOPS	1000
 
 #define CAL2_MS		50
-#define CAL2_LATCH	(CLOCK_TICK_RATE / (1000 / CAL2_MS))
+#define CAL2_LATCH	(PIT_TICK_RATE / (1000 / CAL2_MS))
 #define CAL2_PIT_LOOPS	5000
 
 
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 5 lines · Deepak Saxena

The tsc code uses CLOCK_TICK_RATE which on x86 is defined to just be the same as PIT_TICK_RATE. This patch updates the code use the later as we want to depecrate and remove the global CLOCK_TICK_RATE symbol.

So the ACTHZ issue is still at large (ie: we still want to have a better sense of the actual HZ frequency for the jiffies clocksource, since the irq generators will have some - possibly significant - granularity error), but I'm fine with these cases of just using PIT_TICK_RATE or PIT_LATCH on x86.

I've applied these four to my tree.

thanks
-john