]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sparc64: Add write_pic() helper.
authorDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 06:27:50 +0000 (22:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Dec 2008 17:17:05 +0000 (09:17 -0800)
It writes the %pic register, keeping mind of processor bugs.

Implement reset_pic() in terms of it.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/system_64.h

index 779cf62d3ce9ea54e0cf61176eee8464d4c829ff..6c077816ab28c923f75c47494fa8b37efb55ab0a 100644 (file)
@@ -96,11 +96,12 @@ do {        __asm__ __volatile__("ba,pt     %%xcc, 1f\n\t" \
  * arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt()
  * for more information.
  */
-#define reset_pic()                                                    \
-       __asm__ __volatile__("ba,pt     %xcc, 99f\n\t"          \
+#define write_pic(__p)                                         \
+       __asm__ __volatile__("ba,pt     %%xcc, 99f\n\t"         \
                             ".align    64\n"                   \
-                         "99:wr        %g0, 0x0, %pic\n\t"     \
-                            "rd        %pic, %g0")
+                         "99:wr        %0, 0x0, %%pic\n\t"     \
+                            "rd        %%pic, %%g0" : : "r" (__p))
+#define reset_pic()    write_pic(0)
 
 #ifndef __ASSEMBLY__