… or rather, I can compile 5.7.2 (i.e. Neil's branch) just fine but it crashes when booting.
[ 0.549585] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.563190] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 80092b80, ra == 80092b70
[ 0.584268] Oops[#1]:
[ 0.588734] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.2-00057-g5cfdc518329a #61
[ 0.603935] $ 0 : 00000000 00000001 00000000 9bc48000
[ 0.614299] $ 4 : fffffff2 00000000 00000000 00000000
[ 0.624668] $ 8 : 9bc51e28 9bd60000 00000400 00000000
[ 0.635035] $12 : 80d20000 00000000 00000043 00000000
[ 0.645403] $16 : 80830000 00000001 8082c370 80830000
[ 0.655772] $20 : 80cf0000 80883404 8085909c 00000008
[ 0.666139] $24 : 00000001 00000000
[ 0.676507] $28 : 9bc50000 9bc51de0 80883424 80092b70
[ 0.686876] Hi : 00000000
[ 0.692578] Lo : 00000000
[ 0.698308] epc : 80092b80 cmpxchg_futex_value_locked+0x28/0x64
[ 0.710382] ra : 80092b70 cmpxchg_futex_value_locked+0x18/0x64
[ 0.722472] Status: 11008403 KERNEL EXL IE
[ 0.730768] Cause : 40800008 (ExcCode 02)
[ 0.738716] BadVA : 00000000
[ 0.744420] PrId : 0001992f (MIPS 1004Kc)
[ 0.752539] Modules linked in:
[ 0.758593] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[ 0.774658] Stack : 80cf0000 80883404 8085909c 00000008 80883424 80863d8c ffbc1930 0043e6cf
[ 0.791246] 806b0000 80834470 00000000 9bc51e24 00000000 00000400 00000400 8085909c
[ 0.807835] 00000008 0000000a 80883404 86790d73 80879d80 80830000 80863cd8 ffffffff
[ 0.824423] 00000000 80001714 00000000 9bc51e4c 9bc51e4c 86790d73 8081f8a0 80830000
[ 0.841012] 00000000 80859000 8081b320 00000001 00000001 00000000 80830000 80770000
[ 0.857601] ...
[ 0.862442] Call Trace:
[ 0.867286] [<80092b80>] cmpxchg_futex_value_locked+0x28/0x64
[ 0.878706] [<80863d8c>] futex_init+0xb4/0x128
[ 0.887503] [<80001714>] do_one_initcall+0x84/0x1bc
[ 0.897190] [<80859f3c>] kernel_init_freeable+0x220/0x258
[ 0.907903] [<806a010c>] kernel_init+0x14/0x10c
[ 0.916883] [<80006a98>] ret_from_kernel_thread+0x14/0x1c
[ 0.927592] Code: 2404fff2 00001025 0000000f <c0a30000> 14660005 00000000 00e00825 e0a10000 1020fff9
[ 0.946939]
[ 0.949912] ---[ end trace 59c355a297aca262 ]---
[ 0.959043] Kernel panic - not syncing: Fatal exception
[ 0.969441] Rebooting in 1 seconds..
[ 3.367209] Reboot failed -- System halted
I tried mipsel-GCC 6,8,10 from Debian. No change. Original gbpc1-5.7 config file.
Any ideas what could possibly be going wrong here? Neil's 5.7.2 images work perfectly but I need a few modules he doesn't have.
(gdb) disass cmpxchg_futex_value_locked
Dump of assembler code for function cmpxchg_futex_value_locked:
0x80093a50 <+0>: addiu sp,sp,-24
0x80093a54 <+4>: sw ra,20(sp)
0x80093a58 <+8>: jal 0x800936fc <pagefault_disable>
0x80093a5c <+12>: move t0,a0
0x80093a60 <+16>: jal 0x80093a38 <__access_ok>
0x80093a64 <+20>: move a0,a1
0x80093a68 <+24>: beqz v0,0x80093a9c <cmpxchg_futex_value_locked+76>
0x80093a6c <+28>: li a0,-14
0x80093a70 <+32>: move v0,zero
0x80093a74 <+36>: sync
0x80093a78 <+40>: ll v1,0(a1)
0x80093a7c <+44>: bne v1,a2,0x80093a94 <cmpxchg_futex_value_locked+68>
0x80093a80 <+48>: nop
0x80093a84 <+52>: move at,a3
0x80093a88 <+56>: sc at,0(a1)
0x80093a8c <+60>: beqz at,0x80093a74 <cmpxchg_futex_value_locked+36>
0x80093a90 <+64>: nop
0x80093a94 <+68>: move a0,v0
0x80093a98 <+72>: sw v1,0(t0)
0x80093a9c <+76>: jal 0x80093714 <pagefault_enable>
0x80093aa0 <+80>: nop
0x80093aa4 <+84>: lw ra,20(sp)
0x80093aa8 <+88>: move v0,a0
0x80093aac <+92>: jr ra
0x80093ab0 <+96>: addiu sp,sp,24
End of assembler dump.
(gdb) disass futex_init
Dump of assembler code for function futex_init:
0x807e7df8 <+0>: addiu sp,sp,-80
…
0x807e7e7c <+132>: jal 0x807ed5a4 <alloc_large_system_hash>
0x807e7e80 <+136>: sw v0,16(sp)
0x807e7e84 <+140>: move a3,zero
0x807e7e88 <+144>: lw t2,44(sp)
0x807e7e8c <+148>: move a2,zero
0x807e7e90 <+152>: move a1,zero
0x807e7e94 <+156>: sw v0,880(s3)
0x807e7e98 <+160>: addiu a0,sp,48
0x807e7e9c <+164>: sllv t2,s1,t2
0x807e7ea0 <+168>: move t1,v0
0x807e7ea4 <+172>: jal 0x80093a50 <cmpxchg_futex_value_locked>
0x807e7ea8 <+176>: sw t2,4(s2)
0x807e7eac <+180>: li v1,-14
0x807e7eb0 <+184>: bne v0,v1,0x807e7ec4 <futex_init+204>
0x807e7eb4 <+188>: addiu v0,t1,8
0x807e7eb8 <+192>: lui v0,0x807b
0x807e7ebc <+196>: sw s1,888(v0)
0x807e7ec0 <+200>: addiu v0,t1,8
…