bug fix
This commit is contained in:
parent
6892fa021a
commit
f7be10461b
1 changed files with 6 additions and 11 deletions
|
@ -401,25 +401,26 @@ int icc_mail_ping_irq( void )
|
|||
|
||||
|
||||
int icc_mail_noise() {
|
||||
int j, res, count = 0;
|
||||
int j, res;
|
||||
int num_ranks = RCCE_num_ues();
|
||||
iRCCE_MAIL_HEADER* recv_mail = NULL;
|
||||
|
||||
// leave function if not participating
|
||||
if( (my_ue == CORE_A) || (my_ue == CORE_B) ) {
|
||||
if( (my_ue == CORE_A) /*|| (my_ue == CORE_B)*/ ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
kprintf( "Hello from icc_mail_noise: my_ue = %d\n", my_ue );
|
||||
|
||||
for( ;; ) {
|
||||
count ++;
|
||||
kprintf( "%d ", count );
|
||||
/* send a mail to each UE */
|
||||
for( j=0; j<num_ranks; ++j ) {
|
||||
if( (j == CORE_A) || (j == CORE_B) )
|
||||
continue;
|
||||
|
||||
/* recv mails */
|
||||
iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||
|
||||
iRCCE_mail_send(0, 100, 0, NULL, j);
|
||||
res = iRCCE_mail_recv(&recv_mail);
|
||||
if( res == iRCCE_SUCCESS ) {
|
||||
|
@ -427,11 +428,9 @@ int icc_mail_noise() {
|
|||
iRCCE_mail_release(&recv_mail);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* recv mails */
|
||||
iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||
|
||||
/* read some mails */
|
||||
for( res = iRCCE_mail_recv(&recv_mail), j=0; (res == iRCCE_SUCCESS) && (j<48); res = iRCCE_mail_recv(&recv_mail), ++j ) {
|
||||
icc_mail_check_tag(recv_mail);
|
||||
|
@ -465,17 +464,13 @@ void icc_mail_check(void)
|
|||
irq_status_reg = (volatile uint64_t*)(FPGA_BASE + IRQ_STATUS + my_ue*8);
|
||||
irq_status = *irq_status_reg;
|
||||
|
||||
// kprintf( "irq_status = %d\n", irq_status );
|
||||
|
||||
/* determine interrupt sources */
|
||||
irq_status >>= 6; // shift emac bits
|
||||
|
||||
for( source = 0; irq_status != 0; irq_status >>= 1, ++source ) {
|
||||
if( (irq_status & 0x1) != 0 ) {
|
||||
// kprintf( "fetch mail from %d\n", source );
|
||||
// do {
|
||||
res = iRCCE_mail_check(source);
|
||||
// } while( res != iRCCE_SUCCESS );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue