diff --git a/arch/x86/include/asm/icc.h b/arch/x86/include/asm/icc.h index cd059a42..56e29ca2 100644 --- a/arch/x86/include/asm/icc.h +++ b/arch/x86/include/asm/icc.h @@ -57,6 +57,7 @@ int icc_send_irq(int ue); void icc_mail_check(void); int icc_mail_ping(void); int icc_mail_ping_irq(void); +int icc_mail_noise(void); #endif diff --git a/arch/x86/scc/icc.c b/arch/x86/scc/icc.c index 2ef4ccfd..503250e1 100644 --- a/arch/x86/scc/icc.c +++ b/arch/x86/scc/icc.c @@ -271,11 +271,15 @@ int icc_mail_ping( void ) return 0; } +#define CORE_A 0 +#define CORE_B 1 +#define NOISE_ROUDNS 1000000 + int icc_mail_ping_irq( void ) { /* return if not core 0 */ - if( my_ue ) return 0; + if( my_ue != CORE_A ) return 0; uint32_t flags; uint64_t timer = 0; @@ -326,6 +330,31 @@ int icc_mail_ping_irq( void ) return 0; } + +int icc_mail_noise() { + int i, j; + int num_ranks = RCCE_num_ues(); + iRCCE_MAIL_HEADER* recv_mail = NULL; + + // leave function if not participating + if( (my_ue == 0) || (my_ue == 1) ) { + return -1; + } + + for( i=0; i