suspend (s2idle) for iMX6ull on imx_4.14.98_2.3.0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

suspend (s2idle) for iMX6ull on imx_4.14.98_2.3.0

722 次查看
etienne_lorrain
Contributor II

Hello,

I cannot suspend and resume the iMX6 single core processor, I get such a lock state failure:

root@Plexus-06-56-2a:/overlay/root# cat /proc/cmdline
console=ttymxc0,115200 navico_sku=0x201F02F2,0x804000,0x11000000 no_console_suspend
root@Plexus-06-56-2a:/overlay/root# echo freeze > /sys/power/state
[ 89.128165] PM: suspend entry (s2idle)
[ 89.133661] PM: Syncing filesystems ... done.
[ 89.253620] (NULL device *): Falling back to user helper
[ 89.323487] Freezing user space processes ... (elapsed 0.006 seconds) done.
[ 89.339368] OOM killer disabled.
[ 89.342989] Freezing remaining freezable tasks ... (elapsed 0.004 seconds) done.
[ 89.392097] wlcore: down
[ 89.396730] queueing ieee80211 work while going to suspend
[ 89.402829] wlcore: down
[ 89.406267] queueing ieee80211 work while going to suspend
[ 89.432054]
[ 89.433591] ================================
[ 89.437875] WARNING: inconsistent lock state
[ 89.442163] 4.14.98 #2 Not tainted
[ 89.445579] --------------------------------
[ 89.449865] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[ 89.455891] kworker/u2:3/806 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 89.461477] (&(&ci->lock)->rlock){?.-.}, at: [<bf069ed8>] ci_hdrc_enter_lpm+0x17c/0x28c [ci_hdrc]
[ 89.470536] {IN-HARDIRQ-W} state was registered at:
[ 89.475447] _raw_spin_lock+0x28/0x38
[ 89.479247] ci_irq+0x1c/0x178 [ci_hdrc]
[ 89.483283] __handle_irq_event_percpu+0x3c/0x128
[ 89.488095] handle_irq_event_percpu+0x1c/0x64
[ 89.492647] handle_irq_event+0x38/0x5c
[ 89.496590] handle_fasteoi_irq+0xa8/0x15c
[ 89.500794] generic_handle_irq+0x20/0x34
[ 89.504910] __handle_domain_irq+0x50/0xb8
[ 89.509114] gic_handle_irq+0x48/0x94
[ 89.512885] __irq_svc+0x70/0x98
[ 89.516215] _raw_spin_unlock_irqrestore+0x40/0x44
[ 89.521110] _raw_spin_unlock_irqrestore+0x40/0x44
[ 89.526010] __setup_irq+0x368/0x708
[ 89.529693] request_threaded_irq+0xc8/0x144
[ 89.534070] devm_request_threaded_irq+0x5c/0xb8
[ 89.538821] ci_hdrc_probe+0x308/0x830 [ci_hdrc]
[ 89.543551] platform_drv_probe+0x50/0xac
[ 89.547669] driver_probe_device+0x254/0x468
[ 89.552050] bus_for_each_drv+0x70/0x94
[ 89.555988] __device_attach+0xb0/0x144
[ 89.559933] bus_probe_device+0x88/0x90
[ 89.563876] device_add+0x348/0x5cc
[ 89.567469] platform_device_add+0x110/0x258
[ 89.571870] ci_hdrc_add_device+0x444/0x4b4 [ci_hdrc]
[ 89.577038] ci_hdrc_imx_probe+0x278/0x5ec [ci_hdrc_imx]
[ 89.582456] platform_drv_probe+0x50/0xac
[ 89.586570] driver_probe_device+0x254/0x468
[ 89.590943] __driver_attach+0xec/0x110
[ 89.594883] bus_for_each_dev+0x78/0x9c
[ 89.598826] bus_add_driver+0x1c8/0x258
[ 89.602769] driver_register+0x78/0xf4
[ 89.606624] do_one_initcall+0x3c/0x178
[ 89.610568] do_init_module+0x58/0x1f4
[ 89.614425] load_module+0x1f18/0x24dc
[ 89.618281] SyS_finit_module+0xb4/0xf4
[ 89.622224] ret_fast_syscall+0x0/0x28
[ 89.626077] irq event stamp: 855
[ 89.629325] hardirqs last enabled at (855): [<c08d14f8>] _raw_spin_unlock_irq+0x24/0x2c
[ 89.637443] hardirqs last disabled at (854): [<c08cb8cc>] __schedule+0xb4/0x794
[ 89.644775] softirqs last enabled at (708): [<c01016bc>] __do_softirq+0x1fc/0x2a0
[ 89.652368] softirqs last disabled at (697): [<c013134c>] irq_exit+0x8c/0x160
[ 89.659515]
[ 89.659515] other info that might help us debug this:
[ 89.666058] Possible unsafe locking scenario:
[ 89.666058]
[ 89.671992] CPU0
[ 89.674450] ----
[ 89.676905] lock(&(&ci->lock)->rlock);
[ 89.680856] <Interrupt>
[ 89.683485] lock(&(&ci->lock)->rlock);
[ 89.687603]
[ 89.687603] *** DEADLOCK ***
[ 89.687603]
[ 89.693544] 3 locks held by kworker/u2:3/806:
[ 89.697912] #0: ("events_unbound"){+.+.}, at: [<c0145a40>] process_one_work+0x1c8/0x4c4
[ 89.706143] #1: ((&entry->work)){+.+.}, at: [<c0145a40>] process_one_work+0x1c8/0x4c4
[ 89.714193] #2: (&dev->mutex){....}, at: [<c05cc710>] __device_suspend+0xac/0x3e8
[ 89.721905]
[ 89.721905] stack backtrace:
[ 89.726289] CPU: 0 PID: 806 Comm: kworker/u2:3 Not tainted 4.14.98 #2
[ 89.732743] Hardware name: Freescale i.MX6 UltraLite (Device Tree)
[ 89.738947] Workqueue: events_unbound async_run_entry_fn
[ 89.744308] [<c01112e0>] (unwind_backtrace) from [<c010c3cc>] (show_stack+0x10/0x14)
[ 89.752086] [<c010c3cc>] (show_stack) from [<c08b77d4>] (dump_stack+0xb0/0xe8)
[ 89.759340] [<c08b77d4>] (dump_stack) from [<c01778e8>] (print_usage_bug+0x228/0x2d8)
[ 89.767196] [<c01778e8>] (print_usage_bug) from [<c0177af4>] (mark_lock+0x15c/0x6dc)
[ 89.774967] [<c0177af4>] (mark_lock) from [<c0178964>] (__lock_acquire+0x68c/0x18cc)
[ 89.782737] [<c0178964>] (__lock_acquire) from [<c017a2d0>] (lock_acquire+0x68/0x88)
[ 89.790513] [<c017a2d0>] (lock_acquire) from [<c08d1280>] (_raw_spin_lock+0x28/0x38)
[ 89.798315] [<c08d1280>] (_raw_spin_lock) from [<bf069ed8>] (ci_hdrc_enter_lpm+0x17c/0x28c [ci_hdrc])
[ 89.807600] [<bf069ed8>] (ci_hdrc_enter_lpm [ci_hdrc]) from [<c05ca1d8>] (__rpm_callback+0x144/0x220)
[ 89.816856] [<c05ca1d8>] (__rpm_callback) from [<c05ca2d4>] (rpm_callback+0x20/0x80)
[ 89.824630] [<c05ca2d4>] (rpm_callback) from [<c05c9e28>] (rpm_resume+0x498/0x638)
[ 89.832232] [<c05c9e28>] (rpm_resume) from [<c05c9c20>] (rpm_resume+0x290/0x638)
[ 89.839655] [<c05c9c20>] (rpm_resume) from [<c05ca028>] (__pm_runtime_resume+0x60/0x8c)
[ 89.847859] [<c05ca028>] (__pm_runtime_resume) from [<bf02771c>] (usb_suspend+0x100/0x128 [usbcore])
[ 89.857148] [<bf02771c>] (usb_suspend [usbcore]) from [<c05cb928>] (dpm_run_callback+0x64/0xe4)
[ 89.865885] [<c05cb928>] (dpm_run_callback) from [<c05cc74c>] (__device_suspend+0xe8/0x3e8)
[ 89.874271] [<c05cc74c>] (__device_suspend) from [<c05cca64>] (async_suspend+0x18/0x90)
[ 89.882310] [<c05cca64>] (async_suspend) from [<c014f904>] (async_run_entry_fn+0x40/0x1a4)
[ 89.890611] [<c014f904>] (async_run_entry_fn) from [<c0145ab0>] (process_one_work+0x238/0x4c4)
[ 89.899258] [<c0145ab0>] (process_one_work) from [<c0145d6c>] (worker_thread+0x30/0x578)
[ 89.907378] [<c0145d6c>] (worker_thread) from [<c014c518>] (kthread+0x138/0x150)
[ 89.914805] [<c014c518>] (kthread) from [<c0108534>] (ret_from_fork+0x14/0x20)
[ 89.985443] PM: suspend devices took 0.630 seconds

Is there an obvious problem in ci_hdrc_enter_lpm() concerning interrupt disabling?

Thanks for any help,
Etienne.

0 项奖励
回复
2 回复数

705 次查看
etienne_lorrain
Contributor II

OK, thanks for the info (we are using both iMX8 and iMX6ull and I just checked if we could have the same base source code).
Probably time to evaluate a full upgrade...

Best Regards,
Etienne.

0 项奖励
回复

710 次查看
igorpadykov
NXP Employee
NXP Employee

Hi etienne_lorrain

 

L4.14.98_2.3.0 nxp linux release does not support i.MX6ULL as described on

below link of nxp official documentation:

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

1.jpg

 

2.jpg

 

 

 

Best regards
igor

0 项奖励
回复