Commits
Robin Gong committed 936c74516db
MLK-22984 firmware: imx: imx-scu-irq: fix RCU complains after M4 partition reset Use blocking_notifier_chain instead of atomic_notifier_chain, otherwise below RCU complains would come out since unregister/register_virtio_device ()will issue mbox message (mbox_send_message() is blocking) again after received M4 partition reset. Actually, no need atomic for notifier which is so tough for user since this notifier is called in worker instead of interrupt handler directly. [ 389.706645] i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.2: i2c rpmsg driver is removed [ 389.767362] Wait for remote ready timeout, use first_notify. [ 389.774084] ------------[ cut here ]------------ [ 389.778729] WARNING: CPU: 0 PID: 397 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x34/0x338 [ 389.788131] Modules linked in: [ 389.791195] CPU: 0 PID: 397 Comm: kworker/0:13 Not tainted 5.4.0-rc5-02977-g08f78722f07b #26 [ 389.799633] Hardware name: Freescale i.MX8DXL Phantom MEK (DT) [ 389.805481] Workqueue: events imx_scu_irq_work_handler [ 389.810626] pstate: 20000085 (nzCv daIf -PAN -UAO) [ 389.815422] pc : rcu_note_context_switch+0x34/0x338 [ 389.820307] lr : __schedule+0x98/0x548 [ 389.824054] sp : ffff800013e7b770 [ 389.827362] x29: ffff800013e7b770 x28: 0000000000000000 [ 389.832679] x27: 0000000000000000 x26: 0000000000000100 [ 389.837997] x25: ffff0000299f6e00 x24: ffff80001112fdc8 [ 389.843312] x23: ffff800011f298c8 x22: ffff800011af4018 [ 389.848628] x21: 0000000000000000 x20: ffff0000299f6e00 [ 389.853945] x19: ffff00002afdd840 x18: ffff80001188ca18 [ 389.859262] x17: 0000000000000000 x16: 0000000000000000 [ 389.864579] x15: 0000000090008000 x14: ffff800012473000 [ 389.869896] x13: ffff800012470000 x12: 0000000000000100 [ 389.875212] x11: ffff0000297b9980 x10: 0000000000000001 [ 389.880529] x9 : 0000000000000228 x8 : 0000000000000220 [ 389.885846] x7 : 0000000000000035 x6 : ffff00002afd6418 [ 389.891162] x5 : 0000000000002000 x4 : 0000000000002000 [ 389.896479] x3 : 0000000000000000 x2 : ffff8000194dc000 [ 389.901798] x1 : 0000000000000001 x0 : 0000000000000001 [ 389.907115] Call trace: [ 389.909561] rcu_note_context_switch+0x34/0x338 [ 389.914094] __schedule+0x98/0x548 [ 389.917499] schedule+0x40/0xe0 [ 389.920643] schedule_timeout+0x144/0x268 [ 389.924659] wait_for_completion_timeout+0x94/0x128 [ 389.929543] mbox_send_message+0x9c/0x120 [ 389.933554] imx_rpmsg_notify+0x5c/0x68 [ 389.937397] virtqueue_notify+0x20/0x50 [ 389.941233] rpmsg_probe+0x274/0x318 [ 389.944811] virtio_dev_probe+0x16c/0x228 [ 389.948830] really_probe+0xd4/0x308 [ 389.952404] driver_probe_device+0x54/0xe8 [ 389.956507] __device_attach_driver+0x80/0xb8 [ 389.960868] bus_for_each_drv+0x78/0xc8 [ 389.964705] __device_attach+0xd4/0x130 [ 389.968549] device_initial_probe+0x10/0x18 [ 389.972735] bus_probe_device+0x90/0x98 [ 389.976574] device_add+0x3f0/0x638 [ 389.980067] register_virtio_device+0xb0/0x108 [ 389.984514] imx_rpmsg_restore+0x120/0x170 [ 389.988615] imx_rpmsg_partition_notify+0x3c/0x60 [ 389.993325] notifier_call_chain+0x54/0x90 [ 389.997424] atomic_notifier_call_chain+0x38/0x58 [ 390.002133] imx_scu_irq_work_handler+0x80/0xd8 [ 390.006669] process_one_work+0x1e0/0x358 [ 390.010681] worker_thread+0x40/0x488 [ 390.014349] kthread+0x118/0x120 [ 390.017580] ret_from_fork+0x10/0x18 [ 390.021157] ---[ end trace 7205c5eaadacce06 ]--- [ 390.025926] virtio_rpmsg_bus virtio0: rpmsg host is online Signed-off-by: Robin Gong <yibin.gong@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>