public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove CLOCK_TICK_RATE from tsc code
@ 2011-08-04  0:09 Deepak Saxena
  2011-08-05 10:33 ` John Stultz
  0 siblings, 1 reply; 4+ messages in thread
From: Deepak Saxena @ 2011-08-04  0:09 UTC (permalink / raw)
  To: Thomas Gleixner, John Stultz; +Cc: linux-kernel, Linus Torvalds


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.

Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
---
 arch/x86/kernel/tsc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index db48336..1e88c8e 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -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
 
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove CLOCK_TICK_RATE from tsc code
  2011-08-04  0:09 [PATCH] Remove CLOCK_TICK_RATE from tsc code Deepak Saxena
@ 2011-08-05 10:33 ` John Stultz
  0 siblings, 0 replies; 4+ messages in thread
From: John Stultz @ 2011-08-05 10:33 UTC (permalink / raw)
  To: dsaxena; +Cc: Thomas Gleixner, linux-kernel, Linus Torvalds

On Wed, 2011-08-03 at 17:09 -0700, Deepak Saxena wrote:
> 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.
> 
> Signed-off-by: Deepak Saxena <dsaxena@linaro.org>

Acked-by: John Stultz <john.stultz@linaro.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Remove CLOCK_TICK_RATE from tsc code
@ 2011-11-01 21:25 Deepak Saxena
  2011-11-02 20:25 ` John Stultz
  0 siblings, 1 reply; 4+ messages in thread
From: Deepak Saxena @ 2011-11-01 21:25 UTC (permalink / raw)
  To: Thomas Gleixner, John Stultz; +Cc: linux-kernel, Linus Torvalds


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.

Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
---
 arch/x86/kernel/tsc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index db48336..1e88c8e 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -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
 
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove CLOCK_TICK_RATE from tsc code
  2011-11-01 21:25 Deepak Saxena
@ 2011-11-02 20:25 ` John Stultz
  0 siblings, 0 replies; 4+ messages in thread
From: John Stultz @ 2011-11-02 20:25 UTC (permalink / raw)
  To: dsaxena; +Cc: Thomas Gleixner, linux-kernel, Linus Torvalds

On Tue, 2011-11-01 at 14:25 -0700, Deepak Saxena wrote:
> 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-02 20:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04  0:09 [PATCH] Remove CLOCK_TICK_RATE from tsc code Deepak Saxena
2011-08-05 10:33 ` John Stultz
  -- strict thread matches above, loose matches on Subject: below --
2011-11-01 21:25 Deepak Saxena
2011-11-02 20:25 ` John Stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox