firmware: sdei: Change sdei_list_lock type
When start with preempt-rt kernel, the following problem occurs. BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:969 in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 17, name: cpuhp/0 3 locks held by cpuhp/0/17: #0: ffff800011c4bfe0 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x50/0x29c #1: ffff800011c4c040 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x90/0x29c #2: ffff8000124978f0 (sdei_list_lock){....}-{2:2}, at: sdei_cpuhp_up+0x40/0x130 irq event stamp: 44 hardirqs last enabled at (43): [<ffff800010f3ae40>] _raw_spin_unlock_irq+0x50/0xc0 hardirqs last disabled at (44): [<ffff8000100446d0>] cpuhp_thread_fun+0x24c/0x29c softirqs last enabled at (0): [<ffff80001003f2c0>] copy_process+0x340/0x11a0 softirqs last disabled at (0): [<0000000000000000>] 0x0 CPU: 0 PID: 17 Comm: cpuhp/0 Not tainted 5.10.63-rt47-yocto-preempt-rt #1 Hardware name: Marvell OcteonTX CN96XX board (DT) Call trace: dump_backtrace+0x0/0x1e0 show_stack+0x24/0x30 dump_stack+0xec/0x154 ___might_sleep+0x17c/0x1f0 rt_spin_lock+0x6c/0x10c sdei_cpuhp_up+0x40/0x130 cpuhp_invoke_callback+0xb0/0x280 cpuhp_thread_fun+0x124/0x29c smpboot_thread_fn+0x298/0x340 kthread+0x174/0x180 ret_from_fork+0x10/0x18 Change the type of sdei_list_lock from spinlock_t to raw_spinlock_t to fix. Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
parent
c1ab3bc0
Please register or sign in to comment