fix irq reset
This commit is contained in:
parent
c5befddfdf
commit
0d4ff65bcb
4 changed files with 25 additions and 28 deletions
|
@ -235,7 +235,7 @@ void irq_handler(struct state *s)
|
|||
void (*handler) (struct state * s);
|
||||
|
||||
// evaluate only irq status register if int_no = 124
|
||||
if( s->int_no == 124 ) {
|
||||
if( s->int_no == 124 ) {
|
||||
check_workqueues_rem_irq();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -317,9 +317,6 @@ int iRCCE_mail_recv(
|
|||
// no mail queued
|
||||
*header = NULL;
|
||||
|
||||
/* enable interrupts */
|
||||
irq_nested_enable(flags);
|
||||
|
||||
return iRCCE_MAILBOX_EMPTY;
|
||||
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ int icc_halt(void)
|
|||
|
||||
#define ROUNDS 10000
|
||||
#define CORE_A 0 // sender
|
||||
#define CORE_B 4 // receiver
|
||||
#define CORE_B 1 // receiver
|
||||
|
||||
|
||||
int icc_send_gic_irq(int core_num) {
|
||||
|
@ -362,15 +362,16 @@ int icc_mail_ping( void )
|
|||
|
||||
int icc_mail_ping_irq( void )
|
||||
{
|
||||
kprintf( "Hello from mail_ping_irq ... \n" );
|
||||
/* return if not core A */
|
||||
if( my_ue != CORE_A ) return 0;
|
||||
|
||||
uint32_t flags;
|
||||
uint64_t timer = 0;
|
||||
int i;
|
||||
int res;
|
||||
iRCCE_MAIL_HEADER* recv_header = NULL;
|
||||
|
||||
kprintf( "Hello from mail_ping_irq ... \n" );
|
||||
kprintf( "my_rank = %d\n", my_ue );
|
||||
kprintf( "rem_rank = %d\n", CORE_B );
|
||||
kprintf( "rounds = %d\n", ROUNDS );
|
||||
|
@ -411,48 +412,49 @@ int icc_mail_ping_irq( void )
|
|||
}
|
||||
|
||||
|
||||
#define _iRQ_NOISE_ 0
|
||||
|
||||
int icc_mail_noise() {
|
||||
int i, j, res;
|
||||
int num_ranks = RCCE_num_ues();
|
||||
iRCCE_MAIL_HEADER* recv_mail = NULL;
|
||||
int flags;
|
||||
|
||||
/*
|
||||
// leave function if not participating
|
||||
if( (my_ue == CORE_A) /* || (my_ue == CORE_B) */ || (my_ue > 25) ) {
|
||||
if( (my_ue == CORE_A) || (my_ue == CORE_B) || (my_ue > 25) ) {
|
||||
kprintf( "mail_noise: leaving" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
*/
|
||||
if( !((my_ue == CORE_A) || (my_ue == CORE_B) ) ) {
|
||||
kprintf( "mail_noise: leaving" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
kprintf( "Hello from icc_mail_noise: my_ue = %d\n", my_ue );
|
||||
kprintf( "num_ues = %d\n", num_ranks );
|
||||
int count = 0;
|
||||
for( i=0; i<100000 ;++i ) {
|
||||
/* send a mail to each UE */
|
||||
for( j=0; j<num_ranks; ++j ) {
|
||||
if( (j == CORE_A) || /*(j == CORE_B) || */(j > 25) )
|
||||
if( !((j == CORE_A) || (j == CORE_B)) )
|
||||
continue;
|
||||
|
||||
/* send noise mail */
|
||||
iRCCE_mail_send(0, NOISE, 1, NULL, j);
|
||||
|
||||
#ifdef _IRQ_NOISE_
|
||||
icc_send_gic_irq(j);
|
||||
|
||||
NOP8;
|
||||
NOP8;
|
||||
NOP8;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/* read some mails
|
||||
if( !(i%1000) ) {
|
||||
iRCCE_mail_send(0, NOISE, 0, NULL, j);
|
||||
}
|
||||
|
||||
|
||||
#ifndef _IRQ_NOISE_
|
||||
iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||
#endif
|
||||
/* read some mails */
|
||||
while( iRCCE_mail_recv(&recv_mail) == iRCCE_SUCCESS ) {
|
||||
icc_mail_check_tag(recv_mail);
|
||||
iRCCE_mail_release(&recv_mail);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -505,12 +507,10 @@ void icc_mail_check(int irq)
|
|||
}
|
||||
|
||||
/* empty mail queue */
|
||||
i=0;
|
||||
// while( (i<10) && (res = iRCCE_mail_recv(&header)) == iRCCE_SUCCESS) {
|
||||
iRCCE_mail_recv(&header);
|
||||
while( iRCCE_mail_recv(&header) == iRCCE_SUCCESS ) {
|
||||
icc_mail_check_tag(header);
|
||||
iRCCE_mail_release( &header );
|
||||
// }
|
||||
}
|
||||
|
||||
/* enable interrupts */
|
||||
irq_nested_enable(flags);
|
||||
|
|
|
@ -280,7 +280,7 @@ int test_init(void)
|
|||
//create_kernel_task(NULL, producer, NULL);
|
||||
//create_kernel_task(NULL, consumer, NULL);
|
||||
create_kernel_task(NULL, mail_ping, NULL);
|
||||
create_kernel_task(NULL, mail_noise, NULL);
|
||||
// create_kernel_task(NULL, mail_noise, NULL);
|
||||
//create_user_task(NULL, "/bin/hello", argv);
|
||||
//create_user_task(NULL, "/bin/tests", argv);
|
||||
//create_user_task(NULL, "/bin/jacobi", argv);
|
||||
|
|
Loading…
Add table
Reference in a new issue