diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-04-10 08:04:42 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-04-30 15:52:56 -0400 |
commit | 622844bf0b4cfa4f76d4a0ddc44266938385f5ab (patch) | |
tree | 52d7ab361091614b4815076003555819d56efd03 | |
parent | c619366e36aa75beaaee630f3d6e468422ed9530 (diff) |
MIPS: Loongson: Add CPU_LOONGSON2F_WORKAROUNDS
As documented in the Loongson 2F User Manual [2, 3], the old Loongson2F
series (2F01 / 2F02) have the NOP & JUMP issues which requires workarounds
in the kernel and binutils. This issue has been rectified in Loongson 2F
series 2F03 so no workarounds needed.
Now that the workarounds [1] adding the the -mfix-loongson2f-nop and
-mfix-loongson2f-jump options have been comitted to the binutils the CVS
repository), we can add the workarounds in the kernel.
The workarounds have no significant side effect on the system but may
decrease performance so we control them through a a new
CPU_LOONGSON2F_WORKAROUNDS config option allowing the users to only enable
it as necessary.
[1] "Fixups of Loongson2F" patch for binutils(actually for gas)
http://sourceware.org/ml/binutils/2009-11/msg00387.html
[2] Chapter 15 of "Loongson2F User Manual"(Chinese Version)
http://www.loongson.cn/uploadfile/file/200808211
[3] English Version of the above chapter 15
http://groups.google.com.hk/group/loongson-dev/msg/e0d2e220958f10a6?dmode=source
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1105/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Kconfig | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 38fd1b9bda71..7e6fd1cbd3f8 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1307,6 +1307,33 @@ config CPU_CAVIUM_OCTEON | |||
1307 | 1307 | ||
1308 | endchoice | 1308 | endchoice |
1309 | 1309 | ||
1310 | if CPU_LOONGSON2F | ||
1311 | config CPU_NOP_WORKAROUNDS | ||
1312 | bool | ||
1313 | |||
1314 | config CPU_JUMP_WORKAROUNDS | ||
1315 | bool | ||
1316 | |||
1317 | config CPU_LOONGSON2F_WORKAROUNDS | ||
1318 | bool "Loongson 2F Workarounds" | ||
1319 | default y | ||
1320 | select CPU_NOP_WORKAROUNDS | ||
1321 | select CPU_JUMP_WORKAROUNDS | ||
1322 | help | ||
1323 | Loongson 2F01 / 2F02 processors have the NOP & JUMP issues which | ||
1324 | require workarounds. Without workarounds the system may hang | ||
1325 | unexpectedly. For more information please refer to the gas | ||
1326 | -mfix-loongson2f-nop and -mfix-loongson2f-jump options. | ||
1327 | |||
1328 | Loongson 2F03 and later have fixed these issues and no workarounds | ||
1329 | are needed. The workarounds have no significant side effect on them | ||
1330 | but may decrease the performance of the system so this option should | ||
1331 | be disabled unless the kernel is intended to be run on 2F01 or 2F02 | ||
1332 | systems. | ||
1333 | |||
1334 | If unsure, please say Y. | ||
1335 | endif # CPU_LOONGSON2F | ||
1336 | |||
1310 | config SYS_SUPPORTS_ZBOOT | 1337 | config SYS_SUPPORTS_ZBOOT |
1311 | bool | 1338 | bool |
1312 | select HAVE_KERNEL_GZIP | 1339 | select HAVE_KERNEL_GZIP |