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

Fix various bugs

File:
1 edited

Legend:

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

    r422 r437  
    22 * dev_pic.c - PIC (External Interrupt Controler) generic device API implementation.
    33 *
    4  * Authors   Alain Greiner  (2016)
     4 * Authors   Alain Greiner  (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    8686{
    8787
    88 irq_dmsg("\n[DBG] %s : core = [%x,%d] / src_chdev_cxy = %x / src_chdev_ptr = %x\n",
    89 __FUNCTION__ , local_cxy , lid , GET_CXY(src_chdev_xp) , GET_PTR(src_chdev_xp) );
     88#if CONFIG_DEBUG_DEV_PIC
     89uint32_t cycle = (uint32_t)hal_get_cycles();
     90if( CONFIG_DEBUG_DEV_PIC < cycle )
     91printk("\n[DBG] %s : core[%x,%d] / src_chdev_cxy %x / src_chdev_ptr %x / cycle %d\n",
     92__FUNCTION__, local_cxy, lid, GET_CXY(src_chdev_xp), GET_PTR(src_chdev_xp), cycle );
     93#endif
    9094
    9195    // get pointer on PIC chdev
     
    105109{
    106110
    107 irq_dmsg("\n[DBG] %s : core = [%x,%d] / src_chdev_cxy = %x / src_chdev_ptr = %x\n",
    108 __FUNCTION__ , local_cxy , lid , GET_CXY(src_chdev_xp) , GET_PTR(src_chdev_xp) );
     111#if CONFIG_DEBUG_DEV_PIC
     112uint32_t cycle = (uint32_t)hal_get_cycles();
     113if( CONFIG_DEBUG_DEV_PIC < cycle )
     114printk("\n[DBG] %s : core[%x,%d] / src_chdev_cxy %x / src_chdev_ptr %x / cycle %d\n",
     115__FUNCTION__, local_cxy, lid, GET_CXY(src_chdev_xp), GET_PTR(src_chdev_xp), cycle );
     116#endif
    109117
    110118    // get pointer on PIC chdev
     
    123131{
    124132
    125 irq_dmsg("\n[DBG] %s : core = [%x,%d] / period = %d\n",
    126 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , period );
     133#if CONFIG_DEBUG_DEV_PIC
     134uint32_t cycle = (uint32_t)hal_get_cycles();
     135if( CONFIG_DEBUG_DEV_PIC < cycle )
     136printk("\n[DBG] %s : core[%x,%d] / period %d / cycle %d\n",
     137__FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , period, cycle );
     138#endif
    127139
    128140    // get pointer on PIC chdev
     
    141153{
    142154
    143 irq_dmsg("\n[DBG] %s : core = [%x,%d] / cycle %d\n",
    144 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() );
     155#if CONFIG_DEBUG_DEV_PIC
     156uint32_t cycle = (uint32_t)hal_get_cycles();
     157if( CONFIG_DEBUG_DEV_PIC < cycle )
     158printk("\n[DBG] %s : core[%x,%d] / cycle %d\n",
     159__FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , cycle );
     160#endif
    145161
    146162    // get pointer on PIC chdev
     
    160176{
    161177
    162 irq_dmsg("\n[DBG] %s : src_core = [%x,%d] / dst_core = [%x,%d] / cycle %d\n",
    163 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, hal_time_stamp() );
     178#if CONFIG_DEBUG_DEV_PIC
     179uint32_t cycle = (uint32_t)hal_get_cycles();
     180if( CONFIG_DEBUG_DEV_PIC < cycle )
     181printk("\n[DBG] %s : src_core[%x,%d] / dst_core[%x,%d] / cycle %d\n",
     182__FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, cycle );
     183#endif
    164184
    165185    // get pointer on PIC chdev
     
    178198{
    179199
    180 irq_dmsg("\n[DBG] %s : core = [%x,%d] / cycle %d\n",
    181 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, hal_time_stamp() );
     200#if CONFIG_DEBUG_DEV_PIC
     201uint32_t cycle = (uint32_t)hal_get_cycles();
     202if( CONFIG_DEBUG_DEV_PIC < cycle )
     203printk("\n[DBG] %s : core[%x,%d] / cycle %d\n",
     204__FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cycle );
     205#endif
    182206
    183207    // get pointer on PIC chdev
Note: See TracChangeset for help on using the changeset viewer.