This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Not waking up once goes to "suspend to memory" in custom dm814x evm board

Other Parts Discussed in Thread: DM388

Hi All,

I'm checking PM suspend resume functionality using TI81xx custom board.
Using UART method, added 'no_console_suspend' bootargs, and it goes to suspend state $echo "mem" > /sys/power/state
But When i press any key, it crashes after early resume.

Check the logs here::
root@dm814x-evm:~# echo "mem" > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
PM: suspend of devices complete after 1.151 msecs
PM: suspend devices took 0.000 seconds
PM: late suspend of devices complete after 0.807 msecs  >>>pressing key after this<<<<
PM: early resume of devices complete after 0.837 msecs
kernel BUG at kernel/workqueue.c:989!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c36e0000
[00000000] *pgd=83686031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1]
last sysfs file: /sys/devices/virtual/vc/vcsa63/uevent
Modules linked in: syslink
CPU: 0    Not tainted  (2.6.37_DM388_IPNC_3.80.00 #8)
PC is at __bug+0x24/0x30
LR is at release_console_sem+0x180/0x194
pc : [<c004cd7c>]    lr : [<c0072410>]    psr: 60000093
sp : c3703d40  ip : c3703c80  fp : c3703d4c
r10: 00000000  r9 : c04d16ec  r8 : c46b3c08
r7 : 60000013  r6 : c04d16e8  r5 : c04b507c  r4 : c4403c00
r3 : 00000000  r2 : c04b3bf4  r1 : 00008e5f  r0 : 0000002c
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 836e0019  DAC: 00000015
Process sh (pid: 393, stack limit = 0xc37022e8)
Stack: (0xc3703d40 to 0xc3704000)
3d40: c3703d84 c3703d50 c0082d6c c004cd64 509c8af8 1b9f7aa2 80000013 60000013
3d60: 00000001 00000000 c04d16e8 c46b3c08 c0391b0c 00000000 c3703d9c c3703d88
3d80: c0082e1c c0082bd4 00000000 c04d1690 c3703dac c3703da0 c0082e70 c0082df8
3da0: c3703dbc c3703db0 c0082e90 c0082e5c c3703de4 c3703dc0 c02b1b3c c0082e80
3dc0: c02b1ae4 00000000 00000000 c021729c c46b3c08 c443f480 c3703df4 c3703de8
3de0: c02172e4 c02b1af0 c3703e2c c3703df8 c021a3cc c02172a8 c021a220 c0212844
3e00: 00000000 00000000 c0452189 c46b3c08 00000010 c46b3c3c c04c6f88 c46b3c60
3e20: c3703e4c c3703e30 c021a7cc c021a35c c46b3c08 00000010 c04c6f94 c04c6f88
3e40: c3703e94 c3703e50 c021aa78 c021a768 00000000 00000000 0482a7ff 0000004a
3e60: 0482a7ff 0000004a c04c6c28 c46b3a58 00000000 00000000 00000003 00000004
3e80: c037d8f8 c04352a2 c3703eb4 c3703e98 c009df78 c021a95c 60000013 c04352a2
3ea0: 00000003 00000000 c3703ed4 c3703eb8 c009e09c c009ddcc 0000006d c3e8b000
3ec0: 00000003 00000003 c3703efc c3703ed8 c009d698 c009dfe4 c441ac30 c3703f70
3ee0: 00000004 c3765cc0 c4420d40 c3765cd8 c3703f0c c3703f00 c01d29f4 c009d5f8
3f00: c3703f3c c3703f10 c010f824 c01d29e4 c3703f70 00000004 c36d3680 400cf000
3f20: c3703f70 00000004 c3702000 00000000 c3703f6c c3703f40 c00ca4f4 c010f720
3f40: c3703fa4 c3703f50 c0074e70 c36d3680 400cf000 00000000 00000000 00000004
3f60: c3703fa4 c3703f70 c00ca778 c00ca444 00000000 00000000 c00d6e78 00000000
3f80: 00000000 00000004 400cf000 402f95d0 00000004 c0049568 00000000 c3703fa8
3fa0: c00493c0 c00ca740 00000004 400cf000 00000001 400cf000 00000004 00000000
3fc0: 00000004 400cf000 402f95d0 00000004 00000004 400b24c0 000c2d48 000a3294
3fe0: 00000000 be9fa5d0 402363b8 4028915c 60000010 00000001 78030de9 4c00fd29
Backtrace:
[<c004cd58>] (__bug+0x0/0x30) from [<c0082d6c>] (__queue_work+0x1a4/0x1f8)
[<c0082bc8>] (__queue_work+0x0/0x1f8) from [<c0082e1c>] (queue_work_on+0x30/0x40)
[<c0082dec>] (queue_work_on+0x0/0x40) from [<c0082e70>] (queue_work+0x20/0x24)
 r5:c04d1690 r4:00000000
[<c0082e50>] (queue_work+0x0/0x24) from [<c0082e90>] (schedule_work+0x1c/0x24)
[<c0082e74>] (schedule_work+0x0/0x24) from [<c02b1b3c>] (soc_resume+0x58/0x8c)
[<c02b1ae4>] (soc_resume+0x0/0x8c) from [<c02172e4>] (platform_pm_resume+0x48/0x5c)
 r8:c443f480 r7:c46b3c08 r6:c021729c r5:00000000 r4:00000000
r3:c02b1ae4
[<c021729c>] (platform_pm_resume+0x0/0x5c) from [<c021a3cc>] (pm_op+0x7c/0xb4)
[<c021a350>] (pm_op+0x0/0xb4) from [<c021a7cc>] (device_resume+0x70/0x18c)
 r8:c46b3c60 r7:c04c6f88 r6:c46b3c3c r5:00000010 r4:c46b3c08
[<c021a75c>] (device_resume+0x0/0x18c) from [<c021aa78>] (dpm_resume_end+0x128/0x3f4)
 r7:c04c6f88 r6:c04c6f94 r5:00000010 r4:c46b3c08
[<c021a950>] (dpm_resume_end+0x0/0x3f4) from [<c009df78>] (suspend_devices_and_enter+0x1b8/0x218)
[<c009ddc0>] (suspend_devices_and_enter+0x0/0x218) from [<c009e09c>] (enter_state+0xc4/0x128)
 r6:00000000 r5:00000003 r4:c04352a2 r3:60000013
[<c009dfd8>] (enter_state+0x0/0x128) from [<c009d698>] (state_store+0xac/0xc0)
 r6:00000003 r5:00000003 r4:c3e8b000 r3:0000006d
[<c009d5ec>] (state_store+0x0/0xc0) from [<c01d29f4>] (kobj_attr_store+0x1c/0x28)
[<c01d29d8>] (kobj_attr_store+0x0/0x28) from [<c010f824>] (sysfs_write_file+0x110/0x144)
[<c010f714>] (sysfs_write_file+0x0/0x144) from [<c00ca4f4>] (vfs_write+0xbc/0x148)
[<c00ca438>] (vfs_write+0x0/0x148) from [<c00ca778>] (sys_write+0x44/0x70)
 r8:00000004 r7:00000000 r6:00000000 r5:400cf000 r4:c36d3680
[<c00ca734>] (sys_write+0x0/0x70) from [<c00493c0>] (ret_fast_syscall+0x0/0x30)
 r8:c0049568 r7:00000004 r6:402f95d0 r5:400cf000 r4:00000004
Code: e59f0010 e1a01003 eb0c9694 e3a03000 (e5833000)
---[ end trace 2e690282fcbc5097 ]---

Help would be much appreciated.

Regards
Kaushal

  • Hello,

    You could check this wiki page:
    processors.wiki.ti.com/.../TI81XX_PSP_PM_SUSPEND_RESUME_User_Guide
    and this e2e thread:
    e2e.ti.com/.../311407

    Hope this helps.

    BR
    Margarita
  • Hi Margarita,

    Thanks for the reply !!

    Gone through the link you mentioned above.

    But it seems , something going wrong while deferring the resume work in linux/sound/soc/soc-core.c file.

    Problem with scheduling work:: check the below if else condition.

    if (ac97_control) {
                            dev_dbg(dev, "Resuming AC97 immediately\n");
                            soc_resume_deferred(&card->deferred_resume_work);
    -               } else {
    +               } /*else {
                            dev_dbg(dev, "Scheduling resume work\n");
                            if (!schedule_work(&card->deferred_resume_work))
                                    dev_err(dev, "resume work item may be lost\n");
    -               }

    After commenting else part, Its resuming it completing but throwing some firmware exception.

    root@dm814x-evm:~# echo -n "mem" >/sys/power/state
    PM: Syncing filesystems ... done.
    Freezing user space processes ... (elapsed 0.01 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    PM: suspend of devices complete after 1.183 msecs
    PM: late suspend of devices complete after 0.859 msecs
    PM: early resume of devices complete after 0.786 msecs
    PM: resume of devices complete after 8.557 msecs
    done.arting tasks ...  [m3video] Unhandled Exception:
     [m3video] Exception occurred in ThreadType_SWI
     [m3video] handle: 0x8d5d84b0.
     [m3vpss ] Unhandled Exception:
     [m3vpss ] Exception occurred in ThreadType_SWI
     [m3vpss ] handle: 0x8f39d2e0.
     [m3video] stack base: 0x8d5dac20.
     [m3vpss ] stack base: 0x8f3a9b1c.
     [m3video] stack size: 0xa000.
     [m3vpss ] stack size: 0xa000.
     [m3video] R0 = 0x00000010  R8  = 0xffffffff
     [m3vpss ] R0 = 0x00000000  R8  = 0x00000001
     [m3video] R1 = 0x8cd952cd  R9  = 0xffffffff
     [m3vpss ] R1 = 0x00000004  R9  = 0x00000004
     [m3video] R2 = 0x00000001  R10 = 0x8d5d7ff4
     [m3vpss ] R2 = 0x8dcec1fd  R10 = 0x8e30fc08
     [m3video] R3 = 0x00000002  R11 = 0xffffffff
     [m3vpss ] R3 = 0x00000000  R11 = 0x8dcec2d7
     [m3video] R4 = 0x8d5d84b0  R12 = 0x22590300
     [m3vpss ] R4 = 0x00000000  R12 = 0x8f3b3a18
     [m3video] R5 = 0x00000000  SP(R13) = 0x8d5e4b38
     [m3vpss ] R5 = 0x8dd07567  SP(R13) = 0x8f3b39f0
     [m3video] R6 = 0x8cd34e90  LR(R14) = 0x8cd7d639
     [m3vpss ] R6 = 0x8e30f9f0  LR(R14) = 0x00000000
     [m3video] R7 = 0x00000000  PC(R15) = 0x8cd952d8
     [m3vpss ] R7 = 0x0000001c  PC(R15) = 0x8f39ccd0
     [m3video] PSR = 0x01000000
     [m3vpss ] PSR = 0x8f39cd54
     [m3video] ICSR = 0x0440f803
     [m3vpss ] ICSR = 0x0440f803
     [m3video] MMFSR = 0x00
     [m3vpss ] MMFSR = 0x00
     [m3video] BFSR = 0x83
     [m3vpss ] BFSR = 0x82
     [m3video] UFSR = 0x0000
     [m3vpss ] UFSR = 0x0000
     [m3video] HFSR = 0x40000000
     [m3vpss ] HFSR = 0x40000000
     [m3video] DFSR = 0x00000000
     [m3vpss ] DFSR = 0x00000000
     [m3video] MMAR = 0x8cd9530c
     [m3vpss ] MMAR = 0x8dcf79f0
     [m3video] BFAR = 0x8cd9530c
     [m3vpss ] BFAR = 0x8dcf79f0
     [m3video] AFSR = 0x00000000
     [m3vpss ] AFSR = 0x00000000
     [m3video] Terminating Execution...
     [m3vpss ] Terminating Execution...
    Any help how to fix these issue ?

    With best regards

    Kaushal Kumar