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.

Linux/OMAP-L138: DSP missing interrupts when ARM does file writes in Linux

Part Number: OMAP-L138
Other Parts Discussed in Thread: DA8XX, TL16C554, PMP

Tool/software: Linux

We are using Omap l138 with arm running Linux (kernel 3.3) and DSP running TI-RTOS with Syslink. When arm does a file write it seems that DSP is unable to handle interrupts. We are unable to find the reason for this. It is seems as  DSP is slowing down or freeze at the moment of writing. 

What could be the reason for this? 

Best regards and thanks in advance

  • Do you get any console output when this happens?
    Can you share bootlog, maybe there is something wrong with your setup that you've missed.

    Best Regards,
    Yordan
  • MMC: davinci: 0
    Bad block table found at page 262080, version 0x01
    Bad block table found at page 262016, version 0x01
    *** Warning - bad CRC, using default environment

    In: serial
    Out: serial
    Err: serial
    ARM Clock : 456 MHz
    DDR Clock : 300 MHz
    Net: DaVinci-EMAC
    Hit any key to stop autoboot: 0

    NAND read: device 0 offset 0x4a0000, size 0x800000
    8388608 bytes read: OK

    NAND read: device 0 offset 0xa0000, size 0x400000
    4194304 bytes read: OK
    ## Booting kernel from Legacy Image at c0700000 ...
    Image Name: Linux-3.3.0
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2699096 Bytes = 2.6 MiB
    Load Address: c0008000
    Entry Point: c0008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0
    Linux version 3.3.0 (xxxxx@ML310e) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #153 PREEMPT Tue Feb 6 14:13:52 KST 2018
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: AM18x/OMAP-L138 lcdk board
    Memory policy: ECC disabled, Data cache writeback
    BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space
    DaVinci da850/omap-l138/am18x variant 0x1
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 58880
    Kernel command line: console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,8M mem=32M@0xc0000000 mem=200M@0xc3800000
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 32MB 200MB = 232MB total
    Memory: 221652k/221652k available, 15916k reserved, 0K highmem
    Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
    lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    .text : 0xc0008000 - 0xc0501000 (5092 kB)
    .init : 0xc0501000 - 0xc052e000 ( 180 kB)
    .data : 0xc052e000 - 0xc0560000 ( 200 kB)
    .bss : 0xc0560024 - 0xc057d933 ( 119 kB)
    SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    Setting up static identity map for 0xc03d4950 - 0xc03d49a8
    devtmpfs: initialized
    gpiochip_add: registered GPIOs 0 to 31 on device: DaVinci
    gpiochip_add: registered GPIOs 32 to 63 on device: DaVinci
    gpiochip_add: registered GPIOs 64 to 95 on device: DaVinci
    gpiochip_add: registered GPIOs 96 to 127 on device: DaVinci
    gpiochip_add: registered GPIOs 128 to 143 on device: DaVinci
    DaVinci: 144 gpio irqs
    print_constraints: dummy:
    NET: Registered protocol family 16
    EMAC: MII PHY configured
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL)
    Advanced Linux Sound Architecture Driver Version 1.0.24.
    cfg80211: Calling CRDA to update world regulatory domain
    Switching to clocksource timer0_1
    musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    musb-hdrc musb-hdrc: dma type: pio
    MUSB255 controller's USBSS revision = 4ea11003
    Waiting for USB PHY clock good...
    musb-hdrc musb-hdrc: USB OTG mode controller at fee00000 using PIO, IRQ 58
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Trying to unpack rootfs image as initramfs...
    rootfs image is not initramfs (no cpio magic); looks like an initrd
    Freeing initrd memory: 8192K
    JFFS2 version 2.2. (NAND) ⓒ 2001-2006 Red Hat, Inc.
    msgmni has been set to 448
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
    io scheduler noop registered (default)
    da8xx_lcdc da8xx_lcdc.0: GLCD: Found VGA_Monitor panel
    Console: switching to colour frame buffer device 80x30
    Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a AR7
    serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a AR7
    serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a AR7
    console [ttyS2] enabled
    mgkim: tl16c554_probe
    tl16c554-uart.0: ttyS3 at MMIO 0x66000400 (irq = 126) is a 16550A
    tl16c554-uart.0: ttyS4 at MMIO 0x66000800 (irq = 127) is a 16550A
    tl16c554-uart.0: ttyS5 at MMIO 0x66000c00 (irq = 128) is a 16550A
    tl16c554-uart.0: ttyS6 at MMIO 0x66001000 (irq = 129) is a 16550A
    brd: module loaded
    mgkim: swpwm_init
    mgkim: SW-PWM Timer2 rate 150000000
    timer_2: 0x1f0c000
    TIMER32 Config
    ahci ahci: forcing PORTS_IMPL to 0x1
    ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
    ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc
    scsi0 : ahci_platform
    ata1: SATA max UDMA/133 mmio [mem 0x01e18000-0x01e19fff] port 0x100 irq 67
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xcc (Micron NAND 512MiB 3,3V 16-bit)
    Bad block table found at page 262080, version 0x01
    Bad block table found at page 262016, version 0x01
    Creating 5 MTD partitions on "davinci_nand.1":
    0x000000000000-0x000000020000 : "u-boot env"
    0x000000020000-0x0000000a0000 : "u-boot"
    0x0000000a0000-0x0000004a0000 : "kernel"
    0x0000004a0000-0x000000ca0000 : "ramdisk"
    0x000000ca0000-0x000020000000 : "filesystem"
    davinci_nand davinci_nand.1: controller rev. 2.5
    spi_davinci spi_davinci.0: DMA: supported
    spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
    spi_davinci spi_davinci.0: Controller at 0xfec41000
    spi_davinci spi_davinci.1: DMA: supported
    spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
    spi_davinci spi_davinci.1: Controller at 0xfef0e000
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
    davinci_mdio davinci_mdio.0: detected phy mask ffffffc0
    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio-0:00, driver unknown
    davinci_mdio davinci_mdio.0: phy[1]: device davinci_mdio-0:01, driver unknown
    davinci_mdio davinci_mdio.0: phy[2]: device davinci_mdio-0:02, driver unknown
    davinci_mdio davinci_mdio.0: phy[3]: device davinci_mdio-0:03, driver unknown
    davinci_mdio davinci_mdio.0: phy[4]: device davinci_mdio-0:04, driver unknown
    davinci_mdio davinci_mdio.0: phy[5]: device davinci_mdio-0:05, driver unknown
    ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    ohci ohci.0: DA8xx OHCI
    ohci ohci.0: new USB bus registered, assigned bus number 1
    Waiting for USB PHY clock good...
    ohci ohci.0: irq 59, io mem 0x01e25000
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    ata1: SATA link down (SStatus 0 SControl 300)
    USB Mass Storage support registered.
    input: gpio-keys-polled as /devices/platform/gpio-keys-polled.0/input/input0
    rtc-ds1307 1-0068: rtc core: registered ds1339 as rtc0
    omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc1
    omap_rtc: RTC power up reset detected
    i2c /dev entries driver
    watchdog watchdog: heartbeat 60 sec
    cpuidle: using governor ladder
    cpuidle: using governor menu
    davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    usbcore: registered new interface driver snd-usb-audio
    ALSA device list:
    No soundcards found.
    TCP cubic registered
    NET: Registered protocol family 17
    8021q: 802.1Q VLAN Support v1.8
    lib80211: common routines for IEEE802.11 drivers
    console [netcon0] enabled
    netconsole: network logging started
    davinci_emac davinci_emac.1: using random MAC addr: e6:35:4c:64:a3:28
    rtc-ds1307 1-0068: setting system clock to 2018-08-14 18:21:19 UTC (1534270879)
    RAMDISK: gzip image found at block 0
    VFS: Mounted root (ext2 filesystem) on device 1:0.
    Freeing init memory: 180K
    INIT: version 2.88 booting
    Starting udev
    Starting Bootlog daemon: bootlogd.
    yaffs: dev is 32505860 name is "mtdblock4" rw
    yaffs: passed flags ""
    INIT: Entering runlevel: 5
    Starting telnet daemon.
    Starting syslogd/klogd: done
    Stopping Bootlog daemon: bootlogd.

  • This is our boot log. we don't get any error message at the time it occurs. Because this happens when we are testing a GPIO pin through oscilloscope.
  • Because this happens when we are testing a GPIO pin through oscilloscope.


    Can you elaborate? This happens when you connect a scope probe to the GPIO pin? or when you change the state of the pin?

    If this happens when you change the state of the pin is this managed by ARM or by DSP?

    Best Regards,
    Yordan
  • According to our design, that gpio is managed by the dsp and it should provide a periodic signal. In normal situations it works fine. but when the arm is doing a file write on NAND the DSP seems to be affected and the gpio signal looses it's timing as if dsp is slowing down or missing interrupts. We are running both ARM and the DSP at 456MHz.
  • Ok, I suspect the IPC is stalling the irqs between arm & dsp for some reason. What happens if you lower the frequency of the periodic signal on gpio? Does it still changes when ARM is doing nand writes?

    Best Regards,
    Yordan

  • Seems like you are right, however it still has an effect on the DSP when arm is busy. we need to keep the frequency of the signal constant and we are planning to change the way we handle interrupts on DSP. Are Syslink IPC interrupts handled in ISR manner or as a usual Hwi in Sys/bios?
  • Hi, Salinda,

    Syslink is no longer supported, nor Linux kernel 3.3. Please upgrade to the latest Processor SDK 5.0/Kernel 4.14/ipc_3_47_02_00.

    Rex