Oops: Exception in kernel mode, sig: 5 [#1]

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Oops: Exception in kernel mode, sig: 5 [#1]

Jump to solution
3,494 Views
chandrashekhar
Contributor III

Hi,

While loading one of the compiled linux kernel module on p2020 based board running on linux (fsl-image-core) uImage, I got below exception,

------------[ cut here ]------------                                                                                                

kernel BUG at /nobackup/chanmish/arad_for_rsp1/trunk/common/src/brcm_sdk/latest/sdk-all-6.3.4/../../../../../os/linux-qoriq-sdk/3.8-r11.1/git/arch/powerpc/include/asm/dma-mapping.h:147!

Oops: Exception in kernel mode, sig: 5 [#1]

SMP NR_CPUS=8 P2020 DS

Modules linked in: linux_kernel_bde(PO+)

NIP: f110397c LR: f1103f84 CTR: 00000000

REGS: ee631c60 TRAP: 0700   Tainted: P           O  (3.8.13-rt9-QorIQ-SDK-V1.5)

MSR: 00029000 <CE,EE,ME>  CR: 28002222  XER: 00000000

TASK = ee5c1900[2208] 'insmod' THREAD: ee630000 CPU: 0

GPR00: f1103f84 ee631d10 ee5c1900 00800000 00000000 ef17c7f8 e00ff000 00000e00

GPR08: ff541215 00000000 00000000 ef17c7f8 88002282 10029140 c077c958 0000fff1

GPR16: c008f1c8 00000000 00000124 f1105d84 f1107d90 00000023 00000001 c07fa5bc

GPR24: ee294d40 c0840000 00000000 f110c000 ee630000 f1107ea0 f11087b8 f1107ea0

NIP [f110397c] _alloc_mpool+0x9c/0xa0 [linux_kernel_bde]

LR [f1103f84] _init+0x3b8/0x480 [linux_kernel_bde]

Call Trace:

[ee631d10] [f1107ea0] _ndevices+0x0/0xffffd098 [linux_kernel_bde] (unreliable)
[ee631d20] [f1103f84] _init+0x3b8/0x480 [linux_kernel_bde]
[ee631de0] [f110c09c] init_module+0x9c/0x178 [linux_kernel_bde]
[ee631df0] [c00021ec] do_one_initcall+0x150/0x1b8
[ee631e20] [c0091dac] load_module+0x17d8/0x1f5c
[ee631ee0] [c009261c] sys_init_module+0xec/0x14c
[ee631f40] [c000e1ac] ret_from_syscall+0x0/0x3c
--- Exception: c01 at 0xff2d0a8
    LR = 0xfd2a09c
Instruction dump:
4e800020 39200000 38600000 38800000 913f08e8 48001369 907f08f0 80010014
83e1000c 38210010 7c0803a6 4e800020 <0fe00000> 9421ffe0 7c0802a6 bf810010
---[ end trace cb7b757a4229e596 ]---

Trace/breakpoint trap
root@p2020:/media/ram#

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

Regards,

-Chandra

Labels (1)
0 Kudos
1 Solution
1,491 Views
scottwood
NXP Employee
NXP Employee

It is no longer allowed to use the DMA API with a NULL device.

Note that you should be contacting Broadcom for support for their code.

View solution in original post

0 Kudos
5 Replies
1,491 Views
scottwood
NXP Employee
NXP Employee

Where did you get the linux_kernel_bde module from?

0 Kudos
1,491 Views
chandrashekhar
Contributor III


Hi Scott,

After further investigation, I  found the crash happens while calling the method "dma_alloc_coherent()". Below is the code snippet for the call in linux-kernel-bde module,

         dma_addr_t dma_handle;

            if (!(_dma_vbase = dma_alloc_coherent(0, alloc_size, &dma_handle, GFP_KERNEL)) || !dma_handle) {

                gprintk("_alloc_mpool: Kernel failed to allocate the memory pool of size 0x%lx\n", (unsigned long)alloc_size);

                return;

            }

Can you provide some idea what could be the reason for failure here?

Thanks,

-Chandra

0 Kudos
1,492 Views
scottwood
NXP Employee
NXP Employee

It is no longer allowed to use the DMA API with a NULL device.

Note that you should be contacting Broadcom for support for their code.

0 Kudos
1,491 Views
chandrashekhar
Contributor III

Thanks Scott. I will check with Broadcom team over this issue.

0 Kudos
1,491 Views
chandrashekhar
Contributor III

Hi Scott,

linux_kernel_bde is kernel module compiled from Broadcom SDK for their chips.

-Chandra

0 Kudos