ia64/xen-unstable
changeset 14245:5a2b3a1b1f63
[XEN][POWERPC] Normalize timbase_freq to a 64bit value
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author | Jimi Xenidis <jimix@watson.ibm.com> |
---|---|
date | Fri Dec 15 08:16:56 2006 -0500 (2006-12-15) |
parents | 156f2644eb06 |
children | e74bfc744717 8f0b5295bb1b |
files | xen/arch/powerpc/boot_of.c xen/arch/powerpc/time.c xen/include/asm-powerpc/time.h |
line diff
1.1 --- a/xen/arch/powerpc/boot_of.c Fri Dec 15 08:36:03 2006 -0500 1.2 +++ b/xen/arch/powerpc/boot_of.c Fri Dec 15 08:16:56 2006 -0500 1.3 @@ -1206,6 +1206,7 @@ static int __init boot_of_cpus(void) 1.4 s32 cpuid; 1.5 u32 cpu_clock[2]; 1.6 extern uint cpu_hard_id[NR_CPUS]; 1.7 + u32 tbf; 1.8 1.9 /* Look up which CPU we are running on right now and get all info 1.10 * from there */ 1.11 @@ -1220,12 +1221,12 @@ static int __init boot_of_cpus(void) 1.12 1.13 cpu_node = bootcpu_node; 1.14 1.15 - result = of_getprop(cpu_node, "timebase-frequency", &timebase_freq, 1.16 - sizeof(timebase_freq)); 1.17 + result = of_getprop(cpu_node, "timebase-frequency", &tbf, sizeof(tbf)); 1.18 + timebase_freq = tbf; 1.19 if (result == OF_FAILURE) { 1.20 of_panic("Couldn't get timebase frequency!\n"); 1.21 } 1.22 - of_printf("OF: timebase-frequency = %d Hz\n", timebase_freq); 1.23 + of_printf("OF: timebase-frequency = %ld Hz\n", timebase_freq); 1.24 1.25 result = of_getprop(cpu_node, "clock-frequency", 1.26 &cpu_clock, sizeof(cpu_clock));
2.1 --- a/xen/arch/powerpc/time.c Fri Dec 15 08:36:03 2006 -0500 2.2 +++ b/xen/arch/powerpc/time.c Fri Dec 15 08:16:56 2006 -0500 2.3 @@ -32,7 +32,7 @@ 2.4 static int cpu_has_hdec = 1; 2.5 ulong ticks_per_usec; 2.6 unsigned long cpu_khz; 2.7 -unsigned int timebase_freq; 2.8 +s64 timebase_freq; 2.9 2.10 s_time_t get_s_time(void) 2.11 {
3.1 --- a/xen/include/asm-powerpc/time.h Fri Dec 15 08:36:03 2006 -0500 3.2 +++ b/xen/include/asm-powerpc/time.h Fri Dec 15 08:16:56 2006 -0500 3.3 @@ -27,7 +27,7 @@ 3.4 #include <xen/percpu.h> 3.5 #include <asm/processor.h> 3.6 3.7 -extern unsigned int timebase_freq; 3.8 +extern s64 timebase_freq; 3.9 #define CLOCK_TICK_RATE timebase_freq 3.10 3.11 #define watchdog_disable() ((void)0)