cpufreq: dt: fix resume warning
authorHuang, Tao <huangtao@rock-chips.com>
Tue, 24 May 2016 07:12:53 +0000 (15:12 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Wed, 25 May 2016 06:03:54 +0000 (14:03 +0800)
commitf970ae6d0560be87ddfa5caeb93b4429457e3c0b
treee941dd10d3fdb3f43b00b079662cad2c581ae51f
parent4d1f0892ddc9391a068d3a10b225b00db23344c3
cpufreq: dt: fix resume warning

This is workaround, but it fix this warning when rk3399 resume:

Detected PIPT I-cache on CPU4
CPU4: found redistributor 100 region 0:0x00000000fef80000
CPU4: Booted secondary processor [410fd082]
cpu cpu4: opp_list_debug_create_link: Failed to create link
cpu cpu4: _add_opp_dev: Failed to register opp debugfs (-12)
cpu cpu5: opp_list_debug_create_link: Failed to create link
cpu cpu5: _add_opp_dev: Failed to register opp debugfs (-12)
CPU4 is up
Detected PIPT I-cache on CPU5
CPU5: found redistributor 101 region 0:0x00000000fefa0000
CPU5: Booted secondary processor [410fd082]
------------[ cut here ]------------
WARNING: at drivers/base/power/opp/core.c:1452

CPU: 2 PID: 564 Comm: system_server Not tainted 4.4.10 #194
Hardware name: Rockchip RK3399 Evaluation Board v2 (Android) (DT)
task: ffffffc0e71fec00 ti: ffffffc0dbe10000 task.ti: ffffffc0dbe10000
PC is at dev_pm_opp_set_regulator+0x64/0x100
LR is at dev_pm_opp_set_regulator+0x38/0x100
pc : [<ffffff800846e968>] lr : [<ffffff800846e93c>] pstate: 80000045
sp : ffffffc0dbe138d0
x29: ffffffc0dbe138d0 x28: ffffff8008bb708e
x27: ffffff8008f58308 x26: ffffff8008d78000
x25: 0000000000000005 x24: ffffff8008bb89e9
x23: ffffff8008bb89e9 x22: ffffffc0eff814d8
x21: ffffffc0e47d2000 x20: ffffff8008dd6000
x19: ffffff8008dd6540 x18: 0000000030d00800
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: ffffffffff000000 x12: 0000000000000008
x11: 0000000000000038 x10: 0101010101010101
x9 : fffffffffffffffc x8 : 7f7f7f7f7f7f7f7f
x7 : ff786b6f6f74722c x6 : 0000000000000080
x5 : ffffffc0eff814d8 x4 : ffffffc0e47d2128
x3 : ffffff8008dd6530 x2 : ffffffc0e47e6200
x1 : ffffffc0e47d2138 x0 : ffffffc0e47e3f00

SP: 0xffffffc0dbe13850:
3850  08dd6000 ffffff80 e47d2000 ffffffc0 eff814d8 ffffffc0 08bb89e9 ffffff80
3870  08bb89e9 ffffff80 00000005 00000000 08d78000 ffffff80 08f58308 ffffff80
3890  08bb708e ffffff80 dbe138d0 ffffffc0 0846e93c ffffff80 dbe138d0 ffffffc0
38b0  0846e968 ffffff80 80000045 00000000 08dd6540 ffffff80 eff814d8 ffffffc0
38d0  dbe13910 ffffffc0 086572f4 ffffff80 00000000 00000000 eff814d8 ffffffc0
38f0  da7bc400 ffffffc0 d9c3f100 ffffffc0 00000000 00000000 08d78000 ffffff80
3910  dbe13960 ffffffc0 08650678 ffffff80 da7bc400 ffffffc0 08f58438 ffffff80
3930  08f58000 ffffff80 00000001 00000000 08d4f000 ffffff80 00000005 00000000

X0: 0xffffffc0e47e3e80:
3e80  75676572 6f74616c 2d352e72 50505553 a300594c 8a2e0000 f3ff0000 fff30000
3ea0  ffff0000 4fff0000 d5770000 65320000 b4ff0000 d24c0000 ffff0000 bf170000
3ec0  bfff0000 7e770000 df2c0000 00890000 5fee0000 85af0000 ffff0000 fdde0000
3ee0  feff0000 bfbf0000 bfa70000 36920000 4e3f0000 9cee0000 ffff0000 ff2f0000
3f00  eff6e4d8 ffffffc0 e4770028 ffffffc0 e4770028 ffffffc0 00000001 00000000
3f20  000dbba0 000dbba0 e47e3f80 ffffffc0 00000000 00000000 00000000 00000000
3f40  00000000 00000000 00000000 00000000 e4770000 ffffffc0 e6fcb900 ffffffc0
3f60  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

X1: 0xffffffc0e47d20b8:
20b8  00000000 00000000 00000000 00000000 080ae3ac ffffff80 e47d2090 ffffffc0
20d8  00200005 ffffffff ffffffff 00000000 00000000 00000000 00000000 00000000
20f8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2118  00000000 00000000 00000000 00000000 d9c41900 ffffffc0 e47e6200 ffffffc0
2138  e47d2138 ffffffc0 e47d2138 ffffffc0 eff98388 ffffffc0 00009c40 00000000
2158  00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000
2178  00000000 00000000 e47e3d00 ffffffc0 e47e3f00 ffffffc0 e6fcb540 ffffffc0
2198  35757063 00000000 00000000 00000000 00000000 00000000 00000000 00000000

X2: 0xffffffc0e47e6180:
6180  e47e6280 ffffffc0 00000200 dead0000 00000001 00000000 30a32c00 00000000
61a0  000dbba0 00000000 000dbba0 00000000 000dbba0 00000000 00000000 00000000
61c0  00000000 00000000 e47d2000 ffffffc0 00000000 00000000 00000050 00000000
61e0  eff98ac0 ffffffc0 e6fd6cc0 ffffffc0 00000000 00000000 00000000 00000000
6200  e47d2128 ffffffc0 d9c41900 ffffffc0 eff814d8 ffffffc0 00000000 00000000
6220  00000000 00000000 e6fcb540 ffffffc0 00000000 00000000 00000000 00000000
6240  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
6260  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

X4: 0xffffffc0e47d20a8:
20a8  080e5090 ffffff80 00000000 00000000 00000000 00000000 00000000 00000000
20c8  080ae3ac ffffff80 e47d2090 ffffffc0 00200005 ffffffff ffffffff 00000000
20e8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2108  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2128  d9c41900 ffffffc0 e47e6200 ffffffc0 e47d2138 ffffffc0 e47d2138 ffffffc0
2148  eff98388 ffffffc0 00009c40 00000000 00000000 00000001 00000000 00000000
2168  00000000 00000000 00000000 00000000 00000000 00000000 e47e3d00 ffffffc0
2188  e47e3f00 ffffffc0 e6fcb540 ffffffc0 35757063 00000000 00000000 00000000

X5: 0xffffffc0eff81458:
1458  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1478  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1498  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
14b8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
14d8  00000000 00000000 e6862f00 ffffffc0 e6865e00 ffffffc0 e6900020 ffffffc0
14f8  eff6e4f0 ffffffc0 e7209c10 ffffffc0 e71b6a00 ffffffc0 08dd5130 ffffff80
1518  e686a2d0 ffffffc0 00000003 00000007 00000000 00000000 00000000 00000000
1538  00000001 00000000 eff81540 ffffffc0 eff81540 ffffffc0 00000000 00000000

X13: 0xfffffffffeffff80:
ff80  ******** ******** ******** ******** ******** ******** ******** ********
ffa0  ******** ******** ******** ******** ******** ******** ******** ********
ffc0  ******** ******** ******** ******** ******** ******** ******** ********
ffe0  ******** ******** ******** ******** ******** ******** ******** ********
0000  ******** ******** ******** ******** ******** ******** ******** ********
0020  ******** ******** ******** ******** ******** ******** ******** ********
0040  ******** ******** ******** ******** ******** ******** ******** ********
0060  ******** ******** ******** ******** ******** ******** ******** ********

X21: 0xffffffc0e47d1f80:
1f80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2000  e47d1800 ffffffc0 e479b000 ffffffc0 00000001 00000000 e47d2018 ffffffc0
2020  e47d2018 ffffffc0 00000000 00000000 00000000 00000000 00000005 00000000
2040  08d58a20 ffffff80 000f000f 00000000 00000000 00000000 e47d2050 ffffffc0
2060  00000000 00000000 e47d2060 ffffffc0 00000000 00000000 e47d2070 ffffffc0

X22: 0xffffffc0eff81458:
1458  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1478  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1498  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
14b8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
14d8  00000000 00000000 e6862f00 ffffffc0 e6865e00 ffffffc0 e6900020 ffffffc0
14f8  eff6e4f0 ffffffc0 e7209c10 ffffffc0 e71b6a00 ffffffc0 08dd5130 ffffff80
1518  e686a2d0 ffffffc0 00000003 00000007 00000000 00000000 00000000 00000000
1538  00000001 00000000 eff81540 ffffffc0 eff81540 ffffffc0 00000000 00000000

X29: 0xffffffc0dbe13850:
3850  08dd6000 ffffff80 e47d2000 ffffffc0 eff814d8 ffffffc0 08bb89e9 ffffff80
3870  08bb89e9 ffffff80 00000005 00000000 08d78000 ffffff80 08f58308 ffffff80
3890  08bb708e ffffff80 dbe138d0 ffffffc0 0846e93c ffffff80 dbe138d0 ffffffc0
38b0  0846e968 ffffff80 80000045 00000000 08dd6540 ffffff80 eff814d8 ffffffc0
38d0  dbe13910 ffffffc0 086572f4 ffffff80 00000000 00000000 eff814d8 ffffffc0
38f0  da7bc400 ffffffc0 d9c3f100 ffffffc0 00000000 00000000 08d78000 ffffff80
3910  dbe13960 ffffffc0 08650678 ffffff80 da7bc400 ffffffc0 08f58438 ffffff80
3930  08f58000 ffffff80 00000001 00000000 08d4f000 ffffff80 00000005 00000000

---[ end trace e939d14abbcc0fd3 ]---
Call trace:
Exception stack(0xffffffc0dbe13710 to 0xffffffc0dbe13830)
3700:                                   ffffff8008dd6540 ffffff8008dd6000
3720: ffffffc0dbe138d0 ffffff800846e968 ffffffc0dbe13770 ffffff80086b096c
3740: 0000000000000004 ffffffbffe800924 ffffffc0dbe13780 ffffff80086b0930
3760: ffffff8008f58d50 ffffffc0eff96758 ffffffc0dbe13780 ffffff80086b0940
3780: ffffffc0dbe13790 ffffff80086b13b4 ffffffc0dbe137d0 ffffff80086b1620
37a0: 0000000000000000 ffffffbffe800870 ffffffc0e47e3f00 ffffffc0e47d2138
37c0: ffffffc0e47e6200 ffffff8008dd6530 ffffffc0e47d2128 ffffffc0eff814d8
37e0: 0000000000000080 ff786b6f6f74722c 7f7f7f7f7f7f7f7f fffffffffffffffc
3800: 0101010101010101 0000000000000038 0000000000000008 ffffffffff000000
3820: 0000000000000000 0000000000000000
[<ffffff800846e968>] dev_pm_opp_set_regulator+0x64/0x100
[<ffffff80086572f4>] cpufreq_init+0xb8/0x290
[<ffffff8008650678>] cpufreq_online+0x268/0x680
[<ffffff8008650ae0>] cpufreq_cpu_callback+0x50/0x5c
[<ffffff80080b5168>] notifier_call_chain+0x48/0x80
[<ffffff80080b5498>] __raw_notifier_call_chain+0xc/0x14
[<ffffff800809a480>] __cpu_notify+0x30/0x50
[<ffffff800809a4b4>] cpu_notify+0x14/0x1c
[<ffffff800809ab9c>] _cpu_up+0x10c/0x1e0
[<ffffff800809b2c4>] enable_nonboot_cpus+0x114/0x230
[<ffffff80080d7e10>] suspend_enter+0x464/0x61c
[<ffffff80080d8088>] suspend_devices_and_enter+0xc0/0x2b8
[<ffffff80080d8814>] pm_suspend+0x594/0x600
[<ffffff80080d6c10>] state_store+0x50/0x88
[<ffffff8008305434>] kobj_attr_store+0x18/0x28
[<ffffff80081e98bc>] sysfs_kf_write+0x44/0x4c
[<ffffff80081e8c78>] kernfs_fop_write+0x10c/0x168
[<ffffff800818b3e4>] __vfs_write+0x28/0xd0
[<ffffff800818b640>] vfs_write+0xac/0x174
[<ffffff800818b7d4>] SyS_write+0x48/0x84
[<ffffff8008084530>] el0_svc_naked+0x24/0x28
cpu cpu5: Failed to set regulator for cpu5: -16
CPU5 is up

It seems recent LSK and upstream is buggy about OPP and cpufreq,
we will waiting for new patch to fix this bug.

Change-Id: I73237b567451d9f3a0ac23f76e529b319f8480f3
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
drivers/cpufreq/cpufreq-dt.c