]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: Loongson32: workaround di issue
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 22 Jan 2019 13:04:11 +0000 (21:04 +0800)
committerPaul Burton <paul.burton@mips.com>
Wed, 23 Jan 2019 01:32:01 +0000 (17:32 -0800)
GS232 core used in Loongson-1 processors has a bug that
di instruction doesn't save the irqflag immediately.

Workaround by set irqflag in CP0 before di instructions
as same as Loongson-3.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: keguang.zhang@gmail.com
arch/mips/include/asm/irqflags.h

index 9d3610be2323a1ae885320ffe81cd3577e327872..f0b862a83816b7f11d9c480bf23edaec17b90ee0 100644 (file)
@@ -41,7 +41,7 @@ static inline unsigned long arch_local_irq_save(void)
        "       .set    push                                            \n"
        "       .set    reorder                                         \n"
        "       .set    noat                                            \n"
-#if defined(CONFIG_CPU_LOONGSON3)
+#if defined(CONFIG_CPU_LOONGSON3) || defined (CONFIG_CPU_LOONGSON1)
        "       mfc0    %[flags], $12                                   \n"
        "       di                                                      \n"
 #else