Ignore:
Timestamp:
Mar 28, 2018, 2:40:29 PM (4 years ago)
Author:
alain
Message:

Fix various bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_dma.c

    r408 r437  
    22 * dev_dma.c - DMA (Interrupt Controler Unit) generic device API implementation.
    33 *
    4  * Authors   Alain Greiner  (2017)
     4 * Authors   Alain Greiner  (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    9090    thread_t * this = CURRENT_THREAD;
    9191
    92     dma_dmsg("\n[DBG] %s : enters for thread %x / dst = %l /src = %l / size = %x\n",
    93               __FUNCTION__ , this->trdid , dst_xp , src_xp , size );
     92#if CONGIG_DEBUG_DEV_DMA
     93uint32_t cycle = (uint32_t)hal_get_cycles();
     94if( CONGIG_DEBUG_DEV_DMA < cycle )
     95printk("\n[DBG] %s : thread %x enters / dst %l / src %l / size = %x\n",
     96__FUNCTION__ , this, dst_xp, src_xp, size );
     97#endif
    9498
    9599    // select DMA channel corresponding to core lid
     
    112116    chdev_register_command( dev_xp );
    113117
    114     dma_dmsg("\n[DBG] %s : completes for thread %x / error = %d\n",
    115              __FUNCTION__ ,  this->trdid , this->dma_cmd.error );
     118#if CONGIG_DEBUG_DEV_DMA
     119cycle = (uint32_t)hal_get_cycles();
     120if( CONGIG_DEBUG_DEV_DMA < cycle )
     121printk("\n[DBG] %s : thread %x exit / dst %l / src %l / size = %x\n",
     122__FUNCTION__ , this, dst_xp, src_xp, size );
     123#endif
    116124
    117125    // return I/O operation status from calling thread descriptor
Note: See TracChangeset for help on using the changeset viewer.