2.6.25 / mainline tracking effort - suspend OK

Andy Green andy at openmoko.com
Sun Apr 13 13:36:33 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:

| ~ - can't enter suspend, echo mem > /sys/power/state does not do it but
| sits there, the console still echos CRLF.  Maybe the SDIO/WLAN thing
| breaks it.

This was caused by the unresolved issue with Sean's ac /sys node patch
calling an APM API that blocks forever.  When I removed the patch from
andy-tracking, suspend did work, but it immediately resumed for some
reason.  Still that's great.

Also the thing locked up for the same reason in udev disallowing coming
into X.  With the patch removed, we come fully up into rootfs X.

Sean, here is a lockup call stack for udev also blocking on the same
/sys node problem, it seems apm_battery_apm_get_power_status() blocks on
a mutex somehow, maybe it helps understand the behaviour.  Looking at
the held mutexes at the bottom, it seems it holds the same one twice
from the same code?

[ 2331.095000] INFO: task udevtrigger:396 blocked for more than 120 seconds.
[ 2331.100000] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 2331.105000] udevtrigger   D c02bf450     0   396    362
[ 2331.110000] [<c02bf204>] (schedule+0x0/0x2b0) from [<c02c0114>]
(mutex_lock_nested+0x168/0x25c)
[ 2331.115000] [<c02bffac>] (mutex_lock_nested+0x0/0x25c) from
[<c01ca380>] (apm_battery_apm_get_power_status+0x24/0x308)
[ 2331.120000] [<c01ca35c>] (apm_battery_apm_get_power_status+0x0/0x308)
from [<c01ca9d8>] (ac_get_property+0x38/0x7c)
[ 2331.130000]  r6:00000000 r5:0000000d r4:c7ee3d8c
[ 2331.135000] [<c01ca9a0>] (ac_get_property+0x0/0x7c) from [<c01c9ec0>]
(__find_main_battery+0x48/0x100)
[ 2331.145000]  r5:c7ee3d8c r4:c7ee3d7c
[ 2331.160000] [<c01c9e78>] (__find_main_battery+0x0/0x100) from
[<c017e4f0>] (class_for_each_device+0x80/0xe4)
[ 2331.165000]  r6:c7d6b200 r5:c7c606c0 r4:00000000
[ 2331.180000] [<c017e470>] (class_for_each_device+0x0/0xe4) from
[<c01ca3b0>] (apm_battery_apm_get_power_status+0x54/0x308)
[ 2331.185000] [<c01ca35c>] (apm_battery_apm_get_power_status+0x0/0x308)
from [<c01ca9d8>] (ac_get_property+0x38/0x7c)
[ 2331.200000]  r6:c7d6b200 r5:00000003 r4:c7ee3df4
[ 2331.205000] [<c01ca9a0>] (ac_get_property+0x0/0x7c) from [<c01c8d1c>]
(power_supply_show_property+0x48/0x10c)
[ 2331.210000]  r5:00000003 r4:00000000
[ 2331.215000] [<c01c8cd4>] (power_supply_show_property+0x0/0x10c) from
[<c01c8fa8>] (power_supply_uevent+0x15c/0x274)
[ 2331.225000]  r8:00000000 r7:c7d6b200 r6:c6c2c000 r5:0000003c r4:00000000
[ 2331.240000] [<c01c8e4c>] (power_supply_uevent+0x0/0x274) from
[<c017abdc>] (dev_uevent+0x188/0x1d0)
[ 2331.245000] [<c017aa54>] (dev_uevent+0x0/0x1d0) from [<c013c228>]
(kobject_uevent_env+0x18c/0x424)
[ 2331.250000]  r7:c7e45000 r6:00000000 r5:c7d6b2e8 r4:c7d6b200
[ 2331.260000] [<c013c09c>] (kobject_uevent_env+0x0/0x424) from
[<c013c4d4>] (kobject_uevent+0x14/0x18)
[ 2331.265000] [<c013c4c0>] (kobject_uevent+0x0/0x18) from [<c0179e68>]
(store_uevent+0x60/0x70)
[ 2331.275000] [<c0179e08>] (store_uevent+0x0/0x70) from [<c0179a40>]
(dev_attr_store+0x28/0x34)
[ 2331.280000]  r6:00000003 r5:c7e40bc0 r4:c7d938fc
[ 2331.290000] [<c0179a18>] (dev_attr_store+0x0/0x34) from [<c00dc528>]
(sysfs_write_file+0x124/0x17c)
[ 2331.300000] [<c00dc404>] (sysfs_write_file+0x0/0x17c) from
[<c009caf4>] (vfs_write+0xbc/0x14c)
[ 2331.310000] [<c009ca38>] (vfs_write+0x0/0x14c) from [<c009d12c>]
(sys_write+0x4c/0x7c)
[ 2331.315000]  r7:00000004 r6:00000000 r5:00000000 r4:c6c03c20
[ 2331.320000] [<c009d0e0>] (sys_write+0x0/0x7c) from [<c0029a80>]
(ret_fast_syscall+0x0/0x2c)
[ 2331.325000]  r6:bebb5258 r5:00015fb4 r4:00000003
[ 2331.330000] 3 locks held by udevtrigger/396:
[ 2331.335000]  #0:  (&buffer->mutex){....}, at: [<c00dc438>]
sysfs_write_file+0x34/0x17c
[ 2331.345000]  #1:  (apm_mutex){....}, at: [<c01ca380>]
apm_battery_apm_get_power_status+0x24/0x308
[ 2331.350000]  #2:  (apm_mutex){....}, at: [<c01ca380>]
apm_battery_apm_get_power_status+0x24/0x308

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkgB8DgACgkQOjLpvpq7dMqU1QCfZ4LMLm8zH7oRXgLWqRR/HHfy
Rl8AoIUhVrpc3lcSQ2tN2/gzBfvUecKg
=9GTB
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list