最近在调试6410的休眠唤醒问题,在arch/arm/plat-samsung/pm.c最后一行加入arch_initcall(s3c_pm_init);之后可以进行休眠,唤醒的过程中发现凡是调用了schedule这个函数都会出错,比如msleep的log:
BUG: scheduling while atomic: kworker/u:1/37/0x00000002
Modules linked in:
[<c003ad68>] (unwind_backtrace+0x0/0xf4) from [<c04df35c>] (schedule+0x444/0x530)
[<c04df35c>] (schedule+0x444/0x530) from [<c04dfb84>] (schedule_timeout+0x168/0x2e4)
[<c04dfb84>] (schedule_timeout+0x168/0x2e4) from [<c0065644>] (msleep+0x14/0x20)
[<c0065644>] (msleep+0x14/0x20) from [<c035b7f8>] (mmc_power_up+0xd0/0x160)
[<c035b7f8>] (mmc_power_up+0xd0/0x160) from [<c035b9b4>] (mmc_resume_host+0x12c/0x1a4)
wakeup wake lock: gpio wakelock
[<c035b9b4>] (mmc_resume_host+0x12c/0x1a4) from [<c0368fc0>] (sdhci_resume_host+0x84/0xc0)
[<c0368fc0>] (sdhci_resume_host+0x84/0xc0) from [<c036906c>] (sdhci_s3c_resume+0x10/0x18)
[<c036906c>] (sdhci_s3c_resume+0x10/0x18) from [<c027688c>] (platform_pm_resume+0x2c/0x4c)
[<c027688c>] (platform_pm_resume+0x2c/0x4c) from [<c0279df4>] (pm_op+0xa0/0xc0)
[<c0279df4>] (pm_op+0xa0/0xc0) from [<c027a228>] (device_resume+0x8c/0x1f0)
[<c027a228>] (device_resume+0x8c/0x1f0) from [<c027a4d0>] (dpm_resume_end+0x100/0x3ac)
[<c027a4d0>] (dpm_resume_end+0x100/0x3ac) from [<c008f060>] (suspend_devices_and_enter+0x10c/0x200)
[<c008f060>] (suspend_devices_and_enter+0x10c/0x200) from [<c008f23c>] (enter_state+0xe8/0x120)
[<c008f23c>] (enter_state+0xe8/0x120) from [<c0090a3c>] (suspend+0x60/0x140)
[<c0090a3c>] (suspend+0x60/0x140) from [<c006e528>] (process_one_work+0x148/0x4d0)
[<c006e528>] (process_one_work+0x148/0x4d0) from [<c0070fe0>] (worker_thread+0x15c/0x474)
[<c0070fe0>] (worker_thread+0x15c/0x474) from [<c0074d48>] (kthread+0x84/0x8c)
[<c0074d48>] (kthread+0x84/0x8c) from [<c0035a68>] (kernel_thread_exit+0x0/0x8)
s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004120, 3=80808080
还有另一个比较典型的:
BUG: scheduling while atomic: kworker/u:1/37/0x00000002
Modules linked in:
[<c003ad68>] (unwind_backtrace+0x0/0xf4) from [<c04df35c>] (schedule+0x444/0x530)
[<c04df35c>] (schedule+0x444/0x530) from [<c04dfbbc>] (schedule_timeout+0x1a0/0x2e4)
[<c04dfbbc>] (schedule_timeout+0x1a0/0x2e4) from [<c04df894>] (wait_for_common+0xd8/0x1a4)
[<c04df894>] (wait_for_common+0xd8/0x1a4) from [<c035d364>] (mmc_wait_for_req+0x17c/0x244)
[<c035d364>] (mmc_wait_for_req+0x17c/0x244) from [<c035d484>] (mmc_wait_for_cmd+0x58/0x78)
[<c035d484>] (mmc_wait_for_cmd+0x58/0x78) from [<c0360c20>] (mmc_app_cmd+0x3c/0xb4)
[<c0360c20>] (mmc_app_cmd+0x3c/0xb4) from [<c0360e1c>] (mmc_wait_for_app_cmd+0x64/0xd0)
[<c0360e1c>] (mmc_wait_for_app_cmd+0x64/0xd0) from [<c03611e8>] (mmc_send_app_op_cond+0x84/0xe4)
[<c03611e8>] (mmc_send_app_op_cond+0x84/0xe4) from [<c0360580>] (mmc_sd_get_cid+0x38/0x6c)
[<c0360580>] (mmc_sd_get_cid+0x38/0x6c) from [<c0360698>] (mmc_sd_init_card+0x34/0x200)
[<c0360698>] (mmc_sd_init_card+0x34/0x200) from [<c0360a94>] (mmc_sd_resume+0x30/0x64)
[<c0360a94>] (mmc_sd_resume+0x30/0x64) from [<c035b924>] (mmc_resume_host+0x9c/0x1a4)
[<c035b924>] (mmc_resume_host+0x9c/0x1a4) from [<c0368fc0>] (sdhci_resume_host+0x84/0xc0)
[<c0368fc0>] (sdhci_resume_host+0x84/0xc0) from [<c036906c>] (sdhci_s3c_resume+0x10/0x18)
。。。。。
请问各位有何解决问题的思路,多谢啦~~~