Re: [PATCH v3] MIPS: Implement ieee754 NAN2008 emulation mode

From: Thomas Bogendoerfer
Date: Fri Jul 12 2024 - 08:04:01 EST


On Wed, Jun 12, 2024 at 09:38:19AM +0100, Jiaxun Yang wrote:
> Implement ieee754 NAN2008 emulation mode.
>
> When this mode is enabled, kernel will accept ELF file
> compiled for both NaN 2008 and NaN legacy, but if hardware
> does not have capability to match ELF's NaN mode, __own_fpu
> will fail for corresponding thread and fpuemu will then kick
> in.
>
> This mode trade performance for correctness, while maintaining
> support for both NaN mode regardless of hardware capability.
> It is useful for multilib installation that have both types
> of binary exist in system.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
> ---
> Changes in v3:
> - Fix typo in commit message
> - Collect R-b tags
> - Link to v2: https://lore.kernel.org/r/20240511-mips_ieee754_emul-v2-1-af796ea21ef0@xxxxxxxxxxx
>
> Changes in v2:
> - Fix a typo
> - Link to v1: https://lore.kernel.org/r/20240507-mips_ieee754_emul-v1-1-1dc7c0d13cac@xxxxxxxxxxx
> ---
> Documentation/admin-guide/kernel-parameters.txt | 4 +++-
> arch/mips/include/asm/fpu.h | 15 +++++++++++++++
> arch/mips/kernel/elf.c | 4 ++++
> arch/mips/kernel/fpu-probe.c | 9 ++++++++-
> 4 files changed, 30 insertions(+), 2 deletions(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]