Changeset 657 for soft/giet_vm/giet_drivers
- Timestamp:
- Jul 22, 2015, 5:36:05 PM (9 years ago)
- Location:
- soft/giet_vm/giet_drivers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/bdv_driver.c
r630 r657 171 171 // Set NORUN_MASK_IOC bit 172 172 static_scheduler_t* psched = (static_scheduler_t*)_schedulers[x][y][p]; 173 unsigned int* ptr = &psched->context[ltid][CTX_NORUN_ID]; 174 _atomic_or( ptr , NORUN_MASK_IOC ); 173 _atomic_or( &psched->context[ltid][CTX_NORUN_ID] , NORUN_MASK_IOC ); 175 174 176 175 // launch transfer -
soft/giet_vm/giet_drivers/hba_driver.c
r630 r657 98 98 /////////////////////////////////////////////////////////////////////////////// 99 99 // This blocking fonction allocates a free command index to the task. 100 // The hba_allocator_lock is used exceptin boot mode.100 // The hba_allocator_lock is not used in boot mode. 101 101 // It returns the allocated command index (between 0 and 31) 102 102 /////////////////////////////////////////////////////////////////////////////// … … 448 448 // Reset NORUN_MASK_IOC bit 449 449 static_scheduler_t* psched = (static_scheduler_t*)_schedulers[x][y][p]; 450 unsigned int* ptr = &psched->context[ltid][CTX_NORUN_ID]; 451 _atomic_and( ptr , ~NORUN_MASK_IOC ); 450 _atomic_and( &psched->context[ltid][CTX_NORUN_ID] , ~NORUN_MASK_IOC ); 452 451 453 452 // send a WAKUP WTI to processor running the waiting task -
soft/giet_vm/giet_drivers/sdc_driver.c
r630 r657 484 484 for ( current = _ahci_cmd_ptr ; current != _ahci_cmd_ptw ; current++ ) 485 485 { 486 unsigned int ptr= current & 0x1F;486 unsigned int cmd_id = current & 0x1F; 487 487 488 if ( (pxci & (1<< ptr)) == 0 ) // command completed488 if ( (pxci & (1<<cmd_id)) == 0 ) // command completed 489 489 { 490 490 // increment the 32 bits variable _ahci_cmd_ptr … … 492 492 493 493 // save AHCI_PXIS register 494 _ahci_status[ ptr] = _sdc_get_register( AHCI_PXIS );494 _ahci_status[cmd_id] = _sdc_get_register( AHCI_PXIS ); 495 495 496 496 // reset AHCI_PXIS register … … 498 498 499 499 // identify waiting task 500 unsigned int procid = _ahci_gtid[ ptr]>>16;501 unsigned int ltid = _ahci_gtid[ ptr] & 0xFFFF;500 unsigned int procid = _ahci_gtid[cmd_id]>>16; 501 unsigned int ltid = _ahci_gtid[cmd_id] & 0xFFFF; 502 502 unsigned int cluster = procid >> P_WIDTH; 503 503 unsigned int x = cluster >> Y_WIDTH; … … 507 507 // Reset NORUN_MASK_IOC bit 508 508 static_scheduler_t* psched = (static_scheduler_t*)_schedulers[x][y][p]; 509 unsigned int* ptr = &psched->context[ltid][CTX_NORUN_ID]; 510 _atomic_and( ptr , ~NORUN_MASK_IOC ); 509 _atomic_and( &psched->context[ltid][CTX_NORUN_ID] , ~NORUN_MASK_IOC ); 511 510 512 511 // send a WAKUP WTI to processor running the waiting task … … 519 518 _printf("\n[DEBUG SDC] _sdc_isr() : command %d completed at cycle %d\n" 520 519 " resume task %d running on P[%d,%d,%d] / status = %x\n", 521 ptr, _get_proctime() ,522 ltid , x , y , p , _ahci_status[ ptr] );520 cmd_id , _get_proctime() , 521 ltid , x , y , p , _ahci_status[cmd_id] ); 523 522 #endif 524 523 }
Note: See TracChangeset
for help on using the changeset viewer.