瀏覽代碼

MIPS: BMIPS: Add CFLAGS, Makefile entries for BMIPS

Add CONFIG_CPU_BMIPS* in all of the right places, so that BMIPS kernel
images will compile and run.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2955/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Kevin Cernekee 13 年之前
父節點
當前提交
1c7c44519a
共有 3 個文件被更改,包括 6 次插入2 次删除
  1. 1 0
      arch/mips/Makefile
  2. 2 1
      arch/mips/include/asm/hazards.h
  3. 3 1
      arch/mips/include/asm/module.h

+ 1 - 0
arch/mips/Makefile

@@ -157,6 +157,7 @@ ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON))))
 cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon
 cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon
 endif
 endif
 cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
 cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
+cflags-$(CONFIG_CPU_BMIPS)	+= -march=mips32 -Wa,-mips32 -Wa,--trap
 
 
 cflags-$(CONFIG_CPU_R4000_WORKAROUNDS)	+= $(call cc-option,-mfix-r4000,)
 cflags-$(CONFIG_CPU_R4000_WORKAROUNDS)	+= $(call cc-option,-mfix-r4000,)
 cflags-$(CONFIG_CPU_R4400_WORKAROUNDS)	+= $(call cc-option,-mfix-r4400,)
 cflags-$(CONFIG_CPU_R4400_WORKAROUNDS)	+= $(call cc-option,-mfix-r4400,)

+ 2 - 1
arch/mips/include/asm/hazards.h

@@ -87,7 +87,8 @@ do {									\
 	: "=r" (tmp));							\
 	: "=r" (tmp));							\
 } while (0)
 } while (0)
 
 
-#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MIPS_ALCHEMY)
+#elif (defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MIPS_ALCHEMY)) || \
+	defined(CONFIG_CPU_BMIPS)
 
 
 /*
 /*
  * These are slightly complicated by the fact that we guarantee R1 kernels to
  * These are slightly complicated by the fact that we guarantee R1 kernels to

+ 3 - 1
arch/mips/include/asm/module.h

@@ -74,7 +74,9 @@ search_module_dbetables(unsigned long addr)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_CPU_MIPS32_R1
+#ifdef CONFIG_CPU_BMIPS
+#define MODULE_PROC_FAMILY "BMIPS "
+#elif defined CONFIG_CPU_MIPS32_R1
 #define MODULE_PROC_FAMILY "MIPS32_R1 "
 #define MODULE_PROC_FAMILY "MIPS32_R1 "
 #elif defined CONFIG_CPU_MIPS32_R2
 #elif defined CONFIG_CPU_MIPS32_R2
 #define MODULE_PROC_FAMILY "MIPS32_R2 "
 #define MODULE_PROC_FAMILY "MIPS32_R2 "