[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Loongson FPU Bug

Hi Aron,

On Tue, Feb 07, 2023 at 03:53:27PM +0800, Aron Xu wrote:
> Hi,
> I'm not sure which version of Loongson CPU you are using, anyway these
> are several of them:

Architecture:        mips64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Model:               ICT Loongson-3 V0.1  FPU V0.1
BogoMIPS:            3592.19
L1d cache:           256 KiB
L1i cache:           256 KiB
L2 cache:            2 MiB
NUMA node0 CPU(s):   0-3
Flags:               vz msa loongson-mmi loongson-cam loongson-ext loongson-ext2

> 1. madd.X/msub.X: they are fused implementations while others are
> non-fused, disabled by default in Debian
> 2. EI/DI: only affect privileged mode so that the kernel needs to be
> compiled with mips64r1 (which I believe it is default upstream)
> 3. swxc1: would report  illegal hardware instruction on some hardware,
> and some octean boards will report SIGBUS
> 4. FR0 FPU emulation mode is not architecturally valid, but this does
> not likely affect you since you are not using mips32r1/r2.

I have seen the list of "fpu failing packages not for loongson" in the
wanna-build codebase and while rebuilding stretch packages i also experienced
various fpu based issues. glibc basically fails all idouble and ifloat tests
which i disabled.

Also i see reproducible kernel issues when building "racket". The machine
starts dying afterwards slowly and needs a reboot. I tried a 6.1 and its
even worse - e.g. when reproducing it the machine was unusable pretty fast.

[215283.122039] BUG: Bad page map in process raco  pte:480001a05 pmd:98000001258cc000
[215283.129621] page:00000000c5d1cb6c refcount:-9669 mapcount:-9670 mapping:0000000000000000 index:0x0 pfn:0x48000
[215283.139713] flags: 0x1201000000000()
[215283.143366] raw: 0001201000000000 0000000000000100 0000000000000122 0000000000000000
[215283.151181] raw: 0000000000000000 0000000000000000 ffffda3bffffda39 0000000000000000
[215283.158999] page dumped because: bad pte
[215283.163015] addr:0000000062938000 vm_flags:00100077 anon_vma:98000003a2f25728 mapping:0000000000000000 index:18a4e
[215283.173432] file:(null) fault:0x0 mmap:0x0 readpage:0x0
[215283.178734] CPU: 2 PID: 2478154 Comm: raco Tainted: G    B       E     5.10.0-20-loongson-3 #1 Debian 5.10.158-2
[215283.188949] Hardware name: Lemote LEMOTE-LS3A4000-7A1000-1w-V0.1-pc/LEMOTE-LS3A4000-7A1000-1w-V01-pc, BIOS Kunlun-A1901-V4.1.4 04/2 0/2020

So i am digging whether this is something broken in kernel, fpu etc.

Florian Lohoff                                                     f@zz.de
  Any sufficiently advanced technology is indistinguishable from magic.

Attachment: signature.asc
Description: PGP signature

Reply to: