Commit 456cad8e authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent f9aad600
...@@ -96,11 +96,12 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ ...@@ -96,11 +96,12 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \
* arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt() * arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt()
* for more information. * for more information.
*/ */
#define reset_pic() \ #define write_pic(__p) \
__asm__ __volatile__("ba,pt %xcc, 99f\n\t" \ __asm__ __volatile__("ba,pt %%xcc, 99f\n\t" \
".align 64\n" \ ".align 64\n" \
"99:wr %g0, 0x0, %pic\n\t" \ "99:wr %0, 0x0, %%pic\n\t" \
"rd %pic, %g0") "rd %%pic, %%g0" : : "r" (__p))
#define reset_pic() write_pic(0)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment