Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / include / asm-sparc / winmacro.h
index cb80840..096f3d3 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef _SPARC_WINMACRO_H
 #define _SPARC_WINMACRO_H
 
-#include <linux/config.h>
 #include <asm/ptrace.h>
 
 /* Store the register window onto the 8-byte aligned area starting
        and      %idreg, 0xc, %idreg; \
        ld       [%idreg + %dest_reg], %dest_reg;
 
-/* Sliiick. We have a Linux current register :) -jj */
-#define LOAD_CURRENT4D(dest_reg) \
-       lda      [%g0] ASI_M_VIKING_TMP2, %dest_reg;
+#define LOAD_CURRENT4D(dest_reg, idreg) \
+       lda      [%g0] ASI_M_VIKING_TMP1, %idreg; \
+       sethi   %hi(C_LABEL(current_set)), %dest_reg; \
+       sll     %idreg, 2, %idreg; \
+       or      %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
+       ld      [%idreg + %dest_reg], %dest_reg;
 
 /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
 #define LOAD_CURRENT(dest_reg, idreg)                                  \