stack exception when doing hciattach - bluetooth

I am trying to enable Bluetooth interface for CSR8811 chipset on a phytec board(imx6ul arm). Kernel is 4.8
I am getting an exception when doing:
# hciattach /dev/ttyACM0 bcsp
# hciattach /dev/ttyACM0 bcsp
[ 157.902406] INFO: rcu_sched self-detected stall on CPU
[ 157.907628] 0-...: (2600 ticks this GP) idle=21b/140000000000002/0 softirq=8480/8480 fqs=0
[ 157.916085] (t=2600 jiffies g=4247 c=4246 q=48)
[ 157.920841] rcu_sched kthread starved for 2600 jiffies! g4247 c4246 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x1
[ 157.930253] rcu_sched S c0905b98 0 7 2 0x00000000
[ 157.936673] Backtrace:
[ 157.939180] [<c090594c>] (__schedule) from [<c09060dc>] (schedule+0x48/0xa0)
[ 157.946247] r10:dffc84c0 r9:ffffffff r8:c0e02100 r7:00000000 r6:de48bea0 r5:dffc84c0
[ 157.954204] r4:de48a000
[ 157.956787] [<c0906094>] (schedule) from [<c090a998>] (schedule_timeout+0x218/0x318)
[ 157.964543] r5:dffc84c0 r4:ffffbe56
[ 157.968193] [<c090a780>] (schedule_timeout) from [<c018a31c>] (rcu_gp_kthread+0x4f0/0x840)
[ 157.976472] r10:c0e15680 r9:00000000 r8:00000001 r7:00000001 r6:c0e156d0 r5:c0e156f8
[ 157.984429] r4:c0e15440
[ 157.987013] [<c0189e2c>] (rcu_gp_kthread) from [<c0145ddc>] (kthread+0xdc/0xf8)
[ 157.994336] r7:c0189e2c
[ 157.996919] [<c0145d00>] (kthread) from [<c0107eb0>] (ret_from_fork+0x14/0x24)
[ 158.004155] r7:00000000 r6:00000000 r5:c0145d00 r4:de435040
[ 158.009977] Task dump for CPU 0:
[ 158.013230] hciattach R running 0 856 847 0x00000003
[ 158.019646] Backtrace:
[ 158.022146] [<c010c46c>] (dump_backtrace) from [<c010c664>] (show_stack+0x18/0x1c)
[ 158.029734] r7:00000240 r6:c0e6db57 r5:0000034f r4:ddfd4800
[ 158.035507] [<c010c64c>] (show_stack) from [<c015101c>] (sched_show_task+0x11c/0x22c)
[ 158.043368] [<c0150f00>] (sched_show_task) from [<c0153d14>] (dump_cpu_task+0x34/0x44)
[ 158.051298] r6:c0e15440 r5:00000000 r4:00000000
[ 158.056008] [<c0153ce0>] (dump_cpu_task) from [<c01cf058>] (rcu_dump_cpu_stacks+0xa4/0xc8)
[ 158.064286] r5:00000000 r4:c0e15440
[ 158.067930] [<c01cefb4>] (rcu_dump_cpu_stacks) from [<c018b258>] (rcu_check_callbacks+0x6f4/0x8b4)
[ 158.076902] r9:c0e15d44 r8:c0e02b18 r7:1f256000 r6:c0d76180 r5:dffcc180 r4:c0e15440
[ 158.084789] [<c018ab64>] (rcu_check_callbacks) from [<c018e5c8>] (update_process_times+0x38/0x64)
[ 158.093675] r10:c01a15c8 r9:dffc964c r8:dffc9640 r7:00000024 r6:c2fb3fd3 r5:00000000
[ 158.101630] r4:ddfd4800
[ 158.104214] [<c018e590>] (update_process_times) from [<c01a15c4>] (tick_sched_handle+0x50/0x54)
[ 158.112927] r5:dd8ff940 r4:dffc9908
[ 158.116570] [<c01a1574>] (tick_sched_handle) from [<c01a1628>] (tick_sched_timer+0x60/0xac)
[ 158.124951] [<c01a15c8>] (tick_sched_timer) from [<c018f5b4>] (__hrtimer_run_queues+0xc8/0x1e4)
[ 158.133662] r7:00000000 r6:c0e22828 r5:dffc9908 r4:dffc95c0
[ 158.139440] [<c018f4ec>] (__hrtimer_run_queues) from [<c018f8e4>] (hrtimer_interrupt+0xbc/0x210)
[ 158.148241] r10:dffc9678 r9:dffc9698 r8:dffc9600 r7:dffc96b8 r6:ffffffff r5:00000003
[ 158.156196] r4:dffc95c0
[ 158.158781] [<c018f828>] (hrtimer_interrupt) from [<c06b7c5c>] (mxc_timer_interrupt+0x3c/0x44)
[ 158.167408] r10:c0e6db92 r9:de41d000 r8:00000010 r7:dd8ff874 r6:00000000 r5:de41d000
[ 158.175365] r4:de402440
[ 158.177949] [<c06b7c20>] (mxc_timer_interrupt) from [<c017c4c0>] (__handle_irq_event_percpu+0x8c/0x124)
[ 158.187356] r5:de41d000 r4:de402500
[ 158.191001] [<c017c434>] (__handle_irq_event_percpu) from [<c017c57c>] (handle_irq_event_percpu+0x24/0x60)
[ 158.200668] r10:00000000 r9:de406000 r8:00000001 r7:dd8ffad0 r6:c0e10120 r5:de41d000
[ 158.208622] r4:de41d000
[ 158.211201] [<c017c558>] (handle_irq_event_percpu) from [<c017c5f8>] (handle_irq_event+0x40/0x64)
[ 158.220086] r5:de41d060 r4:de41d000
[ 158.223728] [<c017c5b8>] (handle_irq_event) from [<c017fd74>] (handle_fasteoi_irq+0xd4/0x1ac)
[ 158.232266] r7:dd8ffad0 r6:c0e10120 r5:de41d060 r4:de41d000
[ 158.238045] [<c017fca0>] (handle_fasteoi_irq) from [<c017b9cc>] (generic_handle_irq+0x28/0x3c)
[ 158.246671] r7:dd8ffad0 r6:c0e02b18 r5:00000010 r4:c0d73fa4
[ 158.252449] [<c017b9a4>] (generic_handle_irq) from [<c017bd24>] (__handle_domain_irq+0x6c/0xe8)
[ 158.261177] [<c017bcb8>] (__handle_domain_irq) from [<c01015f8>] (gic_handle_irq+0x58/0xb8)
[ 158.269542] r9:c0e02c7c r8:e0804000 r7:c0e22a40 r6:dd8ff940 r5:000003eb r4:e080400c
[ 158.277422] [<c01015a0>] (gic_handle_irq) from [<c010d2b0>] (__irq_svc+0x70/0x98)
[ 158.284921] Exception stack(0xdd8ff940 to 0xdd8ff988)
[ 158.290001] f940: 00000001 00000110 00000000 ddfd4800 dda57f00 60070113 00000000 dde98164
[ 158.298204] f960: dde98160 c0e02b18 c0e70b40 dd8ff9ac dd8ff938 dd8ff990 c016ec14 c05e1b00
[ 158.306397] f980: 60070113 ffffffff
[ 158.309899] r10:c0e70b40 r9:dd8fe000 r8:dde98160 r7:dd8ff974 r6:ffffffff r5:60070113
[ 158.317856] r4:c05e1b00
[ 158.320443] [<c05e1a20>] (__usb_hcd_giveback_urb) from [<c05e1bb0>] (usb_giveback_urb_bh+0x90/0xcc)
[ 158.329502] r7:dde98164 r6:dde98184 r5:00000000 r4:dd8ff9b0
[ 158.335278] [<c05e1b20>] (usb_giveback_urb_bh) from [<c0129b4c>] (tasklet_action+0x9c/0x154)
[ 158.343730] r8:00000000 r7:dd8fe000 r6:00000000 r5:dde98190 r4:dde9818c
[ 158.350568] [<c0129ab0>] (tasklet_action) from [<c0129d9c>] (__do_softirq+0x12c/0x298)
[ 158.358499] r10:40000006 r9:c0e02080 r8:00000100 r7:c0e02098 r6:dd8fe000 r5:00000006
[ 158.366454] r4:00000000
[ 158.369032] [<c0129c70>] (__do_softirq) from [<c012a280>] (irq_exit+0xc8/0x13c)
[ 158.376355] r10:00000000 r9:de406000 r8:00000001 r7:00000000 r6:c0e02b18 r5:00000000
[ 158.384310] r4:c0d73fa4
[ 158.386890] [<c012a1b8>] (irq_exit) from [<c017bd2c>] (__handle_domain_irq+0x74/0xe8)
[ 158.394747] [<c017bcb8>] (__handle_domain_irq) from [<c01015f8>] (gic_handle_irq+0x58/0xb8)
[ 158.403113] r9:c0e02c7c r8:e0804000 r7:c0e22a40 r6:dd8ffad0 r5:000003eb r4:e080400c
[ 158.410992] [<c01015a0>] (gic_handle_irq) from [<c010d2b0>] (__irq_svc+0x70/0x98)
[ 158.418491] Exception stack(0xdd8ffad0 to 0xdd8ffb18)
[ 158.423566] fac0: 00000001 00000110 00000000 ddfd4800
[ 158.431768] fae0: a0070013 dde9827c dde7d800 a0070013 00000081 dde98000 dde9827c dd8ffb34
[ 158.439967] fb00: dd8ffac8 dd8ffb20 c016ec14 c090b33c 20070013 ffffffff
[ 158.446594] r10:dde9827c r9:dd8fe000 r8:00000081 r7:dd8ffb04 r6:ffffffff r5:20070013
[ 158.454550] r4:c090b33c
[ 158.457135] [<c090b300>] (_raw_spin_unlock_irqrestore) from [<c05fdf00>] (ehci_urb_enqueue+0xe8/0xdbc)
[ 158.466457] r5:00000000 r4:dd8ffb68
[ 158.470104] [<c05fde18>] (ehci_urb_enqueue) from [<c05e3500>] (usb_hcd_submit_urb+0xb4/0x86c)
[ 158.478643] r10:ddfd9c00 r9:00000003 r8:024000c0 r7:00000000 r6:dde98000 r5:dde7d808
[ 158.486599] r4:dde7d800
[ 158.489180] [<c05e344c>] (usb_hcd_submit_urb) from [<c05e4c54>] (usb_submit_urb+0x2a8/0x4fc)
[ 158.497631] r10:ddfd9c00 r9:00000003 r8:00000204 r7:00000002 r6:dd803c00 r5:024000c0
[ 158.505587] r4:dde7d800
[ 158.508190] [<c05e49ac>] (usb_submit_urb) from [<bf00424c>] (acm_submit_read_urb+0x48/0x8c [cdc_acm])
[ 158.517426] r10:ddfd9c00 r9:00000102 r8:de788800 r7:de788b64 r6:de788800 r5:0000000f
[ 158.525382] r4:024000c0
[ 158.527982] [<bf004204>] (acm_submit_read_urb [cdc_acm]) from [<bf005a34>] (acm_port_activate+0x13c/0x1a4 [cdc_acm])
[ 158.538520] r7:0000000f r6:de788d38 r5:00000000 r4:de78880c
[ 158.544306] [<bf0058f8>] (acm_port_activate [cdc_acm]) from [<c048b944>] (tty_port_open+0x88/0xc8)
[ 158.553281] r9:00000102 r8:c1641b54 r7:de63e8c0 r6:de788930 r5:ddfd9c00 r4:de78880c
[ 158.561171] [<c048b8bc>] (tty_port_open) from [<bf005484>] (acm_tty_open+0x20/0x24 [cdc_acm])
[ 158.569710] r9:00000102 r8:c1641b54 r7:dda4c068 r6:0a600000 r5:de63e8c0 r4:ddfd9c00
[ 158.577608] [<bf005464>] (acm_tty_open [cdc_acm]) from [<c048418c>] (tty_open+0xbc/0x674)
[ 158.585816] [<c04840d0>] (tty_open) from [<c02226d8>] (chrdev_open+0xa4/0x180)
[ 158.593056] r10:dd8ffea8 r9:dd8ffe20 r8:00000000 r7:c0a3bf70 r6:de63e8c0 r5:dda4c068
[ 158.601011] r4:ddeae140
[ 158.603592] [<c0222634>] (chrdev_open) from [<c021b270>] (do_dentry_open+0x1ec/0x310)
[ 158.611436] r7:c0222634 r6:de63e8c8 r5:dda4c068 r4:de63e8c0
[ 158.617212] [<c021b084>] (do_dentry_open) from [<c021c448>] (vfs_open+0x54/0x84)
[ 158.624623] r9:dd8ffe20 r8:00000000 r7:00000102 r6:00000000 r5:de63e8c0 r4:dd8ffea8
[ 158.632511] [<c021c3f4>] (vfs_open) from [<c022c428>] (path_openat+0x384/0xfbc)
[ 158.639836] r6:00000000 r5:dd8fff5c r4:00000000
[ 158.644546] [<c022c0a4>] (path_openat) from [<c022e3e8>] (do_filp_open+0x68/0xcc)
[ 158.652042] r10:00000000 r9:dd8fe000 r8:c0107fc4 r7:00000001 r6:dd8fff5c r5:dd8ffea8
[ 158.659997] r4:00000003
[ 158.662579] [<c022e380>] (do_filp_open) from [<c021c7f0>] (do_sys_open+0x108/0x1c8)
[ 158.670249] r7:00000005 r6:dda86000 r5:ffffff9c r4:00000003
[ 158.676026] [<c021c6e8>] (do_sys_open) from [<c021c8d0>] (SyS_open+0x20/0x24)
[ 158.683176] r9:dd8fe000 r8:c0107fc4 r7:00000005 r6:bea62d84 r5:bea61c08 r4:00037390
[ 158.691063] [<c021c8b0>] (SyS_open) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
I have tried looking at the functions before the exception as they are listed in the stack trace and make small changes see where could be the problem. But was not successfully.
I have also compared the USB stack with the one in an earlier version: 4.6 but could not see what difference could lead to this crash.
does anybody have experience with this topic or could give some advice on hardware to proceed?
Thanks in advance

Related

What causes the kernel oops in the "make -j4" process

I am using an embedded board with 4 armv8 cores.(xilinx zynqmp)
I found that using make -j4 to compile software will appear kernel oops.
The stack of oops is almost the same,but the type of oops is different,i have seen three types:
undefined instrction
unable to handle kernel paging request
NULL pointer access
I don't understand why compile will cause kernel oops. Does the make/gcc program interact with the kernel? Please help analyze what causes this problem?
Thanks.
an oops messageļ¼š
[ 240.633378] Internal error: undefined instruction: 0 [#1] SMP
[ 240.633383] Unable to handle kernel paging request at virtual address ffffff8016df6480
[ 240.633386] Unable to handle kernel paging request at virtual address ffffff8016df6480
[ 240.633388] Unable to handle kernel paging request at virtual address ffffff8016df6480
[ 240.633394] Mem abort info:
[ 240.633395] Mem abort info:
[ 240.633396] Mem abort info:
[ 240.633398] Exception class = DABT (current EL), IL = 32 bits
[ 240.633399] Exception class = DABT (current EL), IL = 32 bits
[ 240.633401] Exception class = DABT (current EL), IL = 32 bits
[ 240.633402] SET = 0, FnV = 0
[ 240.633403] SET = 0, FnV = 0
[ 240.633405] SET = 0, FnV = 0
[ 240.633406] EA = 0, S1PTW = 0
[ 240.633407] EA = 0, S1PTW = 0
[ 240.633408] EA = 0, S1PTW = 0
[ 240.633409] Data abort info:
[ 240.633409] Data abort info:
[ 240.633410] Data abort info:
[ 240.633411] ISV = 0, ISS = 0x00000046
[ 240.633412] ISV = 0, ISS = 0x00000046
[ 240.633413] ISV = 0, ISS = 0x00000046
[ 240.633414] CM = 0, WnR = 1
[ 240.633415] CM = 0, WnR = 1
[ 240.633416] CM = 0, WnR = 1
[ 240.633419] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090b1000
[ 240.633421] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090b1000
[ 240.633424] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090b1000
[ 240.633425] [ffffff8016df6480] *pgd=000000097fffe003
[ 240.633427] [ffffff8016df6480] *pgd=000000097fffe003
[ 240.633429] [ffffff8016df6480] *pgd=000000097fffe003
[ 240.633430] , *pud=000000097fffe003
[ 240.633431] , *pud=000000097fffe003
[ 240.633432] , *pud=000000097fffe003
[ 240.633433] , *pmd=0000000000000000
[ 240.633434] , *pmd=0000000000000000
[ 240.633435] , *pmd=0000000000000000
[ 240.792167] Modules linked in:
[ 240.795207] CPU: 0 PID: 4831 Comm: cc1plus Not tainted 4.14.0 #10
[ 240.801280] Hardware name: xlnx,zynqmp (DT)
[ 240.805447] task: ffffffc973db2000 task.stack: ffffff800ef88000
[ 240.811355] PC is at calc_global_load+0x1e0/0x1e8
[ 240.816039] LR is at do_timer+0x1c/0x28
[ 240.819856] pc : [<ffffff80080c2d68>] lr : [<ffffff80080f37c4>] pstate: a00001c5
[ 240.827233] sp : ffffff8008003df0
[ 240.830531] x29: ffffff8008003df0 x28: ffffffc973db2000
[ 240.835826] x27: ffffffc97ff6dfc0 x26: ffffffc97ff6dfc0
[ 240.841121] x25: ffffffc97ff6dfd0 x24: 0000003803af96c6
[ 240.846416] x23: 0000000000000001 x22: ffffff8008eac000
[ 240.851711] x21: ffffff8008eac000 x20: 0000003803afa045
[ 240.857006] x19: ffffff8008df6000 x18: 0000000000000001
[ 240.862300] x17: 0000007fb5be73b0 x16: 00000000012aec58
[ 240.867595] x15: 0000000000400000 x14: 0000000000007fff
[ 240.872890] x13: 00000000012c9000 x12: 0000007fb0b2e758
[ 240.878185] x11: ffffff8008df6000 x10: 0000000000000040
[ 240.883480] x9 : ffffff8008e0c8e8 x8 : ffffff8008e96000
[ 240.888775] x7 : ffffffc977800268 x6 : 00000000ffffca7b
[ 240.894069] x5 : 00ffffffffffffff x4 : 000000497718f000
[ 240.899364] x3 : 0000003803af7900 x2 : ffffff8008df6000
[ 240.904659] x1 : fffffffffffffb7f x0 : ffffff8008e96ab8
[ 240.909955] Process cc1plus (pid: 4831, stack limit = 0xffffff800ef88000)
[ 240.916724] Call trace:
[ 240.919157] Exception stack(0xffffff8008003cb0 to 0xffffff8008003df0)
[ 240.925580] 3ca0: ffffff8008e96ab8 fffffffffffffb7f
[ 240.933393] 3cc0: ffffff8008df6000 0000003803af7900 000000497718f000 00ffffffffffffff
[ 240.941205] 3ce0: 00000000ffffca7b ffffffc977800268 ffffff8008e96000 ffffff8008e0c8e8
[ 240.949017] 3d00: 0000000000000040 ffffff8008df6000 0000007fb0b2e758 00000000012c9000
[ 240.956829] 3d20: 0000000000007fff 0000000000400000 00000000012aec58 0000007fb5be73b0
[ 240.964641] 3d40: 0000000000000001 ffffff8008df6000 0000003803afa045 ffffff8008eac000
[ 240.972453] 3d60: ffffff8008eac000 0000000000000001 0000003803af96c6 ffffffc97ff6dfd0
[ 240.980265] 3d80: ffffffc97ff6dfc0 ffffffc97ff6dfc0 ffffffc973db2000 ffffff8008003df0
[ 240.988077] 3da0: ffffff80080f37c4 ffffff8008003df0 ffffff80080c2d68 00000000a00001c5
[ 240.995889] 3dc0: 0000000000000040 ffffffc976f6cd20 0000008000000000 ffffff8008003ec0
[ 241.003700] 3de0: ffffff8008003df0 ffffff80080c2d68
[ 241.008563] [<ffffff80080c2d68>] calc_global_load+0x1e0/0x1e8
[ 241.014293] [<ffffff80081000b4>] tick_do_update_jiffies64.part.2+0x6c/0x118
[ 241.021236] [<ffffff80081001bc>] tick_sched_do_timer+0x5c/0x68
[ 241.027051] [<ffffff8008100248>] tick_sched_timer+0x30/0x90
[ 241.032607] [<ffffff80080f0b3c>] __hrtimer_run_queues+0xec/0x168
[ 241.038595] [<ffffff80080f0db0>] hrtimer_interrupt+0xa0/0x220
[ 241.044327] [<ffffff80087af788>] arch_timer_handler_phys+0x28/0x48
[ 241.050489] [<ffffff80080e0798>] handle_percpu_devid_irq+0x80/0x138
[ 241.056737] [<ffffff80080dafbc>] generic_handle_irq+0x24/0x38
[ 241.062465] [<ffffff80080db66c>] __handle_domain_irq+0x5c/0xb8
[ 241.068281] [<ffffff8008081500>] gic_handle_irq+0x68/0xc0
[ 241.073661] Exception stack(0xffffff800ef8bec0 to 0xffffff800ef8c000)
[ 241.080086] bec0: 00000000000036cf 0000000000000015 0000000000000001 0000000003c71808
[ 241.087898] bee0: 0000000003c717f8 0000000000008000 000000000393b8c8 0000000000008000
[ 241.095710] bf00: 000000000000006d 0000000000007fff ffffffffffffc000 0000000000000000
[ 241.103522] bf20: 0000007fb0b2e758 00000000012c9000 0000000000007fff 0000000000400000
[ 241.111334] bf40: 00000000012aec58 0000007fb5be73b0 0000000000000001 0000000000000001
[ 241.119146] bf60: 00000000000036ce 00000000039f0820 0000000000000000 0000000003b99de8
[ 241.126958] bf80: 0000000000000003 0000000003b9a268 00000000000036ce 00000000012d4000
[ 241.134770] bfa0: 0000000000000042 0000007fc21c9290 0000000000798440 0000007fc21c9290
[ 241.142582] bfc0: 00000000007983ac 0000000060000000 0000000003c95000 00000000ffffffff
[ 241.150394] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 241.158207] [<ffffff8008083614>] el0_irq_naked+0x44/0x4c
[ 241.163503] Code: d27a0003 d2800005 1707ffb4 d503201f (d67c03c0)
[ 241.169578] ---[ end trace 8c598a94062fb1cc ]---
[ 241.174178] Kernel panic - not syncing: Fatal exception in interrupt
[ 241.180514] SMP: stopping secondary CPUs
[ 242.251098] SMP: failed to stop secondary CPUs 0-3
[ 242.255793] Kernel Offset: disabled
[ 242.259266] CPU features: 0x002004
[ 242.262650] Memory Limit: none
[ 242.265690] ---[ end Kernel panic - not syncing: Fatal exception in interrupt

How to analyze and debug a Linux kernel panic which occurs while running an application?

I'm getting kernel panics while running linux application on my custom hardware design. But another custom hardware which is similar to this can run this linux application without any problem. I did the memory calibration and stress app test for this board. But there was not any issue related to memory. So how can I debug this to clarify whether this is hardware or software problem. I could debug kernel and uboot using JTAG properly. But how can I pinpoint the issue for this kernel panic while running certain application ?
Here is the panic message (LOG)
[ 308.268356] Unable to handle kernel paging request at virtual address
54494156
[ 308.275647] pgd = 80004000
[ 308.278365] [54494156] *pgd=00000000
[ 308.281977] Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
[ 308.287904] Modules linked in: tw6869 mxc_v4l2_capture ipu_bg_overlay_sdc
ipu_still ipu_prp_enc videobuf2_dma_contig ipu_csi_enc videobuf2_memops
adv7610_video ipu_fg_overlay_sdc v4l2_int_device galcore(O)
[ 308.306375] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G O 4.1.15-2.0.0-
ga+yocto+gff4e28b #1
[ 308.309584] tw6869 0000:01:00.0: tw6869_querystd: vch1: unknown std
detected
[ 308.322648] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.329184] task: ce11bc00 ti: ce14c000 task.ti: ce14c000
[ 308.334598] PC is at 0x54494156
[ 308.337766] LR is at cpuidle_enter_state+0x90/0x350
[ 308.342650] pc : [<54494156>] lr : [<806d59b0>] psr: 800b00b3
[ 308.342650] sp : ce14df30 ip : 00000017 fp : ce14df8c
[ 308.354132] r10: 80e02508 r9 : 80e08ad0 r8 : 80d9b880
[ 308.359361] r7 : 00000001 r6 : 80e88160 r5 : 00000047 r4 : c04b271c
[ 308.365892] r3 : 54494157 r2 : 00000000 r1 : 80e08a80 r0 : 80d9b880
[ 308.372430] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment
kernel
[ 308.380004] Control: 10c5387d Table: 5f38404a DAC: 00000015
[ 308.385755] Process swapper/3 (pid: 0, stack limit = 0xce14c210)
[ 308.391768] Stack: (0xce14df30 to 0xce14e000)
[ 308.396135] df20: 00000000 d0f2c140 c04b271c 00000047
[ 308.404333] df40: 00000000 00000000 004832f1 00000000 c04b271c 00000047
00000000 dc8ba30f
[ 308.412537] df60: 80d97320 ce14c000 80e025e8 80e88160 d0f2bed0 80e08a74
80a02970 ce14dfa0
[ 308.420738] df80: ce14df9c ce14df90 806d5cc0 806d592c ce14dfdc ce14dfa0
80171a74 806d5ca8
[ 308.428939] dfa0: 80d9b880 80d9b880 00000000 80e02e00 80e025f0 80e878ea
00000001 80c09164
[ 308.437140] dfc0: 80d9aec8 80d97300 10c0387d 80e8d35c ce14dff4 ce14dfe0
8010fae0 801717d8
[ 308.445340] dfe0: 5e12c06a 00000015 00000000 ce14dff8 1010162c 8010f994
00000000 00000000
[ 308.453529] Backtrace:
[ 308.456036] [<806d5920>] (cpuidle_enter_state) from [<806d5cc0>]
(cpuidle_enter+0x24/0x28)
[ 308.464320] r10:ce14dfa0 r9:80a02970 r8:80e08a74 r7:d0f2bed0 r6:80e88160
r5:80e025e8
[ 308.472277] r4:ce14c000
[ 308.474868] [<806d5c9c>] (cpuidle_enter) from [<80171a74>]
(cpu_startup_entry+0x2a8/0x43c)
[ 308.483171] [<801717cc>] (cpu_startup_entry) from [<8010fae0>]
(secondary_start_kernel+0x158/0x164)
[ 308.492232] r7:80e8d35c
[ 308.494813] [<8010f988>] (secondary_start_kernel) from [<1010162c>]
(0x1010162c)
[ 308.502223] r5:00000015 r4:5e12c06a
[ 308.505862] Code: bad PC value
[ 308.508940] ---[ end trace 1d6a0d2b2019793f ]---
[ 308.513579] Kernel panic - not syncing: Attempted to kill the idle task!
[ 308.520313] CPU1: stopping
[ 308.523060] CPU: 1 PID: 37 Comm: cfinteractive Tainted: G D O 4.1.15-
2.0.0-ga+yocto+gff4e28b #1
[ 308.532731] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.539274] Backtrace:
[ 308.541792] [<8010c358>] (dump_backtrace) from [<8010c5d4>]
(show_stack+0x20/0x24)
[ 308.549379] r7:80e87b48 r6:80e45ca0 r5:00000000 r4:80e45ca0
[ 308.555168] [<8010c5b4>] (show_stack) from [<80919780>]
(dump_stack+0x7c/0xbc)
[ 308.562421] [<80919704>] (dump_stack) from [<80110038>]
(handle_IPI+0x2e4/0x2f8)
[ 308.569831] r7:80e87b48 r6:00000005 r5:80d99c34 r4:80d99c34
[ 308.575608] [<8010fd54>] (handle_IPI) from [<80101594>]
(gic_handle_irq+0x68/0x6c)
[ 308.583192] r10:00000002 r9:ce020000 r8:00000001 r7:f4a00100 r6:ce321b28
r5:80e02f7c
[ 308.591152] r4:f4a0010c r3:ce321b28
[ 308.594795] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 308.602295] Exception stack(0xce321b28 to 0xce321b70)
[ 308.607371] 1b20: 00000001 80bbbbd4 80e8f9c0 00000000 ffffe000 80e8f9c0
[ 308.615572] 1b40: 00000010 00000000 00000001 ce020000 00000002 ce321bd4
ce321b60 ce321b70
[ 308.623769] 1b60: 80493dc0 80137668 200f0113 ffffffff
[ 308.628833] r7:ce321b5c r6:ffffffff r5:200f0113 r4:80137668
[ 308.634617] [<801375b4>] (__do_softirq) from [<80137c20>]
(irq_exit+0xd0/0x10c)
[ 308.641940] r10:ce321c40 r9:ce020000 r8:00000001 r7:00000000 r6:00000010
r5:00000000
[ 308.649901] r4:80d99c34
[ 308.652491] [<80137b50>] (irq_exit) from [<8017beb4>]
(__handle_domain_irq+0x90/0xfc)
[ 308.660335] r5:00000000 r4:80d99c34
[ 308.663984] [<8017be24>] (__handle_domain_irq) from [<80101560>]
(gic_handle_irq+0x34/0x6c)
[ 308.672348] r10:00000004 r9:ce321d90 r8:00000001 r7:f4a00100 r6:ce321c40
r5:80e02f7c
[ 308.680311] r4:f4a0010c r3:ce321c40
[ 308.683954] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 308.691453] Exception stack(0xce321c40 to 0xce321c88)
[ 308.696528] 1c40: 00000003 d0f2f89c 00000003 00000003 80e02650 d0f13180
80e02e00 d0f13184
[ 308.704729] 1c60: 00000001 ce321d90 00000004 ce321cbc 00000003 ce321c88
801a739c 801a73cc
[ 308.712923] 1c80: 200f0013 ffffffff
[ 308.716425] r7:ce321c74 r6:ffffffff r5:200f0013 r4:801a73cc
[ 308.722208] [<801a715c>] (smp_call_function_many) from [<801a7468>]
(smp_call_function+0x48/0x88)
[ 308.731093] r10:ffffffff r9:ce321d88 r8:00000000 r7:00000000 r6:00000001
r5:ce321d90
[ 308.739054] r4:80110990
[ 308.741634] [<801a7420>] (smp_call_function) from [<801a74e0>]
(on_each_cpu+0x38/0x90)
[ 308.749564] r7:00000000 r6:00000001 r5:ce321d90 r4:80110990
[ 308.755342] [<801a74a8>] (on_each_cpu) from [<80110d2c>]
(twd_rate_change+0x38/0x40)
[ 308.763099] r7:00000000 r6:00000002 r5:ce321d88 r4:ffffffff
[ 308.768890] [<80110cf4>] (twd_rate_change) from [<801523c4>]
(notifier_call_chain+0x54/0x94)
[ 308.777357] [<80152370>] (notifier_call_chain) from [<80152894>]
(__srcu_notifier_call_chain+0x54/0x70)
[ 308.786763] r9:ce321d88 r8:00000002 r7:00000000 r6:00000000 r5:ce0a6184
r4:ce0a619c
[ 308.794650] [<80152840>] (__srcu_notifier_call_chain) from [<801528d8>]
(srcu_notifier_call_chain+0x28/0x30)
[ 308.804491] r10:00000000 r9:80e8a384 r8:00000002 r7:80e02508 r6:ce026000
r5:80e73b44
[ 308.812451] r4:ce0a6180
[ 308.815042] [<801528b0>] (srcu_notifier_call_chain) from [<80746114>]
(__clk_notify+0xa0/0xa8)
[ 308.823683] [<80746074>] (__clk_notify) from [<807461c4>]
(__clk_recalc_rates+0xa8/0xac)
[ 308.831786] r8:ce003f80 r7:00000001 r6:1daee080 r5:00000002 r4:ce026000
[ 308.838630] [<8074611c>] (__clk_recalc_rates) from [<80746198>]
(__clk_recalc_rates+0x7c/0xac)
[ 308.847254] r7:00000001 r6:3b5dc100 r5:00000002 r4:ce026000
[ 308.853030] [<8074611c>] (__clk_recalc_rates) from [<80746198>]
(__clk_recalc_rates+0x7c/0xac)
[ 308.861654] r7:00000001 r6:3b5dc100 r5:00000002 r4:ce026a80
[ 308.867438] [<8074611c>] (__clk_recalc_rates) from [<80748b50>]
(clk_core_set_parent+0x1bc/0x2dc)
[ 308.876324] r7:00000001 r6:00000000 r5:ce026380 r4:ce026400
[ 308.882102] [<80748994>] (clk_core_set_parent) from [<80748c9c>]
(clk_set_parent+0x2c/0x30)
[ 308.890467] r9:00000000 r8:179a7b00 r7:80e02508 r6:000f32a0 r5:00060ae0
r4:80eec6ac
[ 308.898357] [<80748c70>] (clk_set_parent) from [<806d4220>]
(imx6q_set_target+0x490/0x544)
[ 308.906653] [<806d3d90>] (imx6q_set_target) from [<806ca034>]
(__cpufreq_driver_target+0x184/0x2b0)
[ 308.915712] r10:00000000 r9:00000000 r8:80eec5e4 r7:00000000 r6:80e02508
r5:ce66b500
[ 308.923671] r4:00000000
[ 308.926253] [<806c9eb0>] (__cpufreq_driver_target) from [<806d2d44>]
(cpufreq_interactive_speedchange_task+0x264/0x354)
[ 308.937048] r10:80d9ae10 r9:80e02650 r8:80e02e00 r7:00000000 r6:000f32a0
r5:80d9ae10
[ 308.945007] r4:d0f1ee10
[ 308.947591] [<806d2ae0>] (cpufreq_interactive_speedchange_task) from
[<801514e4>] (kthread+0xfc/0x114)
[ 308.956911] r10:00000000 r9:00000000 r8:00000000 r7:806d2ae0 r6:00000000
r5:ce303480
[ 308.964870] r4:00000000
[ 308.967456] [<801513e8>] (kthread) from [<80108028>]
(ret_from_fork+0x14/0x2c)
[ 308.974692] r7:00000000 r6:00000000 r5:801513e8 r4:ce303480
[ 308.980460] CPU0: stopping
[ 308.983202] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D O 4.1.15-2.0.0-
ga+yocto+gff4e28b #1
[ 308.992439] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.998981] Backtrace:
[ 309.001488] [<8010c358>] (dump_backtrace) from [<8010c5d4>]
(show_stack+0x20/0x24)
[ 309.009073] r7:80e87b48 r6:80e45ca0 r5:00000000 r4:80e45ca0
[ 309.014859] [<8010c5b4>] (show_stack) from [<80919780>]
(dump_stack+0x7c/0xbc)
[ 309.022112] [<80919704>] (dump_stack) from [<80110038>]
(handle_IPI+0x2e4/0x2f8)
[ 309.029522] r7:80e87b48 r6:00000005 r5:80d99c34 r4:80d99c34
[ 309.035298] [<8010fd54>] (handle_IPI) from [<80101594>]
(gic_handle_irq+0x68/0x6c)
[ 309.042881] r10:80e02508 r9:80e08b14 r8:d0f04ed0 r7:f4a00100 r6:80e01e98
r5:80e02f7c
[ 309.050843] r4:f4a0010c r3:80e01e98
[ 309.054488] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 309.061987] Exception stack(0x80e01e98 to 0x80e01ee0)
[ 309.067058] 1e80: 00000000 d0f084c0
[ 309.075261] 1ea0: dc8ba30f dc8ba30f cef8dbc4 00000047 80e88160 00000004
d0f04ed0 80e08b14
[ 309.083462] 1ec0: 80e02508 80e01f3c 80e01e80 80e01ee0 8091f2bc 806d59e0
600f0013 ffffffff
[ 309.091652] r7:80e01ecc r6:ffffffff r5:600f0013 r4:806d59e0
[ 309.097430] [<806d5920>] (cpuidle_enter_state) from [<806d5cc0>]
(cpuidle_enter+0x24/0x28)
[ 309.105708] r10:80e01f50 r9:80a02970 r8:80e08a74 r7:d0f04ed0 r6:80e88160
r5:80e025e8
[ 309.113667] r4:80e00000
[ 309.116248] [<806d5c9c>] (cpuidle_enter) from [<80171a74>]
(cpu_startup_entry+0x2a8/0x43c)
[ 309.124540] [<801717cc>] (cpu_startup_entry) from [<80917448>]
(rest_init+0x98/0x9c)
[ 309.132297] r7:80e02500
[ 309.134893] [<809173b0>] (rest_init) from [<80d00d9c>]
(start_kernel+0x404/0x424)
[ 309.142390] r5:80e8d000 r4:80e8d04c
[ 309.146037] [<80d00998>] (start_kernel) from [<1000807c>] (0x1000807c)
[ 309.152583] CPU2: stopping
[ 309.155327] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D O 4.1.15-2.0.0-
ga+yocto+gff4e28b #1
[ 309.164565] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 309.171106] Backtrace:
[ 309.173611] [<8010c358>] (dump_backtrace) from [<8010c5d4>]
(show_stack+0x20/0x24)
[ 309.181196] r7:80e87b48 r6:80e45ca0 r5:00000000 r4:80e45ca0
[ 309.186977] [<8010c5b4>] (show_stack) from [<80919780>]
(dump_stack+0x7c/0xbc)
[ 309.194230] [<80919704>] (dump_stack) from [<80110038>]
(handle_IPI+0x2e4/0x2f8)
[ 309.201639] r7:80e87b48 r6:00000005 r5:80d99c34 r4:80d99c34
[ 309.207417] [<8010fd54>] (handle_IPI) from [<80101594>]
(gic_handle_irq+0x68/0x6c)
[ 309.215001] r10:80e02508 r9:80e08b14 r8:d0f1eed0 r7:f4a00100 r6:ce14bee8
r5:80e02f7c
[ 309.222960] r4:f4a0010c r3:ce14bee8
[ 309.226604] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 309.234103] Exception stack(0xce14bee8 to 0xce14bf30)
[ 309.239179] bee0: 00000000 d0f224c0 dc8ba30f dc8ba30f ce933307 00000047
[ 309.247383] bf00: 80e88160 00000004 d0f1eed0 80e08b14 80e02508 ce14bf8c
ce14bed0 ce14bf30
[ 309.255578] bf20: 8091f2bc 806d59e0 600f0013 ffffffff
[ 309.260643] r7:ce14bf1c r6:ffffffff r5:600f0013 r4:806d59e0
[ 309.266420] [<806d5920>] (cpuidle_enter_state) from [<806d5cc0>]
(cpuidle_enter+0x24/0x28)
[ 309.274698] r10:ce14bfa0 r9:80a02970 r8:80e08a74 r7:d0f1eed0 r6:80e88160
r5:80e025e8
[ 309.282656] r4:ce14a000
[ 309.285237] [<806d5c9c>] (cpuidle_enter) from [<80171a74>]
(cpu_startup_entry+0x2a8/0x43c)
[ 309.293528] [<801717cc>] (cpu_startup_entry) from [<8010fae0>]
(secondary_start_kernel+0x158/0x164)
[ 309.302587] r7:80e8d35c
[ 309.305168] [<8010f988>] (secondary_start_kernel) from [<1010162c>]
(0x1010162c)
[ 309.312579] r5:00000015 r4:5e12c06a
[ 309.316221] ---[ end Kernel panic - not syncing: Attempted to kill the
idle task!
I must be thankful to you if you can guide me on this issue. Are there any methods for hardware debugging to pinpoint the issues related to this while running applications on linux ?
Regards,
Kulunu.

What happens if an ISR hangs in Linux?

If an ISR hangs for some reason, e.g. waiting for a spinlock, or a never ending loop, how does Linux recover from this ?
If we are stuck in ISR by some reason then it would be difficult to take out system from this state. You would get kernel stack traces after equal interval of time, however it would be not possible to say that system would recover from this state ever. We may need to restart even in worst case.
The kernel trace would be similar to this one:
[ 1872.084006] CPU: 0 PID: 5585 Comm: insmod Tainted: G OEL 4.4.0-78-generic #99~14.04.2-Ubuntu
[ 1872.084006] Hardware name: LENOVO 2847DJU/2847DJU, BIOS 6JET85WW (1.43 ) 12/24/2010
[ 1872.084006] task: ffff880117d94e00 ti: ffff88004a654000 task.ti: ffff88004a654000
[ 1872.084006] RIP: 0010:[<ffffffffc0008019>] [<ffffffffc0008019>] sample_init+0x19/0x1000 [sample]
[ 1872.084006] RSP: 0018:ffff88004a657cc0 EFLAGS: 00000292
[ 1872.084006] RAX: 0000000000000020 RBX: ffffffff81e13080 RCX: 0000000000000006
[ 1872.084006] RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff88013fc0dd90
[ 1872.084006] RBP: ffff88004a657cc0 R08: 000000000000000a R09: 0000000000000000
[ 1872.084006] R10: 0000000000000000 R11: 000000000000047c R12: ffff88003a50ffe0
[ 1872.084006] R13: 0000000000000000 R14: ffffffffc0008000 R15: ffff88004a657eb0
[ 1872.084006] FS: 00007f53c147b740(0000) GS:ffff88013fc00000(0000) knlGS:0000000000000000
[ 1872.084006] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1872.084006] CR2: ffffffffc0007fee CR3: 000000004a530000 CR4: 00000000000406f0
[ 1872.084006] Stack:
[ 1872.084006] ffff88004a657d38 ffffffff8100213d ffff88004a657eb0 ffff88004a657d10
[ 1872.084006] 0000000000000246 0000000000000002 ffffffff811deafd ffff88013b401c00
[ 1872.084006] ffffffff81183ca4 0000000000000018 00000000f91cc401 ffffffffc06f3000
[ 1872.084006] Call Trace:
[ 1872.084006] [<ffffffff8100213d>] do_one_initcall+0xcd/0x1f0
[ 1872.084006] [<ffffffff811deafd>] ? kmem_cache_alloc_trace+0x1ad/0x220
[ 1872.084006] [<ffffffff81183ca4>] ? do_init_module+0x27/0x1d2
[ 1872.084006] [<ffffffff81183cdd>] do_init_module+0x60/0x1d2
[ 1872.084006] [<ffffffff81104134>] load_module+0x1424/0x1b10
[ 1872.084006] [<ffffffff81100920>] ? __symbol_put+0x40/0x40
[ 1872.084006] [<ffffffff81206be1>] ? kernel_read+0x41/0x60
[ 1872.084006] [<ffffffff811049ee>] SYSC_finit_module+0x7e/0xa0
[ 1872.084006] [<ffffffff81104a2e>] SyS_finit_module+0xe/0x10
[ 1872.084006] [<ffffffff8180b776>] entry_SYSCALL_64_fastpath+0x16/0x75
[ 1872.084006] Code: <eb> fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 1884.688004] INFO: rcu_sched self-detected stall on CPU
[ 1884.688004] 0-...: (105006 ticks this GP) idle=41d/140000000000001/0 softirq=64742/64742 fqs=104241
[ 1884.688004] (t=105006 jiffies g=35345 c=35344 q=27697)
[ 1884.688004] Task dump for CPU 0:
[ 1884.688004] insmod R running task 0 5585 1990 0x0000000c
[ 1884.688004] ffffffff81e55040 ffff88013fc03db8 ffffffff810ab14f 0000000000000000
[ 1884.688004] ffffffff81e55040 ffff88013fc03dd0 ffffffff810ad8b9 0000000000000001
[ 1884.688004] ffff88013fc03e00 ffffffff810dff6a ffff88013fc17b80 ffffffff81e55040
[ 1884.688004] Call Trace:
[ 1884.688004] <IRQ> [<ffffffff810ab14f>] sched_show_task+0xaf/0x110
[ 1884.688004] [<ffffffff810ad8b9>] dump_cpu_task+0x39/0x40
[ 1884.688004] [<ffffffff810dff6a>] rcu_dump_cpu_stacks+0x8a/0xc0
[ 1884.688004] [<ffffffff810e3a93>] rcu_check_callbacks+0x4b3/0x7a0
[ 1884.688004] [<ffffffff810ae361>] ? account_system_time+0x81/0x110
[ 1884.688004] [<ffffffff810ae600>] ? account_process_tick+0x60/0x170
[ 1884.688004] [<ffffffff810f9200>] ? tick_sched_do_timer+0x30/0x30
[ 1884.688004] [<ffffffff810e9b79>] update_process_times+0x39/0x60
[ 1884.688004] [<ffffffff810f8c05>] tick_sched_handle.isra.15+0x25/0x60
[ 1884.688004] [<ffffffff810f923d>] tick_sched_timer+0x3d/0x70
[ 1884.688004] [<ffffffff810ea6d3>] __hrtimer_run_queues+0xf3/0x260
[ 1884.688004] [<ffffffff810eab78>] hrtimer_interrupt+0xa8/0x1a0
[ 1884.688004] [<ffffffffc0008000>] ? 0xffffffffc0008000
[ 1884.688004] [<ffffffff81050ec5>] local_apic_timer_interrupt+0x35/0x60
[ 1884.688004] [<ffffffff8180e21d>] smp_apic_timer_interrupt+0x3d/0x50
[ 1884.688004] [<ffffffff8180c4e2>] apic_timer_interrupt+0x82/0x90
[ 1884.688004] <EOI> [<ffffffffc0008000>] ? 0xffffffffc0008000
[ 1884.688004] [<ffffffffc0008019>] ? sample_init+0x19/0x1000 [sample]
[ 1884.688004] [<ffffffff8100213d>] do_one_initcall+0xcd/0x1f0
[ 1884.688004] [<ffffffff811deafd>] ? kmem_cache_alloc_trace+0x1ad/0x220
[ 1884.688004] [<ffffffff81183ca4>] ? do_init_module+0x27/0x1d2
[ 1884.688004] [<ffffffff81183cdd>] do_init_module+0x60/0x1d2
[ 1884.688004] [<ffffffff81104134>] load_module+0x1424/0x1b10
[ 1884.688004] [<ffffffff81100920>] ? __symbol_put+0x40/0x40
[ 1884.688004] [<ffffffff81206be1>] ? kernel_read+0x41/0x60
[ 1884.688004] [<ffffffff811049ee>] SYSC_finit_module+0x7e/0xa0
[ 1884.688004] [<ffffffff81104a2e>] SyS_finit_module+0xe/0x10
[ 1884.688004] [<ffffffff8180b776>] entry_SYSCALL_64_fastpath+0x16/0x75

integrating mpu9250 with imx6 board

I am trying to use mpu9250 3 axis accelerometer with imx6 board. I have taken invensense mpu 9265 device driver for Android from here, and successfully compiled the driver with Linux 3.18 kernel as a module (inv_mpu_iio). I have even changed dts file based on my requirement.
I have little knowledge about device trees but after searching I have done following changes to the dts file.
Edited dts file code snippet:
&i2c3 {
extaccelerometer: mpu9265#68{
compatible = "mpu9250";
reg = <0x68>;
interrupt-parent = <&gpio2>;
interrupts = <9>;
};
}
While booting the kernel on to the board I am stuck with the following error:
[ 10.730459] industrialio: module is from the staging directory, the quality is unknown, you have been warned.
[ 10.805020] random: nonblocking pool is initialized
[ 10.819012] kfifo_buf: module is from the staging directory, the quality is unknown, you have been warned.
[....] Waiting for /dev to be fully populated...[ 10.910701] inv_mpu_iio: module is from the staging directory, the quality is unknown, you have been.
[ 10.973279] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 10.981478] pgd = bdeac000
[ 10.984286] [00000000] *pgd=00000000
[ 10.987969] Internal error: Oops: 5 [#1] SMP ARM
[ 10.992628] Modules linked in: inv_mpu_iio(C+) kfifo_buf(C) industrialio(C) sky2
[ 11.000167] CPU: 3 PID: 333 Comm: modprobe Tainted: G C 3.18.0i2c-test+ #1
[ 11.008117] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 11.014695] task: bdfc0000 ti: bdd16000 task.ti: bdd16000
[ 11.020179] PC is at inv_mpu_probe+0x70/0xb6c [inv_mpu_iio]
[ 11.025769] LR is at 0x0
[ 11.028318] pc : [<7f029110>] lr : [<00000000>] psr: a0000013
[ 11.028318] sp : bdd17c98 ip : bdc5b484 fp : bdd17cdc
[ 11.039806] r10: 00000000 r9 : 00000004 r8 : 7f02fa34
[ 11.045064] r7 : bdc5b400 r6 : 00000001 r5 : befd7800 r4 : bdc5b000
[ 11.051643] r3 : 00000068 r2 : 00000000 r1 : 0000002f r0 : bdc5b000
[ 11.058250] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 11.065427] Control: 10c5387d Table: 4deac04a DAC: 00000015
[ 11.071241] Process modprobe (pid: 333, stack limit = 0xbdd16238)
[ 11.077417] Stack: (0xbdd17c98 to 0xbdd18000)
[ 11.081848] 7c80: bdd17ccc bdd17ca8
[ 11.090093] 7ca0: 801b0764 801acc5c befd7820 8041d804 befd7820 befd7820 00000000 7f031798
[ 11.098316] 7cc0: befd7800 7f031798 00000004 00000000 bdd17cfc bdd17ce0 8054ad94 7f0290ac
[ 11.106568] 7ce0: 81589ca8 befd7820 80cf1758 00000000 bdd17d34 bdd17d00 8040e504 8054acb4
[ 11.114854] 7d00: 8054ac94 80349964 7f031798 befd7820 7f031798 befd7854 00000000 7f037000
[ 11.123142] 7d20: 8152cc60 00000000 bdd17d54 bdd17d38 8040e7f4 8040e3cc bef307e4 00000000
[ 11.131438] 7d40: 7f031798 8040e750 bdd17d7c bdd17d58 8040c6fc 8040e75c bee18ac0 bef307d8
[ 11.139705] 7d60: be7535e0 7f031798 bdd2b480 80ccc070 bdd17d8c bdd17d80 8040de9c 8040c6a4
[ 11.147932] 7d80: bdd17db4 bdd17d90 8040da60 8040de80 7f030c18 bdd17da0 7f031798 80c76c58
[ 11.156173] 7da0: be7f95c0 80cea230 bdd17dcc bdd17db8 8040f1f0 8040d974 7f031774 80c76c58
[ 11.164408] 7dc0: bdd17de4 bdd17dd0 8054d384 8040f174 80c76c58 80c76c58 bdd17dfc bdd17de8
[ 11.172629] 7de0: 7f037018 8054d354 00000000 80c76c58 bdd17e7c bdd17e00 80008b20 7f03700c
[ 11.180852] 7e00: bdd17e44 bdd17e10 8013b4b4 8077f8a4 00000001 0000084f bdd17e44 000000db
[ 11.189069] 7e20: bdf1b100 c0c70000 00000001 be7f9440 8152cc60 00000001 bdd17e64 bdd17e48
[ 11.197330] 7e40: 801301d0 8013b26c bdd17f48 7f0320d4 7f0320c8 bdd17f48 7f0320d4 7f0320c8
[ 11.205568] 7e60: 80cea230 be7f9440 8152cc60 00000001 bdd17f3c bdd17e80 800a92e0 80008a70
[ 11.213776] 7e80: 7f0320d4 00007fff 800a64e8 bdd17f04 bdd17ebc c0c70000 00000000 c0d14dd8
[ 11.221973] 7ea0: bdd17ed4 76f91d50 00000202 7f0320c8 7f032214 7f032110 8006b448 80a4b86c
[ 11.230166] 7ec0: bdd17fa4 bdd17ed0 800141b0 8006b440 c0d4a000 00000000 00000000 00000000
[ 11.238357] 7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 11.246548] 7f00: 00000000 00000000 00000000 00000000 20000013 000da17d 76d96000 76f91d50
[ 11.254741] 7f20: 00000080 8000fc44 bdd16000 00000000 bdd17fa4 bdd17f40 800a99e8 800a75e4
[ 11.262935] 7f40: 8000faa4 bdfc0000 c0c70000 000da17d c0d146f8 c0d1455f c0d48a98 0000b758
[ 11.271125] 7f60: 0000cf08 7f031e70 00000019 00000000 0000002c 0000002d 00000016 00000011
[ 11.279319] 7f80: 0000000b 00000000 00000000 00000000 784fb200 784fd698 00000000 bdd17fa8
[ 11.287509] 7fa0: 8000fa80 800a9940 00000000 784fb200 76d96000 000da17d 76f91d50 00000002
[ 11.295699] 7fc0: 00000000 784fb200 784fd698 00000080 00000000 76f91d50 000da17d 00000000
[ 11.303891] 7fe0: 00060000 7e936924 76f8bb07 76f0f264 60000010 76d96000 00000000 00000000
[ 11.312074] Backtrace:
[ 11.314586] [<7f0290a0>] (inv_mpu_probe [inv_mpu_iio]) from [<8054ad94>] (i2c_device_probe+0xec/0x150)
[ 11.323903] r10:00000000 r9:00000004 r8:7f031798 r7:befd7800 r6:7f031798 r5:00000000
[ 11.331840] r4:befd7820
[ 11.334417] [<8054aca8>] (i2c_device_probe) from [<8040e504>] (driver_probe_device+0x144/0x390)
[ 11.343126] r7:00000000 r6:80cf1758 r5:befd7820 r4:81589ca8
[ 11.348882] [<8040e3c0>] (driver_probe_device) from [<8040e7f4>] (__driver_attach+0xa4/0xa8)
[ 11.357328] r10:00000000 r9:8152cc60 r8:7f037000 r7:00000000 r6:befd7854 r5:7f031798
[ 11.365262] r4:befd7820
[ 11.367829] [<8040e750>] (__driver_attach) from [<8040c6fc>] (bus_for_each_dev+0x64/0x98)
[ 11.376017] r6:8040e750 r5:7f031798 r4:00000000 r3:bef307e4
[ 11.381771] [<8040c698>] (bus_for_each_dev) from [<8040de9c>] (driver_attach+0x28/0x30)
[ 11.389783] r6:80ccc070 r5:bdd2b480 r4:7f031798
[ 11.394473] [<8040de74>] (driver_attach) from [<8040da60>] (bus_add_driver+0xf8/0x218)
[ 11.402410] [<8040d968>] (bus_add_driver) from [<8040f1f0>] (driver_register+0x88/0x104)
[ 11.410510] r7:80cea230 r6:be7f95c0 r5:80c76c58 r4:7f031798
[ 11.416264] [<8040f168>] (driver_register) from [<8054d384>] (i2c_register_driver+0x3c/0xfc)
[ 11.424711] r5:80c76c58 r4:7f031774
[ 11.428362] [<8054d348>] (i2c_register_driver) from [<7f037018>] (inv_mpu_init+0x18/0x3c [inv_mpu_iio])
[ 11.437764] r5:80c76c58 r4:80c76c58
[ 11.441414] [<7f037000>] (inv_mpu_init [inv_mpu_iio]) from [<80008b20>] (do_one_initcall+0xbc/0x204)
[ 11.450554] r4:80c76c58 r3:00000000
[ 11.454193] [<80008a64>] (do_one_initcall) from [<800a92e0>] (load_module+0x1d08/0x235c)
[ 11.462294] r10:00000001 r9:8152cc60 r8:be7f9440 r7:80cea230 r6:7f0320c8 r5:7f0320d4
[ 11.470230] r4:bdd17f48
[ 11.472799] [<800a75d8>] (load_module) from [<800a99e8>] (SyS_init_module+0xb4/0x124)
[ 11.480638] r10:00000000 r9:bdd16000 r8:8000fc44 r7:00000080 r6:76f91d50 r5:76d96000
[ 11.488574] r4:000da17d
[ 11.491149] [<800a9934>] (SyS_init_module) from [<8000fa80>] (ret_fast_syscall+0x0/0x48)
[ 11.499247] r6:784fd698 r5:784fb200 r4:00000000
[ 11.503937] Code: e28cc004 e2847b01 e5c435e5 e595e0b4 (e8be000f)
[ 11.510195] ---[ end trace fcf671f516c808ac ]---
udevd[324]: '/sbin/modprobe -b i2c:mpu9250' [333] terminated by signal 11 (Segmentation fault)
As far as I understand, it says segmentation error has occurred during i2c device probe. I am not able to find where I have done a mistake. As I have little knowledge about dts file I am not sure whether I have edited dts file correctly or not. And as far as the driver is concerned, it got compiled correctly so I feel driver should not be an issue here.
Please help me out. I have to finish off this task by this end of this week.
Thank you in advance for your reply.

Linux ARM Abort oops from user space

On a ARM Cortex-A9 (Freescale iMX6SL) running Linux kernel 3.0.35, I am seeing a kernel oops with PC and LR (0x402aca32/0x402ac3cd) that is in user space. Mode is USER_32 and ISA is Thumb. There is no code on this system that executes in Thumb mode.
[ 597.195954] Unable to handle kernel paging request at virtual address 000a34d4
[ 597.205436] pgd = c35dc000
[ 597.208149] [000a34d4] *pgd=8c454831, *pte=8374c1cf, *ppte=8374ca3e
[ 597.214657] Internal error: Oops: 81f [#1] PREEMPT
[ 597.219609] Modules linked in: ...<snip>...
[ 597.243075] CPU: 0 Tainted: P W (3.0.35-aaaaaa #1)
[ 597.249162] PC is at 0x402aca32
[ 597.252304] LR is at 0x402ac3cd
[ 597.255448] pc : [<402aca32>] lr : [<402ac3cd>] psr: 60000030
[ 597.255453] sp : be8fc220 ip : 00000000 fp : 00000809
[ 597.266940] r10: 00000004 r9 : 40336ea0 r8 : 00000818
[ 597.272168] r7 : 4034c25c r6 : 00011b31 r5 : 00001250 r4 : 000a2cc8
[ 597.278698] r3 : 00000000 r2 : 000a34d0 r1 : 00011b30 r0 : 00000809
[ 597.285229] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user
[ 597.292629] Control: 10c53c7d Table: 835dc059 DAC: 00000015
[ 597.298378] Process wancontrol (pid: 7551, stack limit = 0xce9f02e8)
[ 597.307890] ---[ end trace f50414d2a3d239df ]---
[ 597.312516] Kernel panic - not syncing: Fatal exception in interrupt
[ 597.325257] Backtrace:
[ 597.327567] [<c0135248>] (dump_backtrace+0x0/0x110) from [<c041e188>] (dump_stack+0x18/0x1c)
[ 597.336837] r6:c3088d20 r5:ce9f02e8 r4:c0537b48 r3:00000002
[ 597.342382] [<c041e170>] (dump_stack+0x0/0x1c) from [<c041e200>] (panic+0x74/0x194)
[ 597.350794] [<c041e18c>] (panic+0x0/0x194) from [<c01355b0>] (die+0x1a4/0x1e4)
[ 597.358402] r3:07ffff00 r2:ce9f1db8 r1:c0537f90 r0:c04ac8ba
[ 597.364044] r7:00000000
[ 597.366591] [<c013540c>] (die+0x0/0x1e4) from [<c013a7b0>] (__do_kernel_fault+0x6c/0x8c)
[ 597.375465] r8:00000000 r7:ce9f1fb0 r6:cee35900 r5:0000081f r4:000a34d4
[ 597.382060] [<c013a744>] (__do_kernel_fault+0x0/0x8c) from [<c013aa90>] (do_page_fault+0x2c0/0x2f0)
[ 597.391760] r8:cee35900 r7:000a34d4 r6:c3088d20 r5:ce9f1fb0 r4:00000001
[ 597.398438] r3:ce9f1fb0
[ 597.400909] [<c013a7d0>] (do_page_fault+0x0/0x2f0) from [<c012c1b8>] (do_DataAbort+0x38/0xa0)
[ 597.410178] [<c012c180>] (do_DataAbort+0x0/0xa0) from [<c0131a88>] (ret_from_exception+0x0/0x10)
[ 597.419298] Exception stack(0xce9f1fb0 to 0xce9f1ff8)
[ 597.424664] 1fa0: 00000809 00011b30 000a34d0 00000000
[ 597.434300] 1fc0: 000a2cc8 00001250 00011b31 4034c25c 00000818 40336ea0 00000004 00000809
[ 597.442488] 1fe0: 00000000 be8fc220 402ac3cd 402aca32 60000030 ffffffff
[ 597.455455] r8:00000818 r7:4034c25c r6:00011b31 r5:0000000f r4:0000040f
If code was executing in user space, it should get SEGV.
void arm_notify_die(const char *str, struct pt_regs *regs,
struct siginfo *info, unsigned long err, unsigned long trap)
{
if (user_mode(regs)) {
current->thread.error_code = err;
current->thread.trap_no = trap;
force_sig_info(info->si_signo, info, current);
} else {
die(str, regs, err);
}
}
Why does it go into die()?
This happens repeatedly with the same backtrace for the same address 0x000a34d4. I can't say the stack has been hosed because the values look the same in different instances of this kernel oops.

Resources