coresight: etm4x: Change sdei_list_lock type
When start with preempt-rt kernel, the following problem occurs when executing cpu-hotplug. Replace spinlock in struct etmv4_drvdata with a raw_spinlock to fix. BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:969 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 19, name: migration/1 1 lock held by migration/1/19: #0: ffff00014d8f9930 (&drvdata->spinlock){....}-{0:0}, at: etm4_dying_cpu+0x38/0x70 irq event stamp: 14178 hardirqs last enabled at (14177): [<ffff800010f51530>] _raw_spin_unlock_irq+0x50/0xc0 hardirqs last disabled at (14178): [<ffff800010163998>] multi_cpu_stop+0x168/0x1b0 softirqs last enabled at (0): [<ffff80001003dd10>] copy_process+0x350/0x1170 softirqs last disabled at (0): [<0000000000000000>] 0x0 Preemption disabled at: [<ffff800010163048>] cpu_stopper_thread+0xa4/0x13c CPU: 1 PID: 19 Comm: migration/1 Not tainted 5.10.79-rt54-yocto-preempt-rt #1 Hardware name: Marvell OcteonTX CN96XX board (DT) Stopper: multi_cpu_stop+0x0/0x1b0 <- 0x0 Call trace: dump_backtrace+0x0/0x1e0 show_stack+0x24/0x30 dump_stack+0xec/0x154 ___might_sleep+0x17c/0x1f0 rt_spin_lock+0x74/0x100 etm4_dying_cpu+0x38/0x70 cpuhp_invoke_callback+0xb0/0x280 take_cpu_down+0x94/0xf0 multi_cpu_stop+0xac/0x1b0 cpu_stopper_thread+0xac/0x13c smpboot_thread_fn+0x298/0x340 kthread+0x174/0x180 ret_from_fork+0x10/0x18 Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
parent
f31c979f
Please register or sign in to comment