linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ths@linux-mips.org
Date: Fri, 08 Jul 2005 09:03:54 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ths@ftp.linux-mips.org  05/07/08 09:03:48

Modified files:
        include/asm-mips: stackframe.h 

Log message:
        Fix get_saved_sp for 64bit address space. Simplify set_save_sp.

diff -urN linux/include/asm-mips/stackframe.h 
linux/include/asm-mips/stackframe.h
--- linux/include/asm-mips/stackframe.h 2005/04/01 14:07:13     1.37
+++ linux/include/asm-mips/stackframe.h 2005/07/08 08:03:48     1.38
@@ -90,24 +90,28 @@
 #ifdef CONFIG_MIPS32
                mfc0    \temp, CP0_CONTEXT
                srl     \temp, 23
-               LONG_S  \stackp, kernelsp(\temp)
 #endif
 #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64)
                lw      \temp, TI_CPU(gp)
                dsll    \temp, 3
-               lui     \temp2, %hi(kernelsp)
-               daddu   \temp, \temp2
-               LONG_S  \stackp, %lo(kernelsp)(\temp)
 #endif
 #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64)
                MFC0    \temp, CP0_CONTEXT
                dsrl    \temp, 23
-               LONG_S  \stackp, kernelsp(\temp)
 #endif
+               LONG_S  \stackp, kernelsp(\temp)
                .endm
 #else
                .macro  get_saved_sp    /* Uniprocessor variation */
+#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64)
+               lui     k1, %highest(kernelsp)
+               daddiu  k1, %higher(kernelsp)
+               dsll    k1, k1, 16
+               daddiu  k1, %hi(kernelsp)
+               dsll    k1, k1, 16
+#else
                lui     k1, %hi(kernelsp)
+#endif
                LONG_L  k1, %lo(kernelsp)(k1)
                .endm
 

<Prev in Thread] Current Thread [Next in Thread>