aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/smp_32.h5
-rw-r--r--arch/sparc/include/asm/winmacro.h9
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h
index d82d7f4c0a79..d7837dcb2525 100644
--- a/arch/sparc/include/asm/smp_32.h
+++ b/arch/sparc/include/asm/smp_32.h
@@ -135,6 +135,11 @@ static inline int hard_smp_processor_id(void)
135 __asm__ __volatile__("lda [%g0] ASI_M_VIKING_TMP1, %0\n\t" 135 __asm__ __volatile__("lda [%g0] ASI_M_VIKING_TMP1, %0\n\t"
136 "nop; nop" : 136 "nop; nop" :
137 "=&r" (cpuid)); 137 "=&r" (cpuid));
138 - leon
139 __asm__ __volatile__( "rd %asr17, %0\n\t"
140 "srl %0, 0x1c, %0\n\t"
141 "nop\n\t" :
142 "=&r" (cpuid));
138 See btfixup.h and btfixupprep.c to understand how a blackbox works. 143 See btfixup.h and btfixupprep.c to understand how a blackbox works.
139 */ 144 */
140 __asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t" 145 __asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t"
diff --git a/arch/sparc/include/asm/winmacro.h b/arch/sparc/include/asm/winmacro.h
index 5b0a06dc3bcb..a9be04b0d049 100644
--- a/arch/sparc/include/asm/winmacro.h
+++ b/arch/sparc/include/asm/winmacro.h
@@ -103,6 +103,7 @@
103 st %scratch, [%cur_reg + TI_W_SAVED]; 103 st %scratch, [%cur_reg + TI_W_SAVED];
104 104
105#ifdef CONFIG_SMP 105#ifdef CONFIG_SMP
106/* Results of LOAD_CURRENT() after BTFIXUP for SUN4M, SUN4D & LEON (comments) */
106#define LOAD_CURRENT4M(dest_reg, idreg) \ 107#define LOAD_CURRENT4M(dest_reg, idreg) \
107 rd %tbr, %idreg; \ 108 rd %tbr, %idreg; \
108 sethi %hi(current_set), %dest_reg; \ 109 sethi %hi(current_set), %dest_reg; \
@@ -118,6 +119,14 @@
118 or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ 119 or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
119 ld [%idreg + %dest_reg], %dest_reg; 120 ld [%idreg + %dest_reg], %dest_reg;
120 121
122#define LOAD_CURRENT_LEON(dest_reg, idreg) \
123 rd %asr17, %idreg; \
124 sethi %hi(current_set), %dest_reg; \
125 srl %idreg, 0x1c, %idreg; \
126 or %dest_reg, %lo(current_set), %dest_reg; \
127 sll %idreg, 0x2, %idreg; \
128 ld [%idreg + %dest_reg], %dest_reg;
129
121/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */ 130/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
122#define LOAD_CURRENT(dest_reg, idreg) \ 131#define LOAD_CURRENT(dest_reg, idreg) \
123 sethi %hi(___b_load_current), %idreg; \ 132 sethi %hi(___b_load_current), %idreg; \