e5e21f70bf
Take the regulator lock before applying system load.
Fixes the following lockdep splat:
[ 5.583581] WARNING: CPU: 1 PID: 16 at drivers/regulator/core.c:925 drms_uA_update+0x114/0x360
[ 5.588467] Modules linked in:
[ 5.596833] CPU: 1 PID: 16 Comm: kworker/1:0 Not tainted 5.0.0-rc6-next-20190213-00002-g0fce66ab480f #18
[ 5.599933] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[ 5.609544] Workqueue: events qcom_channel_state_worker
[ 5.616209] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 5.621152] pc : drms_uA_update+0x114/0x360
[ 5.626006] lr : drms_uA_update+0x110/0x360
[ 5.630084] sp : ffff0000124b3490
[ 5.634242] x29: ffff0000124b3490 x28: ffff800005326e00
[ 5.637735] x27: ffff0000124b35f8 x26: 000000000032bc48
[ 5.643117] x25: ffff800004c7e800 x24: ffff800004c6d500
[ 5.648411] x23: ffff800004c38a80 x22: 00000000000000d1
[ 5.653706] x21: 00000000001ab3f0 x20: ffff800004c7e800
[ 5.659001] x19: ffff0000114c3000 x18: ffffffffffffffff
[ 5.664297] x17: 0000000000000000 x16: 0000000000000000
[ 5.669592] x15: ffff0000114c3808 x14: 0720072007200720
[ 5.674888] x13: 00000000199c9b28 x12: ffff80002bcccc40
[ 5.680183] x11: ffff000012286000 x10: ffff0000114c3808
[ 5.685477] x9 : 0720072007200720 x8 : ffff000010e9e808
[ 5.690772] x7 : ffff0000106da568 x6 : 0000000000000000
[ 5.696067] x5 : 0000000000000000 x4 : 0000000000000000
[ 5.701362] x3 : 0000000000000004 x2 : 0000000000000000
[ 5.706658] x1 : 0000000000000000 x0 : 0000000000000000
[ 5.711952] Call trace:
[ 5.717223] drms_uA_update+0x114/0x360
[ 5.719405] regulator_register+0xb30/0x1140
[ 5.723230] devm_regulator_register+0x4c/0xa8
[ 5.727745] rpm_reg_probe+0xfc/0x1b0
[ 5.731992] platform_drv_probe+0x50/0xa0
[ 5.735727] really_probe+0x20c/0x2b8
[ 5.739718] driver_probe_device+0x58/0x100
[ 5.743368] __device_attach_driver+0x90/0xd0
[ 5.747363] bus_for_each_drv+0x64/0xc8
[ 5.751870] __device_attach+0xd8/0x138
[ 5.755516] device_initial_probe+0x10/0x18
[ 5.759341] bus_probe_device+0x98/0xa0
[ 5.763502] device_add+0x3d0/0x640
[ 5.767319] of_device_add+0x48/0x58
[ 5.770793] of_platform_device_create_pdata+0xb0/0x128
[ 5.774629] of_platform_bus_create+0x174/0x370
[ 5.779569] of_platform_populate+0x78/0xe0
[ 5.784082] qcom_smd_rpm_probe+0x80/0xa0
[ 5.788245] rpmsg_dev_probe+0x114/0x1a0
[ 5.792411] really_probe+0x20c/0x2b8
[ 5.796401] driver_probe_device+0x58/0x100
[ 5.799964] __device_attach_driver+0x90/0xd0
[ 5.803960] bus_for_each_drv+0x64/0xc8
[ 5.808468] __device_attach+0xd8/0x138
[ 5.812115] device_initial_probe+0x10/0x18
[ 5.815936] bus_probe_device+0x98/0xa0
[ 5.820099] device_add+0x3d0/0x640
[ 5.823916] device_register+0x1c/0x28
[ 5.827391] rpmsg_register_device+0x4c/0x90
[ 5.831216] qcom_channel_state_worker+0x170/0x298
[ 5.835651] process_one_work+0x294/0x6e8
[ 5.840241] worker_thread+0x40/0x450
[ 5.844318] kthread+0x11c/0x120
[ 5.847961] ret_from_fork+0x10/0x18
[ 5.851260] irq event stamp: 9090
[ 5.854820] hardirqs last enabled at (9089): [<ffff000010160798>] console_unlock+0x3e0/0x5b0
[ 5.858086] hardirqs last disabled at (9090): [<ffff0000100817cc>] do_debug_exception+0x104/0x140
[ 5.866596] softirqs last enabled at (9086): [<ffff000010082024>] __do_softirq+0x474/0x574
[ 5.875446] softirqs last disabled at (9079): [<ffff0000100f2254>] irq_exit+0x13c/0x148
[ 5.883598] ---[ end trace 6984ef7f081afa21 ]---
Fixes:
|
||
---|---|---|
.. | ||
88pg86x.c | ||
88pm800.c | ||
88pm8607.c | ||
aat2870-regulator.c | ||
ab3100.c | ||
ab8500-ext.c | ||
ab8500.c | ||
act8865-regulator.c | ||
act8945a-regulator.c | ||
ad5398.c | ||
anatop-regulator.c | ||
arizona-ldo1.c | ||
arizona-micsupp.c | ||
as3711-regulator.c | ||
as3722-regulator.c | ||
axp20x-regulator.c | ||
bcm590xx-regulator.c | ||
bd718x7-regulator.c | ||
bd9571mwv-regulator.c | ||
core.c | ||
cpcap-regulator.c | ||
da903x.c | ||
da9052-regulator.c | ||
da9055-regulator.c | ||
da9062-regulator.c | ||
da9063-regulator.c | ||
da9210-regulator.c | ||
da9210-regulator.h | ||
da9211-regulator.c | ||
da9211-regulator.h | ||
db8500-prcmu.c | ||
dbx500-prcmu.c | ||
dbx500-prcmu.h | ||
devres.c | ||
dummy.c | ||
dummy.h | ||
fan53555.c | ||
fixed-helper.c | ||
fixed.c | ||
gpio-regulator.c | ||
helpers.c | ||
hi655x-regulator.c | ||
hi6421-regulator.c | ||
hi6421v530-regulator.c | ||
internal.h | ||
isl6271a-regulator.c | ||
isl9305.c | ||
Kconfig | ||
lm363x-regulator.c | ||
lochnagar-regulator.c | ||
lp872x.c | ||
lp873x-regulator.c | ||
lp3971.c | ||
lp3972.c | ||
lp8755.c | ||
lp8788-buck.c | ||
lp8788-ldo.c | ||
lp87565-regulator.c | ||
ltc3589.c | ||
ltc3676.c | ||
Makefile | ||
max1586.c | ||
max8649.c | ||
max8660.c | ||
max8907-regulator.c | ||
max8925-regulator.c | ||
max8952.c | ||
max8973-regulator.c | ||
max8997-regulator.c | ||
max8998.c | ||
max14577-regulator.c | ||
max77620-regulator.c | ||
max77686-regulator.c | ||
max77693-regulator.c | ||
max77802-regulator.c | ||
mc13xxx-regulator-core.c | ||
mc13xxx.h | ||
mc13783-regulator.c | ||
mc13892-regulator.c | ||
mcp16502.c | ||
mt6311-regulator.c | ||
mt6311-regulator.h | ||
mt6323-regulator.c | ||
mt6380-regulator.c | ||
mt6397-regulator.c | ||
of_regulator.c | ||
palmas-regulator.c | ||
pbias-regulator.c | ||
pcap-regulator.c | ||
pcf50633-regulator.c | ||
pfuze100-regulator.c | ||
pv88060-regulator.c | ||
pv88060-regulator.h | ||
pv88080-regulator.c | ||
pv88080-regulator.h | ||
pv88090-regulator.c | ||
pv88090-regulator.h | ||
pwm-regulator.c | ||
qcom_rpm-regulator.c | ||
qcom_smd-regulator.c | ||
qcom_spmi-regulator.c | ||
qcom-rpmh-regulator.c | ||
rc5t583-regulator.c | ||
rk808-regulator.c | ||
rn5t618-regulator.c | ||
rt5033-regulator.c | ||
s2mpa01.c | ||
s2mps11.c | ||
s5m8767.c | ||
sc2731-regulator.c | ||
sky81452-regulator.c | ||
stm32-vrefbuf.c | ||
stpmic1_regulator.c | ||
stw481x-vmmc.c | ||
sy8106a-regulator.c | ||
ti-abb-regulator.c | ||
tps6105x-regulator.c | ||
tps6507x-regulator.c | ||
tps6524x-regulator.c | ||
tps6586x-regulator.c | ||
tps51632-regulator.c | ||
tps62360-regulator.c | ||
tps65023-regulator.c | ||
tps65086-regulator.c | ||
tps65090-regulator.c | ||
tps65132-regulator.c | ||
tps65217-regulator.c | ||
tps65218-regulator.c | ||
tps65910-regulator.c | ||
tps65912-regulator.c | ||
tps80031-regulator.c | ||
twl6030-regulator.c | ||
twl-regulator.c | ||
uniphier-regulator.c | ||
userspace-consumer.c | ||
vctrl-regulator.c | ||
vexpress-regulator.c | ||
virtual.c | ||
wm831x-dcdc.c | ||
wm831x-isink.c | ||
wm831x-ldo.c | ||
wm8350-regulator.c | ||
wm8400-regulator.c | ||
wm8994-regulator.c |