Skip to contentSkip to conversation

: Fix Ultra10 SILO timer

PATCH In review David S. Miller 2 participants 2 messages Apr 21, 2006 – Apr 22, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix Ultra10 SILO timer

Ok, this should fix the Ultra10 problem and keep Niagara working at the same time. I tested this successfully on my T2 box.

timer.c renamed from timer.c.~1~ +18 -0
@@ -40,6 +40,8 @@
 static volatile struct sun4c_timer_info *sun4c_timer;
 static unsigned char *addr_to_free = 0;
 static int len_to_free;
+static unsigned long long sun4u_tickcmpr;
+static int sun4u_notimer = 0;
 static struct mostek48t02 *mregs;
 static long clock_frequency;
 
@@ -154,6 +156,16 @@
     }
     if (!foundcpu || !clock_frequency)
         clock_frequency = prom_getint(prom_root_node, "clock-frequency") / 100;
+    if (notimer) {
+        sun4u_notimer = 1;
+        __asm__ __volatile__ ("\t"
+        	"rd	%%tick_cmpr, %%g1\n\t"
+        	"stx	%%g1, [%0]\n\t"
+        	"mov	1, %%g1\n\t"
+        	"sllx    %%g1, 63, %%g1\n\t"
+        	"wr      %%g1, 0, %%tick_cmpr"
+        	: : "r" (&sun4u_tickcmpr) : "g1");
+    }
     return 0;
 }
 
@@ -194,6 +206,12 @@
 
 void close_timer ()
 {
+    if (sun4u_notimer) {
+        __asm__ __volatile__("\t"
+        	"ldx	[%0], %%g1\n\t"
+        	"wr	%%g1, 0, %%tick_cmpr"
+        	: : "r" (&sun4u_tickcmpr) : "g1");
+    }
     if (addr_to_free) {
         if (addr_to_free = (unsigned char *)0xffffffff)
             sun4c_unmapio (TICKER_VIRTUAL);
#1 lore raw
Quoted 3 lines · David S. Miller

Ok, this should fix the Ultra10 problem and keep Niagara working at the same time. I tested this successfully on my T2 box.

Works on my U10 to. Thanks again.