IMX8MM: Kernel Panic

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8MM: Kernel Panic

153 Views
santhosh2
Contributor IV

Hello,

I am facing a kernel panic for spidev, Pleas find the log below

Under what condition does this error comes and how to handle this

[ 4.512823] LVDS csi_init_interface
[ 4.532173] WARNING: CPU: 1 PID: 3320 at /usr/src/kernel/drivers/spi/spidev.c:730 spidev_probe+0x1cc/0x248 [spidev]
[ 4.542618] Modules linked in: spidev(+) galcore(O)
[ 4.547531] CPU: 1 PID: 3320 Comm: systemd-udevd Tainted: G O 4.14.78-imx_4.14.78_1.0.0_ga+g94da7bd #1
[ 4.557974] Hardware name: FSL i.MX8MM EVK board (DT)
[ 4.563040] task: ffff8000721b0000 task.stack: ffff000017d28000
[ 4.568989] PC is at spidev_probe+0x1cc/0x248 [spidev]
[ 4.574173] LR is at spidev_probe+0x1c8/0x248 [spidev]
[ 4.574176] pc : [<ffff000000e1836c>] lr : [<ffff000000e18368>] pstate: 40000145
[ 4.574178] sp : ffff000017d2ba90
[ 4.574182] x29: ffff000017d2ba90 x28: ffff000018019000
[ 4.574186] x27: ffff000000e1b150 x26: 00000000014000c0
[ 4.574190] x25: 0000000000000124 x24: 0000000000000005
[ 4.574193] x23: 0000000000000000 x22: ffff000000e1b058
[ 4.574197] x21: 0000000000000000 x20: ffff800076af4800
[ 4.574201] x19: ffff000000e1a1f8 x18: 0000ffffa6932a70
[ 4.574205] x17: 0000ffffa68b2098 x16: ffff000008261a38
[ 4.574208] x15: 0000000000000000 x14: 0000000000000000
[ 4.574212] x13: 0000000000000000 x12: 0000000000000030
[ 4.574216] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[ 4.574219] x9 : 02fefeff01fefeff x8 : 7f7f7f7f7f7f7f7f
[ 4.574223] x7 : feff756463686f72 x6 : 0000000000008080
[ 4.574226] x5 : 8080000000000000 x4 : 0000000000000000
[ 4.574230] x3 : ffff000000e1a518 x2 : 000000000000cf26
[ 4.574233] x1 : ffff8000721b0000 x0 : 0000000000000000
[ 4.574237] Call trace:
[ 4.574241] Exception stack(0xffff000017d2b950 to 0xffff000017d2ba90)
[ 4.574245] b940: 0000000000000000 ffff8000721b0000
[ 4.574248] b960: 000000000000cf26 ffff000000e1a518 0000000000000000 8080000000000000
[ 4.574251] b980: 0000000000008080 feff756463686f72 7f7f7f7f7f7f7f7f 02fefeff01fefeff
[ 4.574254] b9a0: 7f7f7f7f7f7f7f7f 0101010101010101 0000000000000030 0000000000000000
[ 4.574257] b9c0: 0000000000000000 0000000000000000 ffff000008261a38 0000ffffa68b2098
[ 4.574261] b9e0: 0000ffffa6932a70 ffff000000e1a1f8 ffff800076af4800 0000000000000000
[ 4.574264] ba00: ffff000000e1b058 0000000000000000 0000000000000005 0000000000000124
[ 4.574267] ba20: 00000000014000c0 ffff000000e1b150 ffff000018019000 ffff000017d2ba90
[ 4.574270] ba40: ffff000000e18368 ffff000017d2ba90 ffff000000e1836c 0000000040000145
[ 4.574274] ba60: ffff000000e1a1f8 ffff800076af4800 0000ffffffffffff ffff000000e1b058
[ 4.574276] ba80: ffff000017d2ba90 ffff000000e1836c
[ 4.574285] [<ffff000000e1836c>] spidev_probe+0x1cc/0x248 [spidev]
[ 4.574294] [<ffff0000087a0890>] spi_drv_probe+0x78/0xc8
[ 4.574301] [<ffff0000086d3190>] driver_probe_device+0x210/0x2d0
[ 4.574305] [<ffff0000086d330c>] __driver_attach+0xbc/0xc0
[ 4.574310] [<ffff0000086d12ec>] bus_for_each_dev+0x4c/0x98
[ 4.574313] [<ffff0000086d2aa8>] driver_attach+0x20/0x28
[ 4.574316] [<ffff0000086d25f8>] bus_add_driver+0x1b8/0x228
[ 4.574320] [<ffff0000086d3ca8>] driver_register+0x60/0xf8
[ 4.574324] [<ffff0000087a07c8>] __spi_register_driver+0x58/0x60
[ 4.574330] [<ffff000000e1e088>] spidev_init+0x88/0x1000 [spidev]
[ 4.574335] [<ffff000008083c90>] do_one_initcall+0x38/0x128
[ 4.574340] [<ffff00000814da98>] do_init_module+0x58/0x1b0
[ 4.574343] [<ffff00000814c6dc>] load_module+0x1a74/0x21c8
[ 4.574346] [<ffff00000814d0d0>] SyS_finit_module+0xa8/0xc0
[ 4.574349] Exception stack(0xffff000017d2bec0 to 0xffff000017d2c000)
[ 4.574352] bec0: 0000000000000007 0000ffffa6a0ec90 0000000000000000 0000000000000007
[ 4.574355] bee0: 0000000000000000 0000000000000000 0000ffffa6931000 0000ffffa6931000
[ 4.574359] bf00: 0000000000000111 0000ffffa6791c90 0101010101010101 0000000000000000
[ 4.574362] bf20: 0101010101010101 0000000000000000 0000ffffa67f52c8 0000ffffa67e7de0
[ 4.574365] bf40: 0000ffffa68ae400 0000ffffa6a202a8 000000000000036c 0000aaaafa257430
[ 4.574368] bf60: 0000ffffa6a0ec90 0000000000000000 0000000000020000 0000aaaafa257430
[ 4.574372] bf80: 0000000000000000 0000000000000000 0000000000000001 0000aaaac1c648f8
[ 4.574375] bfa0: 0000000000000000 0000ffffd80e3da0 0000ffffa6a083d0 0000ffffd80e3da0
[ 4.574378] bfc0: 0000ffffa68ae424 0000000080000000 0000000000000007 0000000000000111
[ 4.574381] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 4.574385] [<ffff000008083b18>] __sys_trace_return+0x0/0x4
[ 4.574388] ---[ end trace a078cd60dcf0fe6d ]---
[ 4.585206] imx-sdma 302c0000.dma-controller: loaded firmware 4.4
[ 4.590502] imx-sdma 302b0000.dma-controller: loaded firmware 4.4
[ 4.599754] imx-sdma 30bd0000.dma-controller: loaded firmware 4.4
Starting Create Volatile Files and Directories...
[ OK ] Started Create Volatile Files and Directories.
Starting Setup Virtual Console...
[ 5.117436] Internal error: undefined instruction: 0 [#1] PREEMPT SMP
[ 5.123887] Modules linked in: crc32_ce crct10dif_ce spidev galcore(O)
[ 5.130426] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G W O 4.14.78-imx_4.14.78_1.0.0_ga+g94da7bd #1
[ 5.140252] Hardware name: FSL i.MX8MM EVK board (DT)
[ 5.145302] task: ffff8000763eb600 task.stack: ffff000009b58000
[ 5.151225] PC is at tick_sched_timer+0x28/0x90
[ 5.155767] LR is at tick_sched_timer+0x28/0x90
[ 5.155776] pc : [<ffff000008141f40>] lr : [<ffff000008141f40>] pstate: 600001c5
[ 5.155778] sp : ffff00000801be40
[ 5.155780] x29: ffff00000801be40 x28: 000000012b3736ed
[ 5.155783] x27: ffff000008141f18 x26: ffff80007dfac940
[ 5.155787] x25: ffff80007dfac950 x24: 000000012b3736ed
[ 5.155790] x23: 0000000000000001 x22: 0000000000000007
[ 5.155793] x21: 000000012b3736ed x20: ffff000009b5bdd0
[ 5.155796] x19: ffff80007dfacd88 x18: 0000000000000001
[ 5.155800] x17: 0000ffff8cf6c0b0 x16: ffff00000823d8b0
[ 5.155803] x15: ffffffffffffffff x14: 0000000000000000
[ 5.155806] x13: 0000000000000000 x12: 0000000000000001
[ 5.155811] x11: 0000000000000000 x10: 0000000000000040
[ 5.155814] x9 : ffff0000094f2f68 x8 : ffff800074000248
[ 5.155819] x7 : ffff800074000270 x6 : 0000000004ab130e
[ 5.155822] x5 : 00ffffffffffffff x4 : 001fb5ad00000000
[ 5.155825] x3 : 0000000000000018 x2 : 00000000000008d6
[ 5.155828] x1 : 000000007d000000 x0 : 000000012b3739db
[ 5.155835] Process swapper/3 (pid: 0, stack limit = 0xffff000009b58000)
[ 5.155837] Call trace:
[ 5.155840] Exception stack(0xffff00000801bd00 to 0xffff00000801be40)
[ 5.155843] bd00: 000000012b3739db 000000007d000000 00000000000008d6 0000000000000018
[ 5.155849] bd20: 001fb5ad00000000 00ffffffffffffff 0000000004ab130e ffff800074000270
[ 5.155852] bd40: ffff800074000248 ffff0000094f2f68 0000000000000040 0000000000000000
[ 5.155855] bd60: 0000000000000001 0000000000000000 0000000000000000 ffffffffffffffff
[ 5.155858] bd80: ffff00000823d8b0 0000ffff8cf6c0b0 0000000000000001 ffff80007dfacd88
[ 5.155861] bda0: ffff000009b5bdd0 000000012b3736ed 0000000000000007 0000000000000001
[ 5.155864] bdc0: 000000012b3736ed ffff80007dfac950 ffff80007dfac940 ffff000008141f18
[ 5.155867] bde0: 000000012b3736ed ffff00000801be40 ffff000008141f40 ffff00000801be40
[ 5.155870] be00: ffff000008141f40 00000000600001c5 ffff00000801be40 ffff000008141f40
[ 5.155873] be20: 0000ffffffffffff ffff000009b5bdd0 ffff00000801be40 ffff000008141f40
[ 5.155878] [<ffff000008141f40>] tick_sched_timer+0x28/0x90
[ 5.155884] [<ffff000008133780>] __hrtimer_run_queues+0xe8/0x168
[ 5.155890] [<ffff000008133a00>] hrtimer_interrupt+0xa8/0x230
[ 5.155896] [<ffff000008ab40a0>] arch_timer_handler_phys+0x28/0x48
[ 5.155901] [<ffff0000081209f8>] handle_percpu_devid_irq+0x80/0x138
[ 5.155905] [<ffff00000811b23c>] generic_handle_irq+0x24/0x38
[ 5.155908] [<ffff00000811b8bc>] __handle_domain_irq+0x5c/0xb8
[ 5.155913] [<ffff000008081960>] gic_handle_irq+0x78/0x174
[ 5.155915] Exception stack(0xffff000009b5bdd0 to 0xffff000009b5bf10)
[ 5.155917] bdc0: 0000000000000000 ffff80007dfb0d80
[ 5.155922] bde0: 0000800074ae8000 0000000001d678eb 0000000000000016 00ffffffffffffff
[ 5.155925] be00: 00000000023ebc95 0000000000000001 000000000000c34f 0000000000000056
[ 5.155928] be20: 0000000000000980 0000000000000000 0000000000000001 0000000000000000
[ 5.155931] be40: 0000000000000000 ffffffffffffffff ffff00000823d8b0 0000ffff8cf6c0b0
[ 5.155934] be60: 0000000000000001 000000013105933a 0000000000000000 ffff800076d70200
[ 5.155937] be80: ffff800076c4bc00 0000000000000000 00000001310542a9 ffff800076c4bc00
[ 5.155940] bea0: ffff8000763eb600 0000000000000000 0000000000000000 ffff000009b5bf10
[ 5.155945] bec0: ffff000008a1d970 ffff000009b5bf10 ffff000008a1d974 0000000060000145
[ 5.155949] bee0: ffff800076c4bc00 0000000000000000 ffffffffffffffff ffff800076c4bc00
[ 5.155951] bf00: ffff000009b5bf10 ffff000008a1d974
[ 5.155956] [<ffff000008083230>] el1_irq+0xb0/0x124
[ 5.155961] [<ffff000008a1d974>] cpuidle_enter_state+0x134/0x228
[ 5.155964] [<ffff000008a1daa0>] cpuidle_enter+0x18/0x20
[ 5.155968] [<ffff00000810ce94>] call_cpuidle+0x1c/0x40
[ 5.155971] [<ffff00000810d0e4>] do_idle+0x1a4/0x1e0
[ 5.155974] [<ffff00000810d2b8>] cpu_startup_entry+0x20/0x28
[ 5.155978] [<ffff000008090430>] secondary_start_kernel+0x110/0x120
[ 5.155983] Code: f90013f5 d538d080 f8606834 97ffc979 (aa0003f5)
[ 5.155992] ---[ end trace a078cd60dcf0fe6e ]---
[ 5.155994] Kernel panic - not syncing: Fatal exception in interrupt
[ 5.155997] SMP: stopping secondary CPUs
[ 5.160307] Kernel Offset: disabled
[ 5.160310] CPU features: 0x080200c
[ 5.160312] Memory Limit: none
[ 5.549992] Rebooting in 10 seconds..

 

Regards

Santhosh Kumar S

0 Kudos
3 Replies

137 Views
joanxie
NXP TechSupport
NXP TechSupport

what do you change and how did you reproduce this on nxp i.mx8mm board?

 

0 Kudos

134 Views
santhosh2
Contributor IV

I had added below since the SPI pin configurations was not done. apart from no changes done. i have rolled backed the code but still getting the kernel panic

pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x00000116
MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x00000116
MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x00001916
/*MX8MM_IOMUXC_ECSPI1_SS0_ECSPI1_SS0 0x00000116 *//*Chip select pin to be checked with freed GPIO*/
>;
};

 

/*Added by santhosh*/
/*
&ecspi1 {
fsl,spi-num-chipselects = <0>;
cs-gpios = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
status = "okay";
spidev@0x00 {
compatible = "spidev";
spi-max-frequency = <10000000>;
spi-cs-high;
reg = <0>;
};
};*/

0 Kudos

127 Views
joanxie
NXP TechSupport
NXP TechSupport

in our newest bsp,  there is a dtb file for the validation board which enabled the ecspi1 with a nor flash, it can work, the dtb like this

------------------------------------------

                pinctrl_ecspi1: ecspi1grp {
                        fsl,pins = <
                                MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK            0x82
                                MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI            0x82
                                MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO            0x82
                        >;
                };

                pinctrl_ecspi1_cs: ecspi1cs {
                        fsl,pins = <
                                MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9               0x40000
                        >;
                };

 

             


&ecspi1 {
        #address-cells = <1>;
        #size-cells = <0>;
        fsl,spi-num-chipselects = <1>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
        cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
        status = "okay";

        flash: m25p80@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "gd25q16", "jedec,spi-nor";
                spi-max-frequency = <20000000>;
                reg = <0>;
        };
};

---------------------------------------------------

 

you can use the unit_test    mxc_spi_test1.out  to do the test if you can get a real spi device.

0 Kudos