[PATCH RT v2 0/3] riscv: add PREEMPT_RT support

Sebastian Andrzej Siewior bigeasy at linutronix.de
Thu Nov 2 08:54:23 PDT 2023


On 2023-11-02 12:31:15 [+0000], Conor Dooley wrote:
> [    1.130384] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
> [    1.130418]
> [    1.130414] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1
> [    1.130971] [<ffffffff80267d78>] __alloc_pages+0xac/0x1be
> [    1.130978]   alloc_workqueue+0x96/0x6de
> [    1.131005] [<ffffffff8000412a>] check_unaligned_access+0x34/0x336
> [    1.131010]   kmem_cache_init_late+0x1c/0x36
> [    1.131038] [<ffffffff80004660>] check_unaligned_access_nonboot_cpu+0x12/0x1a
> [    1.131046]   start_kernel+0x204/0x7e6
> [    1.131082] irq event stamp: 822
> [    1.131071] [<ffffffff800fcba0>] __flush_smp_call_function_queue+0x1de/0x790
> [    1.131093] hardirqs last  enabled at (821): [<ffffffff80bd75b0>] default_idle_call+0xfa/0x152
> [    1.131111] [<ffffffff800fd3a0>] generic_smp_call_function_single_interrupt+0xe/0x1a
> [    1.131124] hardirqs last disabled at (822): [<ffffffff80bd52a0>] do_irq+0x16/0xa6

Without the patch check_unaligned_access_boot_cpu() ->
check_unaligned_access() is okay. The SMP/IPI variant (the patch imho)
is bad. There must be no memory allocation from IRQ-off region - the
smp-function call in this case.

Would it be okay if I delay it until this solved? If you have something,
then I could apply the two patches plus the fixup for this.

Sebastian



More information about the linux-riscv mailing list