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.
Signed-off-by: Paul Bolle <[email protected]>
---
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(-)
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index 3220c93..69a9a22 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -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?
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h
index cfe092f..f80a07e 100644
--- a/arch/mips/include/asm/fpu.h
+++ b/arch/mips/include/asm/fpu.h
@@ -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
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index 253b2fb..841ffc2 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -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
--
1.8.5.3
On Sun, Feb 9, 2014 at 2:32 PM, Paul Bolle <[email protected]> wrote:
> 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.
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,
On Sun, Feb 09, 2014 at 05:26:59PM +0100, Jonas Gorski wrote:
> On Sun, Feb 9, 2014 at 2:32 PM, Paul Bolle <[email protected]> wrote:
> > 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.
>
> 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).
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.
On Mon, Feb 10, 2014 at 3:45 AM, Aaro Koskinen <[email protected]> wrote:
> Hi,
>
> On Sun, Feb 09, 2014 at 05:26:59PM +0100, Jonas Gorski wrote:
>> On Sun, Feb 9, 2014 at 2:32 PM, Paul Bolle <[email protected]> wrote:
>> > 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.
>>
>> 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).
>
> 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.
>
On Sun, 9 Feb 2014, Jonas Gorski wrote:
> 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).
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