[BUG] mfd: wm8994: kenel WARN and crashes

From: Viresh Kumar
Date: Fri Sep 09 2016 - 04:49:47 EST


Hi Guys,

Didn't had much time to investigate and so just reporting the issue
for now.

My dual core exynos (A15) crashes while booting with following
logs..

[ 2.150076] wm8994 3-001a: Device is not a WM8994, ID is 0
[ 2.154289] ------------[ cut here ]------------
[ 2.158738] WARNING: CPU: 1 PID: 1 at
/mnt/ssd/all/work/repos/devel/linux/drivers/regulator/core.c:4072
regulator_unregister+0xc8/0xd0
[ 2.170806] Modules linked in:
[ 2.173793] CPU: 1 PID: 1 Comm: swapper/0 Not tainted
4.8.0-rc4-00085-g32f3101535ae-dirty #20
[ 2.182310] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[ 2.188396] [<c010e2d0>] (unwind_backtrace) from [<c010af30>]
(show_stack+0x10/0x14)
[ 2.196120] [<c010af30>] (show_stack) from [<c0329ce4>]
(dump_stack+0x88/0x9c)
[ 2.203321] [<c0329ce4>] (dump_stack) from [<c011a958>] (__warn+0xe8/0x100)
[ 2.210255] [<c011a958>] (__warn) from [<c011aa20>]
(warn_slowpath_null+0x20/0x28)
[ 2.217815] [<c011aa20>] (warn_slowpath_null) from [<c0384534>]
(regulator_unregister+0xc8/0xd0)
[ 2.226586] [<c0384534>] (regulator_unregister) from [<c040692c>]
(release_nodes+0x16c/0x1dc)
[ 2.235094] [<c040692c>] (release_nodes) from [<c0403ea0>]
(__device_release_driver+0x8c/0x110)
[ 2.243772] [<c0403ea0>] (__device_release_driver) from
[<c0403f40>] (device_release_driver+0x1c/0x28)
[ 2.253060] [<c0403f40>] (device_release_driver) from [<c0403000>]
(bus_remove_device+0xd8/0x104)
[ 2.261912] [<c0403000>] (bus_remove_device) from [<c04001b4>]
(device_del+0x10c/0x218)
[ 2.269896] [<c04001b4>] (device_del) from [<c0405328>]
(platform_device_del+0x1c/0x88)
[ 2.277881] [<c0405328>] (platform_device_del) from [<c04053a0>]
(platform_device_unregister+0xc/0x20)
[ 2.287173] [<c04053a0>] (platform_device_unregister) from
[<c0428a20>] (mfd_remove_devices_fn+0x5c/0x64)
[ 2.296720] [<c0428a20>] (mfd_remove_devices_fn) from [<c03ffeb4>]
(device_for_each_child_reverse+0x4c/0x78)
[ 2.306528] [<c03ffeb4>] (device_for_each_child_reverse) from
[<c0428724>] (mfd_remove_devices+0x20/0x30)
[ 2.316076] [<c0428724>] (mfd_remove_devices) from [<c04273ec>]
(wm8994_device_init+0x2ac/0x7f0)
[ 2.324845] [<c04273ec>] (wm8994_device_init) from [<c04f127c>]
(i2c_device_probe+0x178/0x1fc)
[ 2.333436] [<c04f127c>] (i2c_device_probe) from [<c0403bd8>]
(driver_probe_device+0x214/0x2c0)
[ 2.342116] [<c0403bd8>] (driver_probe_device) from [<c0403d30>]
(__driver_attach+0xac/0xb0)
[ 2.350535] [<c0403d30>] (__driver_attach) from [<c0401f50>]
(bus_for_each_dev+0x68/0x9c)
[ 2.358693] [<c0401f50>] (bus_for_each_dev) from [<c04031cc>]
(bus_add_driver+0x1a0/0x218)
[ 2.366940] [<c04031cc>] (bus_add_driver) from [<c0404548>]
(driver_register+0x78/0xf8)
[ 2.374928] [<c0404548>] (driver_register) from [<c04f1e74>]
(i2c_register_driver+0x34/0x84)
[ 2.383345] [<c04f1e74>] (i2c_register_driver) from [<c01017d0>]
(do_one_initcall+0x40/0x170)
[ 2.391854] [<c01017d0>] (do_one_initcall) from [<c0a00dbc>]
(kernel_init_freeable+0x15c/0x1fc)
[ 2.400533] [<c0a00dbc>] (kernel_init_freeable) from [<c06de010>]
(kernel_init+0x8/0x114)
[ 2.408691] [<c06de010>] (kernel_init) from [<c0107978>]
(ret_from_fork+0x14/0x3c)
[ 2.416285] ---[ end trace cdae3f0945a6102d ]---
[ 2.421160] ------------[ cut here ]------------
[ 2.425469] WARNING: CPU: 1 PID: 1 at
/mnt/ssd/all/work/repos/devel/linux/drivers/regulator/core.c:4072
regulator_unregister+0xc8/0xd0
[ 2.437541] Modules linked in:
[ 2.440529] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W
4.8.0-rc4-00085-g32f3101535ae-dirty #20
[ 2.450262] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[ 2.456338] [<c010e2d0>] (unwind_backtrace) from [<c010af30>]
(show_stack+0x10/0x14)
[ 2.464069] [<c010af30>] (show_stack) from [<c0329ce4>]
(dump_stack+0x88/0x9c)
[ 2.471271] [<c0329ce4>] (dump_stack) from [<c011a958>] (__warn+0xe8/0x100)
[ 2.478206] [<c011a958>] (__warn) from [<c011aa20>]
(warn_slowpath_null+0x20/0x28)
[ 2.485767] [<c011aa20>] (warn_slowpath_null) from [<c0384534>]
(regulator_unregister+0xc8/0xd0)
[ 2.494535] [<c0384534>] (regulator_unregister) from [<c040692c>]
(release_nodes+0x16c/0x1dc)
[ 2.503044] [<c040692c>] (release_nodes) from [<c0403ea0>]
(__device_release_driver+0x8c/0x110)
[ 2.511724] [<c0403ea0>] (__device_release_driver) from
[<c0403f40>] (device_release_driver+0x1c/0x28)
[ 2.521011] [<c0403f40>] (device_release_driver) from [<c0403000>]
(bus_remove_device+0xd8/0x104)
[ 2.529863] [<c0403000>] (bus_remove_device) from [<c04001b4>]
(device_del+0x10c/0x218)
[ 2.537847] [<c04001b4>] (device_del) from [<c0405328>]
(platform_device_del+0x1c/0x88)
[ 2.545832] [<c0405328>] (platform_device_del) from [<c04053a0>]
(platform_device_unregister+0xc/0x20)
[ 2.555122] [<c04053a0>] (platform_device_unregister) from
[<c0428a20>] (mfd_remove_devices_fn+0x5c/0x64)
[ 2.564671] [<c0428a20>] (mfd_remove_devices_fn) from [<c03ffeb4>]
(device_for_each_child_reverse+0x4c/0x78)
[ 2.574479] [<c03ffeb4>] (device_for_each_child_reverse) from
[<c0428724>] (mfd_remove_devices+0x20/0x30)
[ 2.584027] [<c0428724>] (mfd_remove_devices) from [<c04273ec>]
(wm8994_device_init+0x2ac/0x7f0)
[ 2.592794] [<c04273ec>] (wm8994_device_init) from [<c04f127c>]
(i2c_device_probe+0x178/0x1fc)
[ 2.601387] [<c04f127c>] (i2c_device_probe) from [<c0403bd8>]
(driver_probe_device+0x214/0x2c0)
[ 2.610067] [<c0403bd8>] (driver_probe_device) from [<c0403d30>]
(__driver_attach+0xac/0xb0)
[ 2.618486] [<c0403d30>] (__driver_attach) from [<c0401f50>]
(bus_for_each_dev+0x68/0x9c)
[ 2.626645] [<c0401f50>] (bus_for_each_dev) from [<c04031cc>]
(bus_add_driver+0x1a0/0x218)
[ 2.634892] [<c04031cc>] (bus_add_driver) from [<c0404548>]
(driver_register+0x78/0xf8)
[ 2.642877] [<c0404548>] (driver_register) from [<c04f1e74>]
(i2c_register_driver+0x34/0x84)
[ 2.651296] [<c04f1e74>] (i2c_register_driver) from [<c01017d0>]
(do_one_initcall+0x40/0x170)
[ 2.659803] [<c01017d0>] (do_one_initcall) from [<c0a00dbc>]
(kernel_init_freeable+0x15c/0x1fc)
[ 2.668484] [<c0a00dbc>] (kernel_init_freeable) from [<c06de010>]
(kernel_init+0x8/0x114)
[ 2.676641] [<c06de010>] (kernel_init) from [<c0107978>]
(ret_from_fork+0x14/0x3c)
[ 2.684276] ---[ end trace cdae3f0945a6102e ]---
[ 2.689173] Unable to handle kernel NULL pointer dereference at
virtual address 00000078
[ 2.696897] pgd = c0004000
[ 2.699539] [00000078] *pgd=00000000
[ 2.703100] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 2.708395] Modules linked in:
[ 2.711431] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W
4.8.0-rc4-00085-g32f3101535ae-dirty #20
[ 2.721165] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[ 2.727232] task: ee874000 task.stack: ee878000
[ 2.731749] PC is at down_write+0x14/0x54
[ 2.735741] LR is at debugfs_remove_recursive+0x30/0x150
[ 2.741034] pc : [<c06e20fc>] lr : [<c02e9468>] psr: 80000013
[ 2.741034] sp : ee879e18 ip : 2e583000 fp : 00000000
[ 2.752502] r10: 00000000 r9 : c04064fc r8 : ee444be0
[ 2.757698] r7 : ee444c64 r6 : ee444c30 r5 : ee444be0 r4 : 00000078
[ 2.764208] r3 : ffff0001 r2 : 00000000 r1 : 00000001 r0 : 00000078
[ 2.770720] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 2.777837] Control: 10c5387d Table: 4000406a DAC: 00000051
[ 2.783564] Process swapper/0 (pid: 1, stack limit = 0xee878210)
[ 2.789554] Stack: (0xee879e18 to 0xee87a000)
[ 2.793894] 9e00:
ee15d280 c02e9468
[ 2.802066] 9e20: ee15d280 ee152400 0000000d eea22820 ee879e58
c03826a0 c0b1505c ee15d280
[ 2.810224] 9e40: 0000000d c0382744 ee15d240 ee15d140 0000000d
c040692c ee1e7200 ee15d640
[ 2.818383] 9e60: eea22820 c0b81c4c c0b81c54 c0b22320 ffffffea
00000000 00000000 c0403ab0
[ 2.826543] 9e80: eea22820 c0b22320 eea22854 c0b2a950 c0b44000
000000d8 00000000 c0403d30
[ 2.834702] 9ea0: 00000000 c0b22320 c0403c84 c0401f50 ee97be74
eea174c0 c0b22320 ee16ec00
[ 2.842861] 9ec0: 00000000 c04031cc c08a4c5c c0a1d418 c0a34840
c0b22320 c0a1d418 c0a34840
[ 2.851020] 9ee0: c0b44000 c0404548 c0b22304 c0a1d418 c0a34840
c04f1e74 c0a5fe60 c0a1d418
[ 2.859179] 9f00: c0a34840 c01017d0 c0b0ac18 ee879f18 c0b45fe8
c06e17a0 60000000 c0b0958c
[ 2.867338] 9f20: 00000000 c0b0958c efffca46 c0716b40 efffca42
c0135074 0000cccd 00000000
[ 2.875498] 9f40: c08cd618 00000000 00000006 00000006 c0b09568
efffc940 c0a5fe60 00000006
[ 2.883657] 9f60: c0a34840 c0b44000 c0b44000 000000d8 c0a34848
c0a00dbc 00000006 00000006
[ 2.891816] 9f80: 00000000 c0a005a0 00000000 c06de008 00000000
00000000 00000000 00000000
[ 2.899975] 9fa0: 00000000 c06de010 00000000 c0107978 00000000
00000000 00000000 00000000
[ 2.908134] 9fc0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
[ 2.916293] 9fe0: 00000000 00000000 00000000 00000000 00000013
00000000 ffffffff ffffffff
[ 2.924457] [<c06e20fc>] (down_write) from [<c02e9468>]
(debugfs_remove_recursive+0x30/0x150)
[ 2.932964] [<c02e9468>] (debugfs_remove_recursive) from
[<c03826a0>] (_regulator_put+0x24/0xac)
[ 2.941728] [<c03826a0>] (_regulator_put) from [<c0382744>]
(regulator_put+0x1c/0x2c)
[ 2.949540] [<c0382744>] (regulator_put) from [<c040692c>]
(release_nodes+0x16c/0x1dc)
[ 2.957440] [<c040692c>] (release_nodes) from [<c0403ab0>]
(driver_probe_device+0xec/0x2c0)
[ 2.965773] [<c0403ab0>] (driver_probe_device) from [<c0403d30>]
(__driver_attach+0xac/0xb0)
[ 2.974192] [<c0403d30>] (__driver_attach) from [<c0401f50>]
(bus_for_each_dev+0x68/0x9c)
[ 2.982351] [<c0401f50>] (bus_for_each_dev) from [<c04031cc>]
(bus_add_driver+0x1a0/0x218)
[ 2.990597] [<c04031cc>] (bus_add_driver) from [<c0404548>]
(driver_register+0x78/0xf8)
[ 2.998583] [<c0404548>] (driver_register) from [<c04f1e74>]
(i2c_register_driver+0x34/0x84)
[ 3.007003] [<c04f1e74>] (i2c_register_driver) from [<c01017d0>]
(do_one_initcall+0x40/0x170)
[ 3.015509] [<c01017d0>] (do_one_initcall) from [<c0a00dbc>]
(kernel_init_freeable+0x15c/0x1fc)
[ 3.024189] [<c0a00dbc>] (kernel_init_freeable) from [<c06de010>]
(kernel_init+0x8/0x114)
[ 3.032349] [<c06de010>] (kernel_init) from [<c0107978>]
(ret_from_fork+0x14/0x3c)
[ 3.039898] Code: e1a04000 f590f000 e3a03001 e34f3fff (e1902f9f)
[ 3.046011] ---[ end trace cdae3f0945a6102f ]---
[ 3.050611] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x0000000b
[ 3.050611]