gnewsense-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnewsense-dev] [loongson-PATCH-v1 25/27] Flush RAS and BTB for CPU pred


From: wuzhangjin
Subject: [Gnewsense-dev] [loongson-PATCH-v1 25/27] Flush RAS and BTB for CPU predictively execution
Date: Thu, 21 May 2009 06:13:19 +0800

From: Wu Zhangjin <address@hidden>

This is directly picked from the to-mips branch of
http://dev.lemote.com/code/linux_loongson

Signed-off-by: Wu Zhangjin <address@hidden>
---
 arch/mips/include/asm/stackframe.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/stackframe.h 
b/arch/mips/include/asm/stackframe.h
index db0fa7b..8b92e56 100644
--- a/arch/mips/include/asm/stackframe.h
+++ b/arch/mips/include/asm/stackframe.h
@@ -117,6 +117,20 @@
                .endm
 #else
                .macro  get_saved_sp    /* Uniprocessor variation */
+#ifdef CONFIG_CPU_LOONGSON2
+               move k0, ra
+               jal     2008f
+               nop
+2008 :         jal     2008f
+               nop
+2008 :         jal     2008f
+               nop
+2008 :         jal     2008f
+               nop
+2008 :         move    ra, k0
+               li      k0, 3
+               mtc0    k0, $22
+#endif
 #if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
                lui     k1, %hi(kernelsp)
 #else
-- 
1.6.2.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]