WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [xenppc-unstable] [XEN][POWERPC] Normalize timbase_freq to a 64

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [XEN][POWERPC] Normalize timbase_freq to a 64bit value
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Dec 2006 13:50:35 +0000
Delivery-date: Fri, 15 Dec 2006 06:09:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 20bd3b7b7519e01f7b6bfa97c7a655e1dc027f5d
# Parent  887e1cbac6154da0a3a3c2433fbc5b0fc2a1c9b8
[XEN][POWERPC] Normalize timbase_freq to a 64bit value

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 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 887e1cbac615 -r 20bd3b7b7519 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Mon Dec 11 20:50:32 2006 -0500
+++ b/xen/arch/powerpc/boot_of.c        Fri Dec 15 08:16:56 2006 -0500
@@ -1159,6 +1159,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 */
@@ -1173,12 +1174,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 887e1cbac615 -r 20bd3b7b7519 xen/arch/powerpc/time.c
--- a/xen/arch/powerpc/time.c   Mon Dec 11 20:50:32 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 887e1cbac615 -r 20bd3b7b7519 xen/include/asm-powerpc/time.h
--- a/xen/include/asm-powerpc/time.h    Mon Dec 11 20:50:32 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-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [XEN][POWERPC] Normalize timbase_freq to a 64bit value, Xen patchbot-xenppc-unstable <=