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] [POWERPC] merge

# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID 9a758f814f60166dcf4a386bb9835f58c8f68502
# Parent  dbc74db14a4b39d359365fcf8257216d968fa269
# Parent  6af601c5ebe192a0de72430cdd94da5ba46ff287
[POWERPC] merge
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/boot_of.c     |    7 ++++---
 xen/arch/powerpc/exceptions.c  |   19 +++++++++++++++++--
 xen/arch/powerpc/time.c        |    2 +-
 xen/include/asm-powerpc/time.h |    2 +-
 4 files changed, 23 insertions(+), 7 deletions(-)

diff -r dbc74db14a4b -r 9a758f814f60 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Tue Dec 12 14:35:07 2006 -0600
+++ b/xen/arch/powerpc/boot_of.c        Fri Dec 15 13:37:38 2006 -0600
@@ -1167,6 +1167,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 */
@@ -1181,12 +1182,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 dbc74db14a4b -r 9a758f814f60 xen/arch/powerpc/exceptions.c
--- a/xen/arch/powerpc/exceptions.c     Tue Dec 12 14:35:07 2006 -0600
+++ b/xen/arch/powerpc/exceptions.c     Fri Dec 15 13:37:38 2006 -0600
@@ -35,7 +35,9 @@ extern ulong ppc_do_softirq(ulong orig_m
 extern ulong ppc_do_softirq(ulong orig_msr);
 extern void do_timer(struct cpu_user_regs *regs);
 extern void do_dec(struct cpu_user_regs *regs);
-extern void program_exception(struct cpu_user_regs *regs, unsigned long 
cookie);
+extern void program_exception(struct cpu_user_regs *regs,
+                              unsigned long cookie);
+extern int reprogram_timer(s_time_t timeout); 
 
 int hdec_sample = 0;
 
@@ -43,7 +45,20 @@ void do_timer(struct cpu_user_regs *regs
 {
     /* Set HDEC high so it stops firing and can be reprogrammed by
      * set_preempt() */
-    mthdec(INT_MAX);
+    /* FIXME! HACK ALERT!
+     *
+     * We have a bug in that if we switch domains in schedule() we
+     * switch right away regardless of whatever else is pending.  This
+     * means that if the timer goes off while in schedule(), the next
+     * domain will be preempted by the interval defined below.  So
+     * until we fix our cotnext_switch(), the follow workaround will
+     * make sure that the domain we switch to does not run for to long
+     * so we can continue to service the other timers in the timer
+     * queue and that the value is long enough to escape this
+     * particular timer event.
+     */
+    reprogram_timer(NOW() + MILLISECS(1));
+
     raise_softirq(TIMER_SOFTIRQ);
 }
 
diff -r dbc74db14a4b -r 9a758f814f60 xen/arch/powerpc/time.c
--- a/xen/arch/powerpc/time.c   Tue Dec 12 14:35:07 2006 -0600
+++ b/xen/arch/powerpc/time.c   Fri Dec 15 13:37:38 2006 -0600
@@ -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 dbc74db14a4b -r 9a758f814f60 xen/include/asm-powerpc/time.h
--- a/xen/include/asm-powerpc/time.h    Tue Dec 12 14:35:07 2006 -0600
+++ b/xen/include/asm-powerpc/time.h    Fri Dec 15 13:37:38 2006 -0600
@@ -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] [POWERPC] merge, Xen patchbot-xenppc-unstable <=