diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-26 01:27:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 12:17:05 -0500 |
commit | 456cad8e4e1754672e6df1e716cff1482ea124ce (patch) | |
tree | baef3611a9d974a0d6b17c5d566223c234edf883 /arch/sparc/include | |
parent | f9aad60010efa896319ed6e908a5cb5e3a852907 (diff) |
sparc64: Add write_pic() helper.
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>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/system_64.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/sparc/include/asm/system_64.h b/arch/sparc/include/asm/system_64.h index 779cf62d3ce9..6c077816ab28 100644 --- a/arch/sparc/include/asm/system_64.h +++ b/arch/sparc/include/asm/system_64.h | |||
@@ -96,11 +96,12 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ | |||
96 | * arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt() | 96 | * arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt() |
97 | * for more information. | 97 | * for more information. |
98 | */ | 98 | */ |
99 | #define reset_pic() \ | 99 | #define write_pic(__p) \ |
100 | __asm__ __volatile__("ba,pt %xcc, 99f\n\t" \ | 100 | __asm__ __volatile__("ba,pt %%xcc, 99f\n\t" \ |
101 | ".align 64\n" \ | 101 | ".align 64\n" \ |
102 | "99:wr %g0, 0x0, %pic\n\t" \ | 102 | "99:wr %0, 0x0, %%pic\n\t" \ |
103 | "rd %pic, %g0") | 103 | "rd %%pic, %%g0" : : "r" (__p)) |
104 | #define reset_pic() write_pic(0) | ||
104 | 105 | ||
105 | #ifndef __ASSEMBLY__ | 106 | #ifndef __ASSEMBLY__ |
106 | 107 | ||