* [PATCH -mm] x86_64: Adjust the timing of initializing cyc2ns_scale.
@ 2006-08-25 16:45 Toyo Abe
2006-08-25 16:55 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Toyo Abe @ 2006-08-25 16:45 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
The x86_64-mm-monotonic-clock.patch in 2.6.18-rc4-mm2 made a change to
the updating of monotonic_base. It now uses cycles_2_ns().
I suggest that a set_cyc2ns_scale() should be done prior to the setup_irq().
Because cycles_2_ns() can be called from the timer ISR right after the irq0
is enabled.
Signed-off-by: Toyo Abe <toyoa@mvista.com>
---
arch/x86_64/kernel/time.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 5bbd05d..03ddc1a 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -928,10 +928,10 @@ #endif
vxtime.quot = (USEC_PER_SEC << US_SCALE) / vxtime_hz;
vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz;
vxtime.last_tsc = get_cycles_sync();
- setup_irq(0, &irq0);
-
set_cyc2ns_scale(cpu_khz);
+ setup_irq(0, &irq0);
+
hotcpu_notifier(time_cpu_notifier, 0);
time_cpu_notifier(NULL, CPU_ONLINE, (void *)(long)smp_processor_id());
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -mm] x86_64: Adjust the timing of initializing cyc2ns_scale.
2006-08-25 16:45 [PATCH -mm] x86_64: Adjust the timing of initializing cyc2ns_scale Toyo Abe
@ 2006-08-25 16:55 ` Andi Kleen
2006-08-25 17:14 ` Toyo
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2006-08-25 16:55 UTC (permalink / raw)
To: Toyo Abe; +Cc: linux-kernel
On Friday 25 August 2006 18:45, Toyo Abe wrote:
> The x86_64-mm-monotonic-clock.patch in 2.6.18-rc4-mm2 made a change to
> the updating of monotonic_base. It now uses cycles_2_ns().
>
> I suggest that a set_cyc2ns_scale() should be done prior to the setup_irq().
> Because cycles_2_ns() can be called from the timer ISR right after the irq0
> is enabled.
Added thanks. I folded it into the original patch.
Did you actually see a failure or was this just from code review?
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -mm] x86_64: Adjust the timing of initializing cyc2ns_scale.
2006-08-25 16:55 ` Andi Kleen
@ 2006-08-25 17:14 ` Toyo
0 siblings, 0 replies; 3+ messages in thread
From: Toyo @ 2006-08-25 17:14 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
From: Andi Kleen <ak@suse.de>
Subject: Re: [PATCH -mm] x86_64: Adjust the timing of initializing cyc2ns_scale.
Date: Fri, 25 Aug 2006 18:55:57 +0200
> On Friday 25 August 2006 18:45, Toyo Abe wrote:
> > The x86_64-mm-monotonic-clock.patch in 2.6.18-rc4-mm2 made a change to
> > the updating of monotonic_base. It now uses cycles_2_ns().
> >
> > I suggest that a set_cyc2ns_scale() should be done prior to the setup_irq().
> > Because cycles_2_ns() can be called from the timer ISR right after the irq0
> > is enabled.
>
> Added thanks. I folded it into the original patch.
>
> Did you actually see a failure or was this just from code review?
> -Andi
>
I didn't see any failure on it. It was just a speculation. But I think
it's better thing here.
Best Regards,
toyo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-25 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-25 16:45 [PATCH -mm] x86_64: Adjust the timing of initializing cyc2ns_scale Toyo Abe
2006-08-25 16:55 ` Andi Kleen
2006-08-25 17:14 ` Toyo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®