On Tue, 2024-03-12 at 15:57 +0000, Sudeep Holla wrote: > Looked briefly at register_sys_off_handler and it should be OK to call > it from psci_init_system_off2() below. Any particular reason for having > separate initcall to do this ? We can even eliminate the need for > psci_init_system_off2 if it can be called from there. What am I missing ? My first attempt did that. I don't think we can kmalloc that early: [ 0.000000] psci: SMC Calling Convention v1.1 [ 0.000000] Unable to handle kernel read from unreadable memory at virtual address 0000000000000018 [ 0.000000] Mem abort info: [ 0.000000] ESR = 0x0000000096000004 [ 0.000000] EC = 0x25: DABT (current EL), IL = 32 bits [ 0.000000] SET = 0, FnV = 0 [ 0.000000] EA = 0, S1PTW = 0 [ 0.000000] FSC = 0x04: level 0 translation fault [ 0.000000] Data abort info: [ 0.000000] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 0.000000] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 0.000000] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 0.000000] [0000000000000018] user address but active_mm is swapper [ 0.000000] Internal error: Oops: 0000000096000004 [#1] SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.8.0-rc3+ #30 [ 0.000000] pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.000000] pc : kmalloc_trace+0x138/0x340 [ 0.000000] lr : register_sys_off_handler+0x60/0x258 [ 0.000000] sp : ffff8000827d3d10 [ 0.000000] x29: ffff8000827d3d20 x28: 000000005cd7e0ac x27: 0000000000001f3f [ 0.000000] x26: 0000000000000000 x25: ffff8000802bd890 x24: ffff8000802bd890 [ 0.000000] x23: 0000000000000040 x22: 0000000000000dc0 x21: 0000000000000001 [ 0.000000] x20: 0000000000000000 x19: 0000000000000000 x18: 0000000000000006 [ 0.000000] x17: 000000000036fd40 x16: 000000005ec902c0 x15: ffff8000827d37c0 [ 0.000000] x14: 0000000000000000 x13: 312e3176206e6f69 x12: 746e65766e6f4320 [ 0.000000] x11: 00000000ffffdfff x10: ffff8000828cebe0 x9 : ffff80008281ea10 [ 0.000000] x8 : ffff8000827d3d78 x7 : 0000000000000000 x6 : 0000000000000000 [ 0.000000] x5 : 0000000000000000 x4 : ffff8000827e0000 x3 : ffff8000827f41c0 [ 0.000000] x2 : 0000000000000040 x1 : 0000000000000dc0 x0 : 0000000000000000 [ 0.000000] Call trace: [ 0.000000] kmalloc_trace+0x138/0x340 [ 0.000000] register_sys_off_handler+0x60/0x258 [ 0.000000] psci_probe+0x2cc/0x350 [ 0.000000] psci_acpi_init+0x50/0x88 [ 0.000000] setup_arch+0x194/0x278 [ 0.000000] start_kernel+0x7c/0x410 [ 0.000000] __primary_switched+0xb8/0xc8 [ 0.000000] Code: b5000f7a f94003f4 aa1803fe d50320ff (b9401a64) [ 0.000000] ---[ end trace 0000000000000000 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
Attachment:
smime.p7s
Description: S/MIME cryptographic signature