little changes
This commit is contained in:
parent
b3ee8f1a07
commit
8fac6ba205
2 changed files with 14 additions and 16 deletions
|
@ -218,7 +218,6 @@ int iRCCE_mail_check(int sender) {
|
|||
|
||||
/* disable interrupts */
|
||||
flags = irq_nested_disable();
|
||||
|
||||
|
||||
|
||||
// verify sender's ID
|
||||
|
@ -227,7 +226,10 @@ int iRCCE_mail_check(int sender) {
|
|||
iRCCE_mailbox_check();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* enable interrupts */
|
||||
irq_nested_enable(flags);
|
||||
|
||||
return iRCCE_ERROR_ID;
|
||||
}
|
||||
|
||||
|
@ -250,7 +252,6 @@ int iRCCE_mail_check(int sender) {
|
|||
return iRCCE_MAILBOX_EMPTY;
|
||||
}
|
||||
|
||||
|
||||
/* enable interrupts */
|
||||
irq_nested_enable(flags);
|
||||
}
|
||||
|
@ -291,8 +292,6 @@ int iRCCE_mail_recv(
|
|||
/* disable interrupts */
|
||||
flags = irq_nested_disable();
|
||||
|
||||
|
||||
|
||||
help_header = iRCCE_mailbox_recv_queue[i].first;
|
||||
|
||||
iRCCE_mailbox_recv_queue[i].first =
|
||||
|
|
|
@ -238,7 +238,7 @@ int icc_halt(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define ROUNDS 10000
|
||||
#define ROUNDS 100000
|
||||
#define CORE_A 0 // sender
|
||||
#define CORE_B 4 // receiver
|
||||
|
||||
|
@ -282,7 +282,7 @@ static inline void icc_mail_check_tag(iRCCE_MAIL_HEADER* mail) {
|
|||
break;
|
||||
|
||||
case NOISE:
|
||||
kprintf( "XXX " );
|
||||
// kprintf( "XXX " );
|
||||
default:
|
||||
// kprintf( "icc_mail_check_tag: uknown tag id %d\n", mail->tag );
|
||||
break;
|
||||
|
@ -412,8 +412,8 @@ int icc_mail_ping_irq( void )
|
|||
timer = rdtsc() - timer;
|
||||
|
||||
kprintf( "timer = %d\n", timer );
|
||||
kprintf( "mail_pingpong needs in average %d msec (%d ticks)!\n",
|
||||
timer/(2*ROUNDS*533), timer/(2*ROUNDS) );
|
||||
kprintf( "mail_pingpong needs in average %d nsec (%d ticks)!\n",
|
||||
timer*1000/(2*ROUNDS*533), timer/(2*ROUNDS) );
|
||||
|
||||
|
||||
irq_nested_enable(flags);
|
||||
|
@ -439,15 +439,15 @@ int icc_mail_noise() {
|
|||
kprintf( "Hello from icc_mail_noise: my_ue = %d\n", my_ue );
|
||||
kprintf( "num_ues = %d\n", num_ranks );
|
||||
int count = 0;
|
||||
for( ;; ) {
|
||||
kprintf( "SEND NOISE - " );
|
||||
for( ;; ++count ) {
|
||||
if( !(count%1000) ) kprintf( "STILL ALIVE! " );
|
||||
/* send a mail to each UE */
|
||||
for( j=0; j<num_ranks; ++j ) {
|
||||
if( (j == CORE_A) /*|| (j == CORE_B) */)
|
||||
if( (j == CORE_A) /*|| (j == CORE_B)*/ )
|
||||
continue;
|
||||
|
||||
/* send noise mail */
|
||||
iRCCE_mail_send(0, NOISE, 0, NULL, j);
|
||||
iRCCE_mail_send(0, NOISE, 1, NULL, j);
|
||||
#ifdef _IRQ_NOISE_
|
||||
icc_send_gic_irq(j);
|
||||
#endif
|
||||
|
@ -492,7 +492,7 @@ void icc_mail_check(int irq)
|
|||
flags = irq_nested_disable();
|
||||
|
||||
if( irq == 1 ) {
|
||||
for( i=0; i<2; ++i ) {
|
||||
// for( i=0; i<2; ++i ) {
|
||||
/* read status register */
|
||||
irq_status_reg = (volatile uint64_t*)(FPGA_BASE + IRQ_STATUS + my_ue*8);
|
||||
irq_status = irq_reset = *irq_status_reg;
|
||||
|
@ -511,8 +511,7 @@ void icc_mail_check(int irq)
|
|||
/* reset status register */
|
||||
irq_reset_reg = (volatile uint64_t*)(FPGA_BASE + IRQ_RESET + my_ue*8);
|
||||
*irq_reset_reg = irq_reset;
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
else {
|
||||
iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||
|
|
Loading…
Add table
Reference in a new issue