Skip to contentSkip to conversation

MIPS: fix CONFIG_* error in fpu code

RFC PATCH In review Huacai Chen 2 participants 2 messages Feb 7, 2014 MIPS

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 MIPS: fix CONFIG_* error in fpu code

Commit 597ce1723e0f (MIPS: Support for 64-bit FP with O32 binaries) brings some CONFIG_MIPS64, but CONFIG_MIPS64 doesn't exist in any Kconfig file. I guess the correct thing is CONFIG_64BIT, so fix it.

---
 arch/mips/include/asm/asmmacro.h |    4 ++--
 arch/mips/include/asm/fpu.h      |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/mips/include/asm/asmmacro.h +2 -2
index 3220c93..69a9a22 100644
@@ -106,7 +106,7 @@
 	.endm
 
 	.macro	fpu_save_double thread status tmp
-#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	sll	\tmp, \status, 5
 	bgez	\tmp, 10f
 	fpu_save_16odd \thread
@@ -159,7 +159,7 @@
 	.endm
 
 	.macro	fpu_restore_double thread status tmp
-#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	sll	\tmp, \status, 5
 	bgez	\tmp, 10f				# 16 register mode?
 
arch/mips/include/asm/fpu.h +1 -1
index cfe092f..f80a07e 100644
@@ -57,7 +57,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
 		return 0;
 
 	case FPU_64BIT:
-#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_MIPS64))
+#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_64BIT))
 		/* we only have a 32-bit FPU */
 		return SIGFPE;
 #endif
Signature · 1 line
1.7.7.3
#1 lore raw
Quoted 49 lines · Huacai Chen

Commit 597ce1723e0f (MIPS: Support for 64-bit FP with O32 binaries) brings some CONFIG_MIPS64, but CONFIG_MIPS64 doesn't exist in any Kconfig file. I guess the correct thing is CONFIG_64BIT, so fix it.

---
 arch/mips/include/asm/asmmacro.h |    4 ++--
 arch/mips/include/asm/fpu.h      |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/mips/include/asm/asmmacro.h +2 -2
index 3220c93..69a9a22 100644
@@ -106,7 +106,7 @@
 	.endm
 
 	.macro	fpu_save_double thread status tmp
-#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	sll	\tmp, \status, 5
 	bgez	\tmp, 10f
 	fpu_save_16odd \thread
@@ -159,7 +159,7 @@
 	.endm
 
 	.macro	fpu_restore_double thread status tmp
-#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	sll	\tmp, \status, 5
 	bgez	\tmp, 10f				# 16 register mode?
 
arch/mips/include/asm/fpu.h +1 -1
index cfe092f..f80a07e 100644
@@ -57,7 +57,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
 		return 0;
 
 	case FPU_64BIT:
-#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_MIPS64))
+#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_64BIT))
 		/* we only have a 32-bit FPU */
 		return SIGFPE;
 #endif
Signature · 1 line
1.7.7.3

Oops, right you are - looks good to me.

Thanks,
Paul