MIPS: Replace CONFIG_MIPS64 and CONFIG_MIPS32_R2
PATCH 1/1 MIPS: Replace CONFIG_MIPS64 and CONFIG_MIPS32_R2
Commit 597ce1723e0f ("MIPS: Support for 64-bit FP with O32 binaries") introduced references to two undefined Kconfig macros. CONFIG_MIPS32_R2 should clearly be replaced with CONFIG_CPU_MIPS32_R2. And CONFIG_MIPS64 should apparently be replaced with CONFIG_64BIT.
---
Untested!
arch/mips/include/asm/asmmacro.h | 4 ++-- arch/mips/include/asm/fpu.h | 2 +- arch/mips/kernel/r4k_fpu.S | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-)
arch/mips/include/asm/asmmacro.h +2 -2
@@ -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
@@ -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
arch/mips/kernel/r4k_fpu.S +4 -4
@@ -35,9 +35,9 @@ LEAF(_save_fp_context) cfc1 t1, fcr31 -#if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2) +#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) .set push -#ifdef CONFIG_MIPS32_R2 +#ifdef CONFIG_CPU_MIPS32_R2 .set mips64r2 mfc0 t0, CP0_STATUS sll t0, t0, 5
@@ -148,9 +148,9 @@ LEAF(_save_fp_context32) LEAF(_restore_fp_context) EX lw t0, SC_FPC_CSR(a0) -#if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2) +#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) .set push -#ifdef CONFIG_MIPS32_R2 +#ifdef CONFIG_CPU_MIPS32_R2 .set mips64r2 mfc0 t0, CP0_STATUS sll t0, t0, 5
Signature · 1 line
1.8.5.3
Quoted 4 lines · Paul Bolle
Commit
597ce1723e0f("MIPS: Support for 64-bit FP with O32 binaries") introduced references to two undefinedKconfigmacros.CONFIG_MIPS32_R2should clearly be replaced withCONFIG_CPU_MIPS32_R2. AndCONFIG_MIPS64should apparently be replaced withCONFIG_64BIT.
While I agree about the CONFIG_MIPS64 => CONFIG_64BIT replacement, I wonder if CONFIG_MIPS32_R2 shouldn't rather be CONFIG_CPU_MIPSR2 (maybe even the existing CONFIG_CPU_MIPS32_R2 are wrong here). CPU_XLP selects CPU_MIPSR2, and CPU_LONGSOON1 selects CPU_MIPS32 and CPU_MIPSR2, so they should probably be treated the same way as CPU_MIPS32_R2 (for e.g. the di/ei availability), but since all three are choice values, there can't be CPU_MIPS32_R2 selected if CPU_LONGSOON1 or CPU_XLP is chosen.
Regards
Jonas
Hi,
Quoted 9 lines · Jonas Gorski
Quoted 4 lines · Paul Bolle
Commit
597ce1723e0f("MIPS: Support for 64-bit FP with O32 binaries") introduced references to two undefinedKconfigmacros.CONFIG_MIPS32_R2should clearly be replaced withCONFIG_CPU_MIPS32_R2. AndCONFIG_MIPS64should apparently be replaced withCONFIG_64BIT.While I agree about the
CONFIG_MIPS64=>CONFIG_64BITreplacement, I wonder ifCONFIG_MIPS32_R2shouldn't rather beCONFIG_CPU_MIPSR2(maybe even the existingCONFIG_CPU_MIPS32_R2are wrong here).
FYI, the 64BIT part is already fixed by
<http://patchwork.linux-mips.org/patch/6506/>. I guess these two changes could be separate patches.
A.
I think Paul Bolle's patch is correct and my first patch is not enough. So it needn't to make a separate patch, just take Paul's patch and my second patch is enough.
Quoted 19 lines · Aaro Koskinen
Hi,
Quoted 9 lines · Jonas Gorski
Quoted 4 lines · Paul Bolle
Commit
597ce1723e0f("MIPS: Support for 64-bit FP with O32 binaries") introduced references to two undefinedKconfigmacros.CONFIG_MIPS32_R2should clearly be replaced withCONFIG_CPU_MIPS32_R2. AndCONFIG_MIPS64should apparently be replaced withCONFIG_64BIT.While I agree about the
CONFIG_MIPS64=>CONFIG_64BITreplacement, I wonder ifCONFIG_MIPS32_R2shouldn't rather beCONFIG_CPU_MIPSR2(maybe even the existingCONFIG_CPU_MIPS32_R2are wrong here).FYI, the 64BIT part is already fixed by
<http://patchwork.linux-mips.org/patch/6506/>. I guess these two changes could be separate patches.A.
Quoted 3 lines · Jonas Gorski
While I agree about the
CONFIG_MIPS64=>CONFIG_64BITreplacement, I wonder ifCONFIG_MIPS32_R2shouldn't rather beCONFIG_CPU_MIPSR2(maybe even the existingCONFIG_CPU_MIPS32_R2are wrong here).
Absolutely. You should be able to build a 32-bit kernel (32BIT) for a
MIPS64r2 processor (CPU_MIPS64_R2) and use the FP64 feature.
Maciej