This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x - Linux Kernel Panic when using OMAP Watchdog Module

Hi there! I'm trying to configure and enable watchdog in AM335x. I followed this guide: http://processors.wiki.ti.com/index.php/AM335x_PSP_WDT_Driver_User_Guide;

Anyone else noticed this issue?

[    0.490832] console [ttyO0] enabled
[    0.495093] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.502863] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.510671] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.518459] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.526245] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    0.535703] omap2_elm: probe of omap2_elm failed with error -22
[    0.542129] omap2-nand driver initializing
[    0.546844] ONFI flash detected
[    0.550252] ONFI param page 0 valid
[    0.553928] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xa1 (Micron MT29F1G08ABBDAH4)
[    0.562441] 6 cmdlinepart partitions found on MTD device omap2-nand.0
[    0.569246] Creating 6 MTD partitions on "omap2-nand.0":
[    0.574852] 0x000000000000-0x000000020000 : "SPL"
[    0.581172] 0x000000020000-0x0000000a0000 : "u-boot"
[    0.587890] 0x0000000a0000-0x000000300000 : "kernel"
[    0.595431] 0x000000300000-0x000001c00000 : "fs"
[    0.611888] 0x000001c00000-0x000002600000 : "drivers"
[    0.622640] 0x000002600000-0x000008000000 : "ubi"
[    0.666821] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e35034
[    0.674893] Internal error: : 1028 [#1] PREEMPT
[    0.679655] Modules linked in:
[    0.682873] CPU: 0    Not tainted  (3.2.61.UCC3.R2 #1)
[    0.688302] PC is at omap_wdt_disable+0xc/0x48
[    0.692985] LR is at omap_wdt_probe+0x4a4/0x5f4
[    0.697749] pc : [<c0183850>]    lr : [<c01fd260>]    psr: a0000013
[    0.697756] sp : c302bea0  ip : 00000000  fp : c302bf04
[    0.709824] r10: c302a000  r9 : c02ccc98  r8 : 00000000

  • Hi Arthur,

    Can you share the modifications you've done to the kernel sources?
    From the above log I see that the cause for kernel panic is:
    [ 0.666821] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e35034
    In my experience, these kind of errors occur, when a driver is trying to read/write to a non mapped (via MMU) memory space.
    You can track this fault by digging in the code of arch/arm/mm/fault.c, arch/arm/mm/fsr-2level.c, arch/arm/mm/fsr-3level.c and the abort-X.c.

    Best Regards,
    Yordan

  • Hi Yordan. Thank you for your post.

    Yes, the kernel panic is caused by a memory access error at 0xf9e35034.

    This occurs in Kernel/drivers/watchdog/omap_wdt.c, while executing the static void omap_wdt_disable(struct omap_wdt_dev *wdev). I was able to see this in my debugger.

    I tried recompiling my kernel using the /proc/config.gz from the AM335x EVM, surprisingly the watchdog module loaded OK.

    Is there any dependencies for this module?

    - Artur
  • Hi Artur,

    Artur Rodrigues said:
    Is there any dependencies for this module?

    I tested this on my BBB, and it didn't return any dependencies for omap_wdt: 

       root@am335x-evm:~# modprobe --show-depends omap_wdt
       builtin omap_wdt


    Best Regards, 
    Yordan

  • Yordan Kovachev said:

    Hi Artur,

    Artur Rodrigues
    Is there any dependencies for this module?

    I tested this on my BBB, and it didn't return any dependencies for omap_wdt: 

       root@am335x-evm:~# modprobe --show-depends omap_wdt
       builtin omap_wdt


    Best Regards, 
    Yordan

    It seems my problem is this one:

    https://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/202020

    To get the watchdog working, I had to enable in menuconfig:

    Power Management options ---> Run-Time PM core funcionality

    omap_wdt.c is actually using funcions from the linux/pm_runtime.h - that means it uses PM. When I de-select it PM before compiling, I believed that modules using it would continue to work (otherwise, they should be treated as dependencies)

    However, my project does not use PM. We have no intention to use it in the future. That said, is it possible to fully remove the PM from the omap-watchdog module?

    I also need to configure preemption like this:

    Kernel Features----> Preemption Model ----> (No Forced Preemption)

    Why full desktop preemption can not be used with the omap-watchdog?

    - Artur

  • Is there any update on this issue?