From: Wu Zhangjin <email@example.com>
As the Loongson2F User Manual[2,3] shows, the old Loongson2F series(2F01/02)
have the NOP & JUMP issues, need the related workarounds in the kernel and
binutils, but the new Loongson2F series(2F03 and laters) have no such issues,
so, none of the workarounds is needed.
Currently, the workaround with the -mfix-loongson2f-nop,
-mfix-loongson2f-jump options have been added into the latest binutils(in the
cvs repository), it's time to add the workarounds in the kernel.
The workarounds have no big side effect on the system, but may decrease the
performance, therefore, this patch adds a new CPU_LOONGSON2F_WORKAROUNDS config
option to allow the users to only enable it for the necessary processor series.
 "Fixups of Loongson2F" patch for binutils(actually for gas)
 Chapter 15 of "Loongson2F User Manual"(Chinese Version)
 English Version of the above chapter 15
Signed-off-by: Wu Zhangjin <firstname.lastname@example.org>
arch/mips/Kconfig | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 29e8692..f2ead53 100644
@@ -1305,6 +1305,32 @@ config CPU_CAVIUM_OCTEON
+ bool "Loongson 2F Workarounds"
+ default y
+ select CPU_NOP_WORKAROUNDS
+ select CPU_JUMP_WORKAROUNDS
+ The Loongson 2F01/02 processor has the NOP & JUMP issues, needs the
+ related workarounds, without workarounds, the system will hang
+ unexpectedly. to get more information about them, please refer to the
+ -mfix-loongson2f-nop and -mfix-loongson2f-jump options of gas.
+ For Loongson 2F03 and the later batches have fixed the issues, none
+ of these workarounds needed for them. These workarounds have no big
+ side effect on them but may decrease the performance of the system,
+ therefore, it's better to disable this config for them.
+ If unsure, please say Y.
+endif # CPU_LOONGSON2F