Changeset 297 for soft/giet_vm/giet_drivers/bdv_driver.c
- Timestamp:
- Mar 28, 2014, 10:48:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/bdv_driver.c
r295 r297 304 304 unsigned int lpid = procid % NB_PROCS_MAX; 305 305 306 // acknowledge WTI in local XCU if required 307 unsigned int value; 308 if ( irq_type == IRQ_TYPE_WTI ) _xcu_get_wti_value( cluster_xy, irq_id, &value ); 309 310 // save status in _bdv_status variable and reset IRQ 311 _bdv_status = _bdv_get_register( BLOCK_DEVICE_STATUS ); 306 // get BDV status (and reset IRQ) 307 unsigned int status = _bdv_get_register( BLOCK_DEVICE_STATUS ); 308 309 // check status: does nothing if IDLE or BUSY 310 if ( (status == BLOCK_DEVICE_IDLE) || 311 (status == BLOCK_DEVICE_BUSY) ) return; 312 313 // reset WTI in XCU if WTI type 314 if ( irq_type == IRQ_TYPE_WTI ) 315 { 316 unsigned int value; 317 _xcu_get_wti_value( cluster_xy, irq_id, &value ); 318 } 319 320 // save status in kernel buffer _bdv_status 321 _bdv_status = status; 312 322 313 323 // identify task waiting on BDV … … 315 325 unsigned int ltid = _bdv_gtid & 0xFFFF; 316 326 unsigned int remote_xy = rprocid / NB_PROCS_MAX; 327 328 // re-activates sleeping task 329 _set_task_slot( rprocid, // global processor index 330 ltid, // local task index on processor 331 CTX_RUN_ID, // CTX_RUN slot 332 1 ); // running 333 334 // requires a context switch for remote processor running the waiting task 335 _xcu_send_wti( remote_xy, // cluster index 336 lpid, // local processor index 337 0 ); // don't force context switch if not idle 317 338 318 339 #if GIET_DEBUG_IRQS // we don't take the TTY lock to avoid deadlock … … 343 364 #endif 344 365 345 // re-activates sleeping task346 _set_task_slot( rprocid, // global processor index347 ltid, // local task index on processor348 CTX_RUN_ID, // CTX_RUN slot349 1 ); // running350 351 // requires a context switch for remote processor running the waiting task352 _xcu_send_wti( remote_xy, // cluster index353 lpid, // local processor index354 0 ); // don't force context switch if not idle355 366 } 356 367
Note: See TracChangeset
for help on using the changeset viewer.