AnsweredAssumed Answered

kernel BUG at arch/powerpc/kernel/smp.c:370  Oops: Exception in kernel mode, sig: 5 [#1]

Question asked by Lin Hsin Han on Sep 18, 2018
Latest reply on Sep 19, 2018 by Yiping Wang

Dear all,


While loading the compiled QorIQ-SDK-V1.2-20120614-yocto linux kernel module on p1021 (2C, 900M) based board running linux kernel uImage, rootfs fsl-image and device tree dtb, I got below exception.


I have tried to trace the bug in smp.c file.

The bug is on "BUG_ON( smp_processor_id() != boot_cpuid )"

And I printk the value of smp_processor_id() and boot_cpuid. 

smp_processor_id() = 0, boot_cpuid = -1

=> bootm 1000000 2000000 c00000
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-3.0.34-rt55-02404-g1a39570
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 3615574 Bytes = 3.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
Image Name: fsl-image-minimal-p1021rdb-20180
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 4170707 Bytes = 4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 00c00000
Booting using the fdt blob at 0xc00000
Uncompressing Kernel Image ... OK
Loading Ramdisk to 2fc05000, end 2ffff3d3 ... OK
Using P1021 RDB-PC machine description
Memory CAM mapping: 256/256/256 Mb, residual: 256Mb
Linux version 3.0.34-rt55-02404-g1a39570 (diag@diag) (gcc version 4.6.2 (GCC) ) #1 SMP Tue Sep 18 05:30:38 CST 2018
Found initrd at 0xefc05000:0xeffff3d3
CPU maps initialized for 1 thread per core
bootconsole [udbg0] enabled
setup_arch: bootmem
Found FSL PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->255
PCI host bridge /pcie@ffe09000 ranges:
MEM 0x00000000a0000000..0x00000000bfffffff -> 0x00000000a0000000
IO 0x00000000ffc10000..0x00000000ffc1ffff -> 0x0000000000000000
/pcie@ffe09000: PCICSRBAR @ 0xfff00000
Found FSL PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->255
PCI host bridge /pcie@ffe0a000 ranges:
MEM 0x0000000080000000..0x000000009fffffff -> 0x0000000080000000
IO 0x00000000ffc00000..0x00000000ffc0ffff -> 0x0000000000000000
/pcie@ffe0a000: PCICSRBAR @ 0xfff00000
MPC85xx RDB board from Freescale Semiconductor
arch: exit
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal empty
HighMem 0x00030000 -> 0x00040000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00040000
MMU: Allocated 894575148 bytes of context maps for -1052737408 contexts
PERCPU: Embedded 7 pages/cpu @c140b000 s4704 r8192 d15776 u32768
------------[ cut here ]------------
kernel BUG at arch/powerpc/kernel/smp.c:370!
Oops: Exception in kernel mode, sig: 5 [#1]
Modules linked in:
NIP: c04eaa64 LR: c069359c CTR: 00000000
REGS: c070bf10 TRAP: 0700 Not tainted (3.0.34-rt55-02404-g1a39570)
MSR: 00021000 <ME,CE> CR: 20242128 XER: 20000000
TASK = c06d93c0[0] 'swapper' THREAD: c070a000 CPU: 0
GPR00: 00000001 c070bfc0 c06d93c0 00000008 00000008 00000008 00000000 00000000
GPR08: ffffffff ffffffff 00000000 c070a000 40242128 006ca004 3ff73800 00000000
GPR16: c0000a00 00000014 3fffffff 00c00000 00000015 00000000 c070a000 00000000
GPR24: 00000000 00000000 000016e0 00000000 c1408100 c0711500 c07126f8 c06c2bd4
NIP [c04eaa64] smp_prepare_boot_cpu+0x20/0x40
LR [c069359c] start_kernel+0x10c/0x2fc
Call Trace:
[c070bfc0] [c0693598] start_kernel+0x108/0x2fc (unreliable)
[c070bff0] [c00003f8] skpinv+0x2e4/0x320
Instruction dump:
540a053e 380affff 7c0b492e 4e800020 542b0024 3d20c071 800b0008 81298da4
7d200278 7c000034 5400d97e 68000001 <0f000000> 3d60c071 80020008 5529103a
---[ end trace 31fd0ba7d8756001 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
Call Trace:
[c070bd00] [c00082c0] show_stack+0x4c/0x174 (unreliable)
[c070bd40] [c04e1b70] panic+0xa8/0x1dc
[c070bda0] [c005014c] do_exit+0x6a4/0x6c4
[c070bdf0] [c000af68] die+0xe0/0x1cc
[c070be10] [c000b150] _exception+0xa4/0x120
[c070bf00] [c000f754] ret_from_except_full+0x0/0x4c
--- Exception: 700 at smp_prepare_boot_cpu+0x20/0x40
LR = start_kernel+0x10c/0x2fc
[c070bfc0] [c0693598] start_kernel+0x108/0x2fc (unreliable)
[c070bff0] [c00003f8] skpinv+0x2e4/0x320
Rebooting in 180 seconds..

Can someone guide me how to resolve this issue? What could be going wrong here?


Thanks for your help,

Best Regards,