diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-04-10 08:05:01 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-04-30 15:52:56 -0400 |
commit | 8bbda428e90a2b638428fbb07abd80b9cb624a27 (patch) | |
tree | d428d994726d7bb2b249ddf1d24d03816d98190d | |
parent | 622844bf0b4cfa4f76d4a0ddc44266938385f5ab (diff) |
MIPS: Loongson 2F: Enable fixups of the latest binutils
With the "Fixups of Loongson2F" patch [1] having been applied to binutils
for binutils 2.20.1 we now can use it's time to enable the options provided
by the patch to compile the kernel.
Without these fixups, the system may hang if the erratum is triggered.
For more information on these fixups please refer to the following
references.
[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] Chapter 15 of the English version Loongson 2F User Manual
http://groups.google.com.hk/group/loongson-dev/msg/e0d2e220958f10a6?dmode=source
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Zhang Le <r0bertz@gentoo.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1106/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 2f2eac233322..0b9c01add0a0 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -136,6 +136,19 @@ cflags-$(CONFIG_CPU_LOONGSON2E) += \ | |||
136 | $(call cc-option,-march=loongson2e,-march=r4600) | 136 | $(call cc-option,-march=loongson2e,-march=r4600) |
137 | cflags-$(CONFIG_CPU_LOONGSON2F) += \ | 137 | cflags-$(CONFIG_CPU_LOONGSON2F) += \ |
138 | $(call cc-option,-march=loongson2f,-march=r4600) | 138 | $(call cc-option,-march=loongson2f,-march=r4600) |
139 | # enable the workarounds for loongson2f | ||
140 | ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS | ||
141 | ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) | ||
142 | $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) | ||
143 | else | ||
144 | cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-nop | ||
145 | endif | ||
146 | ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-jump,),) | ||
147 | $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-jump) | ||
148 | else | ||
149 | cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump | ||
150 | endif | ||
151 | endif | ||
139 | 152 | ||
140 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 153 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
141 | -Wa,-mips32 -Wa,--trap | 154 | -Wa,-mips32 -Wa,--trap |