Subject: Re: Issue with imx_get_temp()

From: Christoph Niedermaier <[email-masked]>
Date: Mon, 2 Dec 2019 16:06:49 +0000

Hi, 

From: linux-arm-kernel [mailto:[email-masked]] On Behalf Of Igor Plyatov
Sent: Monday, December 2, 2019 2:45 PM
>
> Dear all,
>
> please  look at back-trace below. It happens on Freescale i.MX6 Quad.
>
> Found a few of those during power on/off stress test in the climate chamber:
>
> [    0.657596] ------------[ cut here ]------------
> [    0.657626] WARNING: CPU: 3 PID: 150 at /home/geosig/development/oe-core-toradex-cr7/build/tmp-glibc/work-shared/cr7/kernel-source/kernel/irq/chip.c:242 __irq_startup+0x94/0xa8
> [    0.657630] Modules linked in:

Having the following issue on kernel 4.19.87 on a imx6ull SoC.
This sometimes happens during kernel boot, but when the system comes up, it works normally.

Unable to handle kernel NULL pointer dereference at virtual address 00000c00
pgd = (ptrval)
[00000c00] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.87-dhsom-g8bbbef713fb0 #2
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
Workqueue: events deferred_probe_work_func
PC is at 0xc00
LR is at _raw_spin_lock_irqsave+0x4c/0x58
pc : [<00000c00>]    lr : [<c0a7bc68>]    psr: 60000193
sp : c1643cc8  ip : c1643cc8  fp : c1643cf4
r10: 00000000  r9 : c1010548  r8 : c16f2010
r7 : c1705600  r6 : c0567518  r5 : 60000113  r4 : c1705600
r3 : c162b200  r2 : 00000000  r1 : 00000000  r0 : c1705600
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 8000406a  DAC: 00000051
Process kworker/0:0 (pid: 5, stack limit = 0x(ptrval))
Stack: (0xc1643cc8 to 0xc1644000)
3cc0:                   00000001 00000000 c0567518 40000113 c1643cfc c1705600
3ce0: 00000184 00000001 c1643d0c c1643cf8 c0567518 c0a7bc28 c1705600 00000184
3d00: c1643d2c c1643d10 c056a240 c0567510 c1c1af40 00000012 c16f2000 c1705600
3d20: c1643d7c c1643d30 c0726500 c056a218 00000000 00000000 00000000 7a7daaf8
3d40: c16f2010 c16f2010 00000080 7a7daaf8 c0564e7c 00000000 c16f2010 c10629d4
3d60: c15ccc1c c10629d4 00000001 00000000 c1643d9c c1643d80 c0551e5c c0726304
3d80: c15ccc18 c16f2010 00000000 c15ccc1c c1643dcc c1643da0 c054ff04 c0551df4
3da0: 00000000 c16f2010 c10629d4 c16f2010 c05503a0 00000001 00000001 c1010548
3dc0: c1643e04 c1643dd0 c0550148 c054fce4 c0795754 c0793a10 c1643e04 c1643de8
3de0: c10629d4 c1643e5c c16f2010 c05503a0 00000001 00000001 c1643e24 c1643e08
3e00: c0550430 c05500f0 00000000 c1643e5c c1010548 c05503a0 c1643e54 c1643e28
3e20: c054df24 c05503ac c1643e54 c15ebed4 c1bcd0d4 7a7daaf8 c16f2010 c16f2044
3e40: c1010548 cbdbc600 c1643e8c c1643e58 c054fc50 c054deb4 00000002 c16f2010
3e60: 00000001 7a7daaf8 00000000 c16f2010 c16f2010 c103f800 cbdbc600 c1643f04
3e80: c1643e9c c1643e90 c0550454 c054fb88 c1643ebc c1643ea0 c054eff0 c055044c
3ea0: c16f2010 c103f43c c103f488 cbdbc600 c1643edc c1643ec0 c054f4bc c054ef6c
3ec0: c15f8700 c103f494 cbdb92c0 cbdbc600 c1643f44 c1643ee0 c013bcac c054f464
3ee0: 00000001 00000000 c013bc3c 00000080 00000000 00000000 00000000 00000000
3f00: cbdb92c0 c103f494 c11cf940 00000000 c0dc23f0 7a7daaf8 c0a7bcbc cbdb92c0
3f20: c15f8714 00000008 cbdb92f4 c1005900 cbdb92c0 c15f8700 c1643f7c c1643f48
3f40: c013bf60 c013baf8 c15f8780 00000000 c1643f7c c15f8780 00000000 c1608ec0
3f60: c15f8700 c013bf34 c15f87b8 c161de48 c1643fac c1643f80 c014203c c013bf40
3f80: 00000000 c1608ec0 c0141f24 00000000 00000000 00000000 00000000 00000000
3fa0: 00000000 c1643fb0 c01010e8 c0141f30 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
Backtrace: 
[<c0a7bc1c>] (_raw_spin_lock_irqsave) from [<c0567518>] (regmap_lock_spinlock+0x14/0x1c)
 r6:00000001 r5:00000184 r4:c1705600
[<c0567504>] (regmap_lock_spinlock) from [<c056a240>] (regmap_write+0x34/0x64)
 r5:00000184 r4:c1705600
[<c056a20c>] (regmap_write) from [<c0726500>] (imx_thermal_probe+0x208/0x654)
 r7:c1705600 r6:c16f2000 r5:00000012 r4:c1c1af40
[<c07262f8>] (imx_thermal_probe) from [<c0551e5c>] (platform_drv_probe+0x74/0xac)
 r10:00000000 r9:00000001 r8:c10629d4 r7:c15ccc1c r6:c10629d4 r5:c16f2010
 r4:00000000
[<c0551de8>] (platform_drv_probe) from [<c054ff04>] (really_probe+0x22c/0x2d0)
 r7:c15ccc1c r6:00000000 r5:c16f2010 r4:c15ccc18
[<c054fcd8>] (really_probe) from [<c0550148>] (driver_probe_device+0x64/0x188)
 r10:c1010548 r9:00000001 r8:00000001 r7:c05503a0 r6:c16f2010 r5:c10629d4
 r4:c16f2010 r3:00000000
[<c05500e4>] (driver_probe_device) from [<c0550430>] (__device_attach_driver+0x90/0xa0)
 r9:00000001 r8:00000001 r7:c05503a0 r6:c16f2010 r5:c1643e5c r4:c10629d4
[<c05503a0>] (__device_attach_driver) from [<c054df24>] (bus_for_each_drv+0x7c/0xc4)
 r7:c05503a0 r6:c1010548 r5:c1643e5c r4:00000000
[<c054dea8>] (bus_for_each_drv) from [<c054fc50>] (__device_attach+0xd4/0x144)
 r7:cbdbc600 r6:c1010548 r5:c16f2044 r4:c16f2010
[<c054fb7c>] (__device_attach) from [<c0550454>] (device_initial_probe+0x14/0x18)
 r8:c1643f04 r7:cbdbc600 r6:c103f800 r5:c16f2010 r4:c16f2010
[<c0550440>] (device_initial_probe) from [<c054eff0>] (bus_probe_device+0x90/0x98)
[<c054ef60>] (bus_probe_device) from [<c054f4bc>] (deferred_probe_work_func+0x64/0x94)
 r7:cbdbc600 r6:c103f488 r5:c103f43c r4:c16f2010
[<c054f458>] (deferred_probe_work_func) from [<c013bcac>] (process_one_work+0x1c0/0x448)
 r7:cbdbc600 r6:cbdb92c0 r5:c103f494 r4:c15f8700
[<c013baec>] (process_one_work) from [<c013bf60>] (worker_thread+0x2c/0x520)
 r10:c15f8700 r9:cbdb92c0 r8:c1005900 r7:cbdb92f4 r6:00000008 r5:c15f8714
 r4:cbdb92c0
[<c013bf34>] (worker_thread) from [<c014203c>] (kthread+0x118/0x154)
 r10:c161de48 r9:c15f87b8 r8:c013bf34 r7:c15f8700 r6:c1608ec0 r5:00000000
 r4:c15f8780
[<c0141f24>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xc1643fb0 to 0xc1643ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0141f24
 r4:c1608ec0 r3:00000000
Code: bad PC value
---[ end trace 12a07887f3c97eb0 ]---

Could my issue and Igor Plyatov issue have the same cause or are the two different problems of the "imx_thermal" driver?

Thanks and best regards,
Christoph
_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel