Changeset 657 for soft/giet_vm/giet_drivers/sdc_driver.c
- Timestamp:
- Jul 22, 2015, 5:36:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.