|
103 | 103 | st %scratch, [%cur_reg + TI_W_SAVED]; |
104 | 104 |
|
105 | 105 | #ifdef CONFIG_SMP |
106 | | -/* Results of LOAD_CURRENT() after BTFIXUP for SUN4M, SUN4D & LEON (comments) */ |
107 | | -#define LOAD_CURRENT4M(dest_reg, idreg) \ |
108 | | - rd %tbr, %idreg; \ |
109 | | - sethi %hi(current_set), %dest_reg; \ |
110 | | - srl %idreg, 10, %idreg; \ |
111 | | - or %dest_reg, %lo(current_set), %dest_reg; \ |
112 | | - and %idreg, 0xc, %idreg; \ |
113 | | - ld [%idreg + %dest_reg], %dest_reg; |
114 | | - |
115 | | -#define LOAD_CURRENT4D(dest_reg, idreg) \ |
116 | | - lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ |
117 | | - sethi %hi(C_LABEL(current_set)), %dest_reg; \ |
118 | | - sll %idreg, 2, %idreg; \ |
119 | | - or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ |
120 | | - ld [%idreg + %dest_reg], %dest_reg; |
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 | | - |
130 | | -/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */ |
131 | | -#define LOAD_CURRENT(dest_reg, idreg) \ |
132 | | - sethi %hi(___b_load_current), %idreg; \ |
133 | | - sethi %hi(current_set), %dest_reg; \ |
134 | | - sethi %hi(boot_cpu_id4), %idreg; \ |
135 | | - or %dest_reg, %lo(current_set), %dest_reg; \ |
136 | | - ldub [%idreg + %lo(boot_cpu_id4)], %idreg; \ |
| 106 | +#define LOAD_CURRENT(dest_reg, idreg) \ |
| 107 | +661: rd %tbr, %idreg; \ |
| 108 | + srl %idreg, 10, %idreg; \ |
| 109 | + and %idreg, 0xc, %idreg; \ |
| 110 | + .section .cpuid_patch, "ax"; \ |
| 111 | + /* Instruction location. */ \ |
| 112 | + .word 661b; \ |
| 113 | + /* SUN4D implementation. */ \ |
| 114 | + lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ |
| 115 | + sll %idreg, 2, %idreg; \ |
| 116 | + nop; \ |
| 117 | + /* LEON implementation. */ \ |
| 118 | + rd %asr17, %idreg; \ |
| 119 | + srl %idreg, 0x1c, %idreg; \ |
| 120 | + sll %idreg, 0x02, %idreg; \ |
| 121 | + .previous; \ |
| 122 | + sethi %hi(current_set), %dest_reg; \ |
| 123 | + or %dest_reg, %lo(current_set), %dest_reg;\ |
137 | 124 | ld [%idreg + %dest_reg], %dest_reg; |
138 | 125 | #else |
139 | 126 | #define LOAD_CURRENT(dest_reg, idreg) \ |
|
0 commit comments