diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/sparc/include/asm/winmacro.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/sparc/include/asm/winmacro.h')
-rw-r--r-- | arch/sparc/include/asm/winmacro.h | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/arch/sparc/include/asm/winmacro.h b/arch/sparc/include/asm/winmacro.h index 9b7b21764cd..a9be04b0d04 100644 --- a/arch/sparc/include/asm/winmacro.h +++ b/arch/sparc/include/asm/winmacro.h | |||
@@ -103,24 +103,37 @@ | |||
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 | #define LOAD_CURRENT(dest_reg, idreg) \ | 106 | /* Results of LOAD_CURRENT() after BTFIXUP for SUN4M, SUN4D & LEON (comments) */ |
107 | 661: rd %tbr, %idreg; \ | 107 | #define LOAD_CURRENT4M(dest_reg, idreg) \ |
108 | srl %idreg, 10, %idreg; \ | 108 | rd %tbr, %idreg; \ |
109 | and %idreg, 0xc, %idreg; \ | 109 | sethi %hi(current_set), %dest_reg; \ |
110 | .section .cpuid_patch, "ax"; \ | 110 | srl %idreg, 10, %idreg; \ |
111 | /* Instruction location. */ \ | 111 | or %dest_reg, %lo(current_set), %dest_reg; \ |
112 | .word 661b; \ | 112 | and %idreg, 0xc, %idreg; \ |
113 | /* SUN4D implementation. */ \ | 113 | ld [%idreg + %dest_reg], %dest_reg; |
114 | lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ | 114 | |
115 | sll %idreg, 2, %idreg; \ | 115 | #define LOAD_CURRENT4D(dest_reg, idreg) \ |
116 | nop; \ | 116 | lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ |
117 | /* LEON implementation. */ \ | 117 | sethi %hi(C_LABEL(current_set)), %dest_reg; \ |
118 | rd %asr17, %idreg; \ | 118 | sll %idreg, 2, %idreg; \ |
119 | srl %idreg, 0x1c, %idreg; \ | 119 | or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ |
120 | sll %idreg, 0x02, %idreg; \ | 120 | ld [%idreg + %dest_reg], %dest_reg; |
121 | .previous; \ | 121 | |
122 | sethi %hi(current_set), %dest_reg; \ | 122 | #define LOAD_CURRENT_LEON(dest_reg, idreg) \ |
123 | or %dest_reg, %lo(current_set), %dest_reg;\ | 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; \ | ||
124 | ld [%idreg + %dest_reg], %dest_reg; | 137 | ld [%idreg + %dest_reg], %dest_reg; |
125 | #else | 138 | #else |
126 | #define LOAD_CURRENT(dest_reg, idreg) \ | 139 | #define LOAD_CURRENT(dest_reg, idreg) \ |