[Xen-changelog] [xen-unstable] [XEN][POWERPC] Normalize timbase_freq to a 64bit value

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Normalize timbase_freq to a 64bit value

Xen patchbot-unstable
# HG changeset patch
# User Jimi Xenidis <[hidden email]>
# Date 1166188616 18000
# Node ID 5a2b3a1b1f632475c8abdce25132e9d3ea767f7f
# Parent  156f2644eb062bc57e42747a745a8bac077e8d7b
[XEN][POWERPC] Normalize timbase_freq to a 64bit value
Signed-off-by: Jimi Xenidis <[hidden email]>
Signed-off-by: Hollis Blanchard <[hidden email]>
---
 xen/arch/powerpc/boot_of.c     |    7 ++++---
 xen/arch/powerpc/time.c        |    2 +-
 xen/include/asm-powerpc/time.h |    2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff -r 156f2644eb06 -r 5a2b3a1b1f63 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c Fri Dec 15 08:36:03 2006 -0500
+++ b/xen/arch/powerpc/boot_of.c Fri Dec 15 08:16:56 2006 -0500
@@ -1206,6 +1206,7 @@ static int __init boot_of_cpus(void)
     s32 cpuid;
     u32 cpu_clock[2];
     extern uint cpu_hard_id[NR_CPUS];
+    u32 tbf;
 
     /* Look up which CPU we are running on right now and get all info
      * from there */
@@ -1220,12 +1221,12 @@ static int __init boot_of_cpus(void)
 
     cpu_node = bootcpu_node;
 
-    result = of_getprop(cpu_node, "timebase-frequency", &timebase_freq,
-            sizeof(timebase_freq));
+    result = of_getprop(cpu_node, "timebase-frequency", &tbf, sizeof(tbf));
+    timebase_freq = tbf;
     if (result == OF_FAILURE) {
         of_panic("Couldn't get timebase frequency!\n");
     }
-    of_printf("OF: timebase-frequency = %d Hz\n", timebase_freq);
+    of_printf("OF: timebase-frequency = %ld Hz\n", timebase_freq);
 
     result = of_getprop(cpu_node, "clock-frequency",
                         &cpu_clock, sizeof(cpu_clock));
diff -r 156f2644eb06 -r 5a2b3a1b1f63 xen/arch/powerpc/time.c
--- a/xen/arch/powerpc/time.c Fri Dec 15 08:36:03 2006 -0500
+++ b/xen/arch/powerpc/time.c Fri Dec 15 08:16:56 2006 -0500
@@ -32,7 +32,7 @@ static int cpu_has_hdec = 1;
 static int cpu_has_hdec = 1;
 ulong ticks_per_usec;
 unsigned long cpu_khz;
-unsigned int timebase_freq;
+s64 timebase_freq;
 
 s_time_t get_s_time(void)
 {
diff -r 156f2644eb06 -r 5a2b3a1b1f63 xen/include/asm-powerpc/time.h
--- a/xen/include/asm-powerpc/time.h Fri Dec 15 08:36:03 2006 -0500
+++ b/xen/include/asm-powerpc/time.h Fri Dec 15 08:16:56 2006 -0500
@@ -27,7 +27,7 @@
 #include <xen/percpu.h>
 #include <asm/processor.h>
 
-extern unsigned int timebase_freq;
+extern s64 timebase_freq;
 #define CLOCK_TICK_RATE timebase_freq
 
 #define watchdog_disable() ((void)0)

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog