Changeset 435 for trunk/hal/tsar_mips32/drivers/soclib_pic.c
- Timestamp:
- Feb 20, 2018, 5:32:17 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r432 r435 130 130 &pti_status ); 131 131 132 irq_dmsg("\n[DBG] %s : core[%x,%d] enter / WTI = %x / HWI = %x / PTI = %x\n", 133 __FUNCTION__ , local_cxy , core->lid , wti_status , hwi_status , pti_status ); 132 #if CONFIG_DEBUG_HAL_IRQS 133 uint32_t cycle = (uint32_t)hal_get_cycles(); 134 if (CONFIG_DEBUG_HAL_IRQS < cycle ) 135 printk("\n[DBG] %s : core[%x,%d] enter / WTI = %x / HWI = %x / PTI = %x / cycle %d\n", 136 __FUNCTION__ , local_cxy , core->lid , wti_status , hwi_status , pti_status, cycle ); 137 #endif 134 138 135 139 // analyse status and handle up to 3 pending IRQ (one WTI, one HWI, one PTI) … … 143 147 assert( (index == core->lid) , __FUNCTION__ , "illegal IPI index" ); 144 148 145 irq_dmsg("\n[DBG] %s : core[%x,%d] received an IPI / cycle %d\n", 146 __FUNCTION__ , local_cxy , core->lid , hal_time_stamp() ); 147 149 #if CONFIG_DEBUG_HAL_IRQS 150 if (CONFIG_DEBUG_HAL_IRQS < cycle ) 151 printk("\n[DBG] %s : core[%x,%d] received an IPI\n", __FUNCTION__ , local_cxy , core->lid ); 152 #endif 148 153 // acknowledge WTI (this require an XCU read) 149 154 uint32_t ack = xcu_base[(XCU_WTI_REG << 5) | core->lid]; … … 171 176 else // call relevant ISR 172 177 { 173 irq_dmsg("\n[DBG] %s : core[%x,%d] received external WTI %d / cycle %d\n", 174 __FUNCTION__ , local_cxy , core->lid , index , hal_time_stamp() ); 175 178 179 #if CONFIG_DEBUG_HAL_IRQS 180 if (CONFIG_DEBUG_HAL_IRQS < cycle ) 181 printk("\n[DBG] %s : core[%x,%d] received external WTI %d\n", 182 __FUNCTION__ , local_cxy , core->lid , index ); 183 #endif 176 184 // call ISR 177 185 src_chdev->isr( src_chdev ); … … 199 207 else // call relevant ISR 200 208 { 201 irq_dmsg("\n[DBG] %s : core[%x,%d] received HWI %d / cycle %d\n", 202 __FUNCTION__ , local_cxy , core->lid , index , hal_time_stamp() ); 203 209 210 #if CONFIG_DEBUG_HAL_IRQS 211 if (CONFIG_DEBUG_HAL_IRQS < cycle ) 212 printk("\n[DBG] %s : core[%x,%d] received HWI %d\n", 213 __FUNCTION__ , local_cxy , core->lid , index ); 214 #endif 204 215 // call ISR 205 216 src_chdev->isr( src_chdev ); … … 211 222 index = pti_status - 1; 212 223 213 irq_dmsg("\n[DBG] %s : core[%x,%d] received PTI %d / cycle %d\n",214 __FUNCTION__ , core->lid , local_cxy , index , hal_time_stamp() );215 216 224 assert( (index == core->lid) , __FUNCTION__ , "unconsistent PTI index\n"); 217 225 226 #if CONFIG_DEBUG_HAL_IRQS 227 if (CONFIG_DEBUG_HAL_IRQS < cycle ) 228 printk("\n[DBG] %s : core[%x,%d] received PTI %d\n", 229 __FUNCTION__ , core->lid , local_cxy , index ); 230 #endif 218 231 // acknowledge PTI (this require a read access to XCU) 219 232 uint32_t ack = xcu_base[(XCU_PTI_ACK << 5) | core->lid]; … … 345 358 chdev_t * src_chdev ) 346 359 { 360 361 #if CONFIG_DEBUG_HAL_IRQS 362 uint32_t cycle = (uint32_t)hal_get_cycles(); 363 if( CONFIG_DEBUG_HAL_IRQS < cycle ) 364 printk("\n[DBG] %s : thread %x enter for core[%x,%d] / cycle %d\n", 365 __FUNCTION__ , CURRENT_THREAD , local_cxy , lid , cycle ); 366 #endif 367 347 368 // get extended & local pointers on PIC chdev descriptor 348 369 xptr_t pic_xp = chdev_dir.pic; … … 401 422 ((soclib_pic_core_t *)core->pic_extend)->wti_vector[wti_id] = src_chdev; 402 423 403 pic_dmsg("\n[DBG] %s : %s / channel = %d / rx = %d / hwi_id = %d / wti_id = %d / cluster = %x\n", 424 #if CONFIG_DEBUG_HAL_IRQS 425 if( CONFIG_DEBUG_HAL_IRQS < cycle ) 426 printk("\n[DBG] %s : %s / channel = %d / rx = %d / hwi_id = %d / wti_id = %d / cluster = %x\n", 404 427 __FUNCTION__ , chdev_func_str( func ) , channel , is_rx , hwi_id , wti_id , local_cxy ); 428 #endif 405 429 406 430 } … … 420 444 ((soclib_pic_core_t *)core->pic_extend)->wti_vector[hwi_id] = src_chdev; 421 445 422 pic_dmsg("\n[DBG] %s : %s / channel = %d / hwi_id = %d / cluster = %x\n", 446 #if CONFIG_DEBUG_HAL_IRQS 447 if( CONFIG_DEBUG_HAL_IRQS < cycle ) 448 printk("\n[DBG] %s : %s / channel = %d / hwi_id = %d / cluster = %x\n", 423 449 __FUNCTION__ , chdev_func_str( func ) , channel , hwi_id , local_cxy ); 450 #endif 424 451 425 452 }
Note: See TracChangeset
for help on using the changeset viewer.