lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe
On Thu, 28 Apr 2022, Stephen Zhang wrote:

> > Please send me .config causing it and tell me what compiler and version
> > you have seen this error with. We rely on things being optimised away
> > heavily throughout the Linux kernel, so this is certainly something to
> > investigate. I have built such a config just fine, but maybe there's a
> > bug somewhere my setup does not trigger.
>
> Okay. The compiler we used is:
>
> Compiler gcc
> Compiler version 10
> Compiler string mips-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110
> Cross-compile mips-linux-gnu
>
> the commit id of kernel is c00c5e1d157bec0ef0b0b59aa5482eb8dc7e8e49
>
> and the .config file is sent as an attachment.

Thanks.

The bug is in arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h,
which has:

#define cpu_has_fpu 1

(and similarly arch/mips/include/asm/mach-ip30/cpu-feature-overrides.h).
This is not supported, as noted in arch/mips/include/asm/cpu-features.h:

/* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */

Perhaps we should explicitly undefine `cpu_has_fpu' if set to 1?

Maciej

\
 
 \ /
  Last update: 2022-04-28 11:02    [W:0.108 / U:1.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site