Hi,
We have a customized imx6sl board with eMMC(usdhc2) and a sd card slot(usdhc3)
Sometimes from SD card writing files to eMMC will lead to a kernel crash(but didn't happen every time).
Sometimes, the eMMC write will lead to a kernel warning then the kernel might have the possibility to crash. The larger file/more files, has more possibilities to get this error. I test dd/cp command both can trigger the kernel crash.
I wonder if there is something wrong with my eMMC driver or dtb configuration ?
Following is the schematic/ dts of our board.
root@acuvims_hmi:/mnt/opt# cp -r /usr /mnt/opt
------------[ cut here ]------------
WARNING: CPU: 0 PID: 125 at /home/jie/Desktop/Acuvim-s/imx-yocto-bsp/build-acuvims-hmi/tmp/work-shared/acuvims_hmi/kernel-source/drivers/mmc/host/sdhci.c:866 sdhci_send_command+0xa9c/0xb2c
Modules linked in: evbug galcore(O)
CPU: 0 PID: 125 Comm: mmcqd/2 Tainted: G O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
[<8010ecb4>] (unwind_backtrace) from [<8010b394>] (show_stack+0x10/0x14)
[<8010b394>] (show_stack) from [<803c15ec>] (dump_stack+0x78/0x8c)
[<803c15ec>] (dump_stack) from [<8012dc2c>] (__warn+0xe8/0x100)
[<8012dc2c>] (__warn) from [<8012dcf4>] (warn_slowpath_null+0x20/0x28)
[<8012dcf4>] (warn_slowpath_null) from [<807223ac>] (sdhci_send_command+0xa9c/0xb2c)
[<807223ac>] (sdhci_send_command) from [<80723a38>] (sdhci_irq+0xabc/0xb64)
[<80723a38>] (sdhci_irq) from [<80171960>] (__handle_irq_event_percpu+0x50/0x11c)
[<80171960>] (__handle_irq_event_percpu) from [<80171a48>] (handle_irq_event_percpu+0x1c/0x58)
[<80171a48>] (handle_irq_event_percpu) from [<80171abc>] (handle_irq_event+0x38/0x5c)
[<80171abc>] (handle_irq_event) from [<80174e54>] (handle_fasteoi_irq+0xd0/0x1a0)
[<80174e54>] (handle_fasteoi_irq) from [<80170c6c>] (generic_handle_irq+0x24/0x34)
[<80170c6c>] (generic_handle_irq) from [<80171180>] (__handle_domain_irq+0x7c/0xec)
[<80171180>] (__handle_domain_irq) from [<801014d0>] (gic_handle_irq+0x48/0x8c)
[<801014d0>] (gic_handle_irq) from [<8010bd8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x885d1e18 to 0x885d1e60)
1e00: 8845c300 60000113
1e20: 8818e680 00009a03 885d1e84 00000000 8845c300 00000000 885ce5fc 8845c300
1e40: 00000000 8845c2fc 885d1e90 885d1e68 80167690 809b9920 60000113 ffffffff
[<8010bd8c>] (__irq_svc) from [<809b9920>] (_raw_spin_unlock_irqrestore+0x20/0x54)
[<809b9920>] (_raw_spin_unlock_irqrestore) from [<80167690>] (prepare_to_wait_event+0x64/0x100)
[<80167690>] (prepare_to_wait_event) from [<8070c674>] (mmc_start_areq+0x2e8/0x388)
[<8070c674>] (mmc_start_areq) from [<8071c000>] (mmc_blk_issue_rw_rq+0xac/0x364)
[<8071c000>] (mmc_blk_issue_rw_rq) from [<8071d1d0>] (mmc_blk_issue_rq+0x11c/0x220)
[<8071d1d0>] (mmc_blk_issue_rq) from [<8071d380>] (mmc_queue_thread+0xac/0x130)
[<8071d380>] (mmc_queue_thread) from [<8014981c>] (kthread+0x108/0x110)
[<8014981c>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
---[ end trace 2550a7b95c0b4412 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 125 at /home/jie/Desktop/Acuvim-s/imx-yocto-bsp/build-acuvims-hmi/tmp/work-shared/acuvims_hmi/kernel-source/drivers/mmc/host/sdhci.c:866 sdhci_send_command+0xa9c/0xb2c
Modules linked in: evbug galcore(O)
CPU: 0 PID: 125 Comm: mmcqd/2 Tainted: G W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
[<8010ecb4>] (unwind_backtrace) from [<8010b394>] (show_stack+0x10/0x14)
[<8010b394>] (show_stack) from [<803c15ec>] (dump_stack+0x78/0x8c)
[<803c15ec>] (dump_stack) from [<8012dc2c>] (__warn+0xe8/0x100)
[<8012dc2c>] (__warn) from [<8012dcf4>] (warn_slowpath_null+0x20/0x28)
[<8012dcf4>] (warn_slowpath_null) from [<807223ac>] (sdhci_send_command+0xa9c/0xb2c)
[<807223ac>] (sdhci_send_command) from [<80723a38>] (sdhci_irq+0xabc/0xb64)
[<80723a38>] (sdhci_irq) from [<80171960>] (__handle_irq_event_percpu+0x50/0x11c)
[<80171960>] (__handle_irq_event_percpu) from [<80171a48>] (handle_irq_event_percpu+0x1c/0x58)
[<80171a48>] (handle_irq_event_percpu) from [<80171abc>] (handle_irq_event+0x38/0x5c)
[<80171abc>] (handle_irq_event) from [<80174e54>] (handle_fasteoi_irq+0xd0/0x1a0)
[<80174e54>] (handle_fasteoi_irq) from [<80170c6c>] (generic_handle_irq+0x24/0x34)
[<80170c6c>] (generic_handle_irq) from [<80171180>] (__handle_domain_irq+0x7c/0xec)
[<80171180>] (__handle_domain_irq) from [<801014d0>] (gic_handle_irq+0x48/0x8c)
[<801014d0>] (gic_handle_irq) from [<8010bd8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x885d1e18 to 0x885d1e60)
1e00: 8845c300 60000113
1e20: 8818e680 00009b29 885d1e84 00000000 8845c300 00000000 885ce5fc 8845c300
1e40: 00000000 8845c2fc 885d1e90 885d1e68 80167690 809b9920 60000113 ffffffff
[<8010bd8c>] (__irq_svc) from [<809b9920>] (_raw_spin_unlock_irqrestore+0x20/0x54)
[<809b9920>] (_raw_spin_unlock_irqrestore) from [<80167690>] (prepare_to_wait_event+0x64/0x100)
[<80167690>] (prepare_to_wait_event) from [<8070c674>] (mmc_start_areq+0x2e8/0x388)
[<8070c674>] (mmc_start_areq) from [<8071c000>] (mmc_blk_issue_rw_rq+0xac/0x364)
[<8071c000>] (mmc_blk_issue_rw_rq) from [<8071d1d0>] (mmc_blk_issue_rq+0x11c/0x220)
[<8071d1d0>] (mmc_blk_issue_rq) from [<8071d380>] (mmc_queue_thread+0xac/0x130)
[<8071d380>] (mmc_queue_thread) from [<8014981c>] (kthread+0x108/0x110)
[<8014981c>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
---[ end trace 2550a7b95c0b4413 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 125 at /home/jie/Desktop/Acuvim-s/imx-yocto-bsp/build-acuvims-hmi/tmp/work-shared/acuvims_hmi/kernel-source/drivers/mmc/host/sdhci.c:866 sdhci_send_command+0xa9c/0xb2c
Modules linked in: evbug galcore(O)
CPU: 0 PID: 125 Comm: mmcqd/2 Tainted: G W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
[<8010ecb4>] (unwind_backtrace) from [<8010b394>] (show_stack+0x10/0x14)
[<8010b394>] (show_stack) from [<803c15ec>] (dump_stack+0x78/0x8c)
[<803c15ec>] (dump_stack) from [<8012dc2c>] (__warn+0xe8/0x100)
[<8012dc2c>] (__warn) from [<8012dcf4>] (warn_slowpath_null+0x20/0x28)
[<8012dcf4>] (warn_slowpath_null) from [<807223ac>] (sdhci_send_command+0xa9c/0xb2c)
[<807223ac>] (sdhci_send_command) from [<80723a38>] (sdhci_irq+0xabc/0xb64)
[<80723a38>] (sdhci_irq) from [<80171960>] (__handle_irq_event_percpu+0x50/0x11c)
[<80171960>] (__handle_irq_event_percpu) from [<80171a48>] (handle_irq_event_percpu+0x1c/0x58)
[<80171a48>] (handle_irq_event_percpu) from [<80171abc>] (handle_irq_event+0x38/0x5c)
[<80171abc>] (handle_irq_event) from [<80174e54>] (handle_fasteoi_irq+0xd0/0x1a0)
[<80174e54>] (handle_fasteoi_irq) from [<80170c6c>] (generic_handle_irq+0x24/0x34)
[<80170c6c>] (generic_handle_irq) from [<80171180>] (__handle_domain_irq+0x7c/0xec)
[<80171180>] (__handle_domain_irq) from [<801014d0>] (gic_handle_irq+0x48/0x8c)
[<801014d0>] (gic_handle_irq) from [<8010bd8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x885d1ee0 to 0x885d1f28)
1ee0: 88485780 00000000 05f5e0ff 0000ea5b 00000000 885c8000 8848578c 8845c000
1f00: ffffe000 00000001 88485794 00000000 88486f20 885d1f30 8071d39c 809b9974
1f20: 20000013 ffffffff
[<8010bd8c>] (__irq_svc) from [<809b9974>] (_raw_spin_unlock_irq+0x20/0x54)
[<809b9974>] (_raw_spin_unlock_irq) from [<8071d39c>] (mmc_queue_thread+0xc8/0x130)
[<8071d39c>] (mmc_queue_thread) from [<8014981c>] (kthread+0x108/0x110)
[<8014981c>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
---[ end trace 2550a7b95c0b4414 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 125 at /home/jie/Desktop/Acuvim-s/imx-yocto-bsp/build-acuvims-hmi/tmp/work-shared/acuvims_hmi/kernel-source/drivers/mmc/host/sdhci.c:866 sdhci_send_command+0xa9c/0xb2c
Modules linked in: evbug galcore(O)
CPU: 0 PID: 125 Comm: mmcqd/2 Tainted: G W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
[<8010ecb4>] (unwind_backtrace) from [<8010b394>] (show_stack+0x10/0x14)
[<8010b394>] (show_stack) from [<803c15ec>] (dump_stack+0x78/0x8c)
[<803c15ec>] (dump_stack) from [<8012dc2c>] (__warn+0xe8/0x100)
[<8012dc2c>] (__warn) from [<8012dcf4>] (warn_slowpath_null+0x20/0x28)
[<8012dcf4>] (warn_slowpath_null) from [<807223ac>] (sdhci_send_command+0xa9c/0xb2c)
[<807223ac>] (sdhci_send_command) from [<80723a38>] (sdhci_irq+0xabc/0xb64)
[<80723a38>] (sdhci_irq) from [<80171960>] (__handle_irq_event_percpu+0x50/0x11c)
[<80171960>] (__handle_irq_event_percpu) from [<80171a48>] (handle_irq_event_percpu+0x1c/0x58)
[<80171a48>] (handle_irq_event_percpu) from [<80171abc>] (handle_irq_event+0x38/0x5c)
[<80171abc>] (handle_irq_event) from [<80174e54>] (handle_fasteoi_irq+0xd0/0x1a0)
[<80174e54>] (handle_fasteoi_irq) from [<80170c6c>] (generic_handle_irq+0x24/0x34)
[<80170c6c>] (generic_handle_irq) from [<80171180>] (__handle_domain_irq+0x7c/0xec)
[<80171180>] (__handle_domain_irq) from [<801014d0>] (gic_handle_irq+0x48/0x8c)
[<801014d0>] (gic_handle_irq) from [<8010bd8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x885d1e20 to 0x885d1e68)
1e20: 00000000 00000001 00000000 8818e680 8845c000 80cd067c 885d1ee0 00000000
1e40: 885ce1fc 8845c300 00000000 885d1e7c 885d1e90 885d1e70 8070c664 809b5cf0
1e60: 60030113 ffffffff
[<8010bd8c>] (__irq_svc) from [<809b5cf0>] (schedule+0x68/0xb0)
[<809b5cf0>] (schedule) from [<8070c664>] (mmc_start_areq+0x2d8/0x388)
[<8070c664>] (mmc_start_areq) from [<8071c000>] (mmc_blk_issue_rw_rq+0xac/0x364)
[<8071c000>] (mmc_blk_issue_rw_rq) from [<8071d1d0>] (mmc_blk_issue_rq+0x11c/0x220)
[<8071d1d0>] (mmc_blk_issue_rq) from [<8071d380>] (mmc_queue_thread+0xac/0x130)
[<8071d380>] (mmc_queue_thread) from [<8014981c>] (kthread+0x108/0x110)
[<8014981c>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
---[ end trace 2550a7b95c0b4415 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 125 at /home/jie/Desktop/Acuvim-s/imx-yocto-bsp/build-acuvims-hmi/tmp/work-shared/acuvims_hmi/kernel-source/drivers/mmc/host/sdhci.c:866 sdhci_send_command+0xa9c/0xb2c
Modules linked in: evbug galcore(O)
CPU: 0 PID: 125 Comm: mmcqd/2 Tainted: G W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
[<8010ecb4>] (unwind_backtrace) from [<8010b394>] (show_stack+0x10/0x14)
[<8010b394>] (show_stack) from [<803c15ec>] (dump_stack+0x78/0x8c)
[<803c15ec>] (dump_stack) from [<8012dc2c>] (__warn+0xe8/0x100)
[<8012dc2c>] (__warn) from [<8012dcf4>] (warn_slowpath_null+0x20/0x28)
[<8012dcf4>] (warn_slowpath_null) from [<807223ac>] (sdhci_send_command+0xa9c/0xb2c)
[<807223ac>] (sdhci_send_command) from [<80723a38>] (sdhci_irq+0xabc/0xb64)
[<80723a38>] (sdhci_irq) from [<80171960>] (__handle_irq_event_percpu+0x50/0x11c)
[<80171960>] (__handle_irq_event_percpu) from [<80171a48>] (handle_irq_event_percpu+0x1c/0x58)
[<80171a48>] (handle_irq_event_percpu) from [<80171abc>] (handle_irq_event+0x38/0x5c)
[<80171abc>] (handle_irq_event) from [<80174e54>] (handle_fasteoi_irq+0xd0/0x1a0)
[<80174e54>] (handle_fasteoi_irq) from [<80170c6c>] (generic_handle_irq+0x24/0x34)
[<80170c6c>] (generic_handle_irq) from [<80171180>] (__handle_domain_irq+0x7c/0xec)
[<80171180>] (__handle_domain_irq) from [<801014d0>] (gic_handle_irq+0x48/0x8c)
[<801014d0>] (gic_handle_irq) from [<8010bd8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x885d1e30 to 0x885d1e78)
1e20: 00000000 00000001 00000000 00000000
1e40: 8845c000 80cd067c 885d1ee0 00000000 885ce1fc 8845c300 00000000 8845c2fc
1e60: 885d1e90 885d1e80 8070c664 809b5c88 60000113 ffffffff
[<8010bd8c>] (__irq_svc) from [<809b5c88>] (schedule+0x0/0xb0)
---[ end trace 2550a7b95c0b4416 ]---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in: evbug galcore(O)
CPU: 0 PID: 116 Comm: mmcqd/1 Tainted: G W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
task: 88288580 task.stack: 88490000
PC is at blk_rq_map_sg+0x148/0x47c
LR is at blk_rq_map_sg+0x140/0x47c
pc : [<803a9198>] lr : [<803a9190>] psr: 40030113
sp : 88491e18 ip : 00080000 fp : 8bc917e0
r10: 00000000 r9 : 00000c00 r8 : 893b3f00
r7 : 00000000 r6 : 00000400 r5 : 00000000 r4 : 00000400
r3 : 00000001 r2 : 87a1fc00 r1 : 00000c00 r0 : 00000000
Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 88a8404a DAC: 00000051
Process mmcqd/1 (pid: 116, stack limit = 0x88490210)
Stack: (0x88491e18 to 0x88492000)
1e00: 00000010 88445400
1e20: 00000001 8832acb0 88452f00 80fcb640 80f062c4 80f7cd1a 80c55744 00000001
1e40: 8833fd80 884454d0 88445400 8845c800 00000000 00000000 884454d4 8833fd8c
1e60: 88491ea6 80719d60 8833fd80 00000000 8832accc 884454d0 88445400 8845c800
1e80: 8833fd80 8833fd80 00000001 8833fd94 8833fd80 80719ec0 88491ea7 88445400
1ea0: 8846c200 8832acb0 ffffe000 8845c800 8833fd8c 8833fd8c 88445400 8071bff0
1ec0: 88445400 884454d0 884455fc 00000000 00000000 00000000 8833fd80 80cd269c
1ee0: 773cdfc8 0000003a 8833fd94 8845c800 8833fd8c 8833fd80 88445400 8833fd80
1f00: 00000001 8833fd94 88445400 8071d1d0 00000000 8832acb0 8833fd8c 00000000
1f20: 8832acb0 8833fd8c 8803c800 ffffe000 00000001 8071d380 88452fc0 00000000
1f40: 8833fd8c 00000000 88452fc0 88490000 8833fd8c 8071d2d4 00000000 00000000
1f60: 00000000 8014981c 8014abd4 00000000 88288580 8833fd8c 00000000 00000000
1f80: 88491f80 88491f80 00000000 00000000 88491f90 88491f90 88452fc0 80149714
1fa0: 00000000 00000000 00000000 80107950 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 8014abd4 8014abd4
[<803a9198>] (blk_rq_map_sg) from [<80719d60>] (mmc_blk_data_prep+0x190/0x2bc)
[<80719d60>] (mmc_blk_data_prep) from [<80719ec0>] (mmc_blk_rw_rq_prep+0x34/0x154)
[<80719ec0>] (mmc_blk_rw_rq_prep) from [<8071bff0>] (mmc_blk_issue_rw_rq+0x9c/0x364)
[<8071bff0>] (mmc_blk_issue_rw_rq) from [<8071d1d0>] (mmc_blk_issue_rq+0x11c/0x220)
[<8071d1d0>] (mmc_blk_issue_rq) from [<8071d380>] (mmc_queue_thread+0xac/0x130)
[<8071d380>] (mmc_queue_thread) from [<8014981c>] (kthread+0x108/0x110)
[<8014981c>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
Code: e5873000 eb009883 e31b0003 e1a07000 (e5973000)
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021----[ end trace 2550a7b95c0b4417 ]---
02-19 03:57:22 UTC):
kernel[218]: Process mmcqd/1 (pid: 116, stack limit = 0x88490210)
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: Stack: (0x88491e18 to 0x88492000)
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1e00: 00000010 88445400
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1e20: 00000001 8832acb0 88452f00 80fcb640 80f062c4 80f7cd1a 80c55744 00000001
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1e40: 8833fd80 884454d0 88445400 8845c800 00000000 00000000 884454d4 8833fd8c
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1e60: 88491ea6 80719d60 8833fd80 00000000 8832accc 884454d0 88445400 8845c800
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1e80: 8833fd80 8833fd80 00000001 8833fd94 8833fd80 80719ec0 88491ea7 88445400
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1ea0: 8846c200 8832acb0 ffffe000 8845c800 8833fd8c 8833fd8c 88445400 8071bff0
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1ec0: 88445400 884454d0 884455fc 00000000 00000000 00000000 8833fd80 80cd269c
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1ee0: 773cdfc8 0000003a 8833fd94 8845c800 8833fd8c 8833fd80 88445400 8833fd80
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1f00: 00000001 8833fd94 88445400 8071d1d0 00000000 8832acb0 8833fd8c 00000000
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1f20: 8832acb0 8833fd8c 8803c800 ffffe000 00000001 8071d380 88452fc0 00000000
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1f40: 8833fd8c 00000000 88452fc0 88490000 8833fd8c 8071d2d4 00000000 00000000
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1f60: 00000000 8014981c 8014abd4 00000000 88288580 8833fd8c 00000000 00000000
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1f80: 88491f80 88491f80 00000000 00000000 88491f90 88491f90 88452fc0 80149714
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1fa0: 00000000 00000000 00000000 80107950 00000000 00000000 00000000 00000000
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 8014abd4 8014abd4
Broadcast message from systemd-journald@acuvims_hmi (Fri 2021-02-19 03:57:22 UTC):
kernel[218]: Code: e5873000 eb009883 e31b0003 e1a07000 (e5973000)
Unable to handle kernel NULL pointer dereference at virtual address 00000864
pgd = 887e0000
[00000864] *pgd=00000000
Internal error: Oops: 5 [#2] PREEMPT SMP ARM
Modules linked in: evbug galcore(O)
CPU: 0 PID: 176 Comm: sd-resolve Tainted: G D W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
task: 88629b80 task.stack: 888c6000
PC is at kmem_cache_alloc+0x88/0x13c
LR is at sock_alloc_inode+0x3c/0xa4
pc : [<801f9cec>] lr : [<807e3418>] psr: 200e0013
sp : 888c7f00 ip : 0acbc000 fp : 76a03644
r10: 00000000 r9 : 0006c3e4 r8 : 00000864
r7 : ffffe000 r6 : 807e3418 r5 : 024000c0 r4 : 88001f00
r3 : 00000000 r2 : 0acbc000 r1 : 0006c3e4 r0 : 88001f00
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 887e004a DAC: 00000051
Process sd-resolve (pid: 176, stack limit = 0x888c6210)
Stack: (0x888c7f00 to 0x888c8000)
7f00: 8648bc00 80f03e88 76a03648 00000119 80f73400 00000000 00000000 807e3418
7f20: 00000002 880c8800 76a03648 8021a364 00000002 00000002 76a03648 8021bf1c
7f40: 00000002 00000002 76a03648 807e293c 00000002 807e2ea8 00080802 00000000
7f60: 76a03648 00000119 80107a44 888c6000 00000000 807e410c 888c7f8c 00000000
7f80: 88629f7c 80148028 ffffe000 80107a44 888c7fb0 76a03644 ffffffff 76a03648
7fa0: 00000119 80107880 76a03644 ffffffff 00000002 00080802 00000000 00000002
7fc0: 76a03644 ffffffff 76a03648 00000119 76a03664 00000001 76a03644 76a03644
7fe0: 76b1a0e0 769fbfa4 76aff194 76c0074c 600e0010 00000002 00000000 00000000
[<801f9cec>] (kmem_cache_alloc) from [<807e3418>] (sock_alloc_inode+0x3c/0xa4)
[<807e3418>] (sock_alloc_inode) from [<8021a364>] (alloc_inode+0x1c/0xa4)
[<8021a364>] (alloc_inode) from [<8021bf1c>] (new_inode_pseudo+0x8/0x40)
[<8021bf1c>] (new_inode_pseudo) from [<807e293c>] (sock_alloc+0x18/0xa0)
[<807e293c>] (sock_alloc) from [<807e2ea8>] (__sock_create+0x34/0x18c)
[<807e2ea8>] (__sock_create) from [<807e410c>] (SyS_socket+0x54/0xe0)
[<807e410c>] (SyS_socket) from [<80107880>] (ret_fast_syscall+0x0/0x48)
Code: e7938002 e3580000 0a00000c e5943014 (e7980003)
------------[ cut here ]------------
Kernel BUG at 801f8ff4 [verbose debug info unavailable]
Internal error: Oops - BUG: 0 [#3] PREEMPT SMP ARM
Modules linked in: evbug galcore(O)
CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G D W O 4.9.88-develop_acuvims-hmi_jietang+g8d48165 #2
Hardware name: Freescale i.MX6 SoloLite (Device Tree)
task: 88048b00 task.stack: 88058000
PC is at kfree+0x150/0x194
LR is at rcu_process_callbacks+0x39c/0x5c4
pc : [<801f8ff4>] lr : [<8017d164>] psr: 400f0113
sp : 88059e88 ip : 8bc917f4 fp : 8bc917f4
r10: 00000000 r9 : 8bb3a060 r8 : 0000000a
r7 : 80f106c4 r6 : ffffe000 r5 : 80f0fe80 r4 : 8bcd0220
r3 : 8bcd0234 r2 : 0000bc91 r1 : 8bb9ef20 r0 : 8bc917e0
Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 887f004a DAC: 00000051
Process ksoftirqd/0 (pid: 3, stack limit = 0x88058210)
Stack: (0x88059e88 to 0x8805a000)
9e80: 00000001 80f106c4 00000001 80f0fe80 ffffe000 80f106c4
9ea0: 0000000a 8017d164 600f0113 809b997c 00000001 80f030ec 80f0fe80 80f7cbc1
9ec0: ffffe000 8bb3a040 80f00000 00000000 00000009 80f020a4 ffffe000 80f02080
9ee0: 80c96d9c 00000100 40000009 80132720 00000000 8010bd8c 00000000 80f02080
9f00: 80e78378 80f7f3c0 0000000a fffff7c8 80f02d00 04208040 8801c680 ffffe000
9f20: 8801c680 00000000 00000001 80f0d630 00000002 00000000 00000000 801328b4
9f40: ffffe000 8014d090 00000000 8801c6c0 88058000 8801c680 8014cecc 00000000
9f60: 00000000 8014981c 570d1555 00000001 00000000 8801c680 00000000 00030003
9f80: 88059f80 88059f80 00000000 00000000 88059f90 88059f90 8801c6c0 80149714
9fa0: 00000000 00000000 00000000 80107950 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5d755557 55515555
[<801f8ff4>] (kfree) from [<8017d164>] (rcu_process_callbacks+0x39c/0x5c4)
[<8017d164>] (rcu_process_callbacks) from [<80132720>] (__do_softirq+0xe8/0x250)
[<80132720>] (__do_softirq) from [<801328b4>] (run_ksoftirqd+0x2c/0x38)
[<801328b4>] (run_ksoftirqd) from [<8014d090>] (smpboot_thread_fn+0x1c4/0x2b8)
[<8014d090>] (smpboot_thread_fn) from [<8014981c>] (kthread+0x108/0x110)
[<8014981c>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
Code: 1a000003 e5943014 e3130001 1a000000 (e7f001f2)
---[ end trace 2550a7b95c0b4418 ]---
Kernel panic - not syncing: Fatal exception in interrupt
---[ end Kernel panic - not syncing: Fatal exception in interrupt
Thanks for your help.
Hi
I found the eMMC and sd card are driven with DMA when booting up.
and from the source code, it seems if I enable the ADMA I can bypass this warning.
So I want to have a try here. How can I enable ADMA for eMMC and SD cards on IMX6SL? Or can I disable the DMA using PIO instead? Also, I notice it seems having some issues with the ADMA driver on IMX6SL? Is that fixed? can I use ADMA for emmc and SD card? https://community.nxp.com/t5/i-MX-Processors/ADMA-not-working-on-imx6sl/td-p/381698
appreciate for any ideas or advice.
Still not find the solution for this sg_count problem. But here I found a similar issue seems didn't solve either.
(Linux3.10.17)driver/mmc/host/sdhci.c throw warnin... - NXP Community
I appreciate anyone who can gives some hints.
You mean sometimes images can download to emmc and boot up success? Could you tell us which version of BSP are you using? I think download to emmc you do not need to via SD card, you can download images to the emmc on board directly.
Yes, sometimes the image copy doesn't have any problems like the following:
Sometimes copy from sd card to eMMC will lead to kernel crash like the following:
The yocto repo we used is based on yocto project User's guide: https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml.
The Linux kernel we used is:
https://source.codeaurora.org/external/imx/linux-imx -b imx_4.9.88_2.0.0_ga
I checked the kernel source code inside sdhci.c. 866 lines. the warning seems related to the DMA data copying. the scatter-gather count larger than 1.