Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git] / arch / sparc64 / kernel / etrap.S
index a0e7d48..4b2bf9e 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright (C) 1997, 1998, 1999 Jakub Jelinek (jj@ultra.linux.cz)
  */
 
-#include <linux/config.h>
 
 #include <asm/asi.h>
 #include <asm/pstate.h>
@@ -188,6 +187,11 @@ etraptl1:  /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
                rdpr    %tt, %g3
                stx     %g3, [%g2 + STACK_BIAS + 0x38]
 
+               sethi   %hi(is_sun4v), %g3
+               lduw    [%g3 + %lo(is_sun4v)], %g3
+               brnz,pn %g3, finish_tl1_capture
+                nop
+
                wrpr    %g0, 3, %tl
                rdpr    %tstate, %g3
                stx     %g3, [%g2 + STACK_BIAS + 0x40]
@@ -210,6 +214,7 @@ etraptl1:   /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself.
 
                stx     %g1, [%g2 + STACK_BIAS + 0x80]
 
+finish_tl1_capture:
                wrpr    %g0, 1, %tl
 661:           nop
                .section .sun4v_1insn_patch, "ax"