minor optimizations
This commit is contained in:
parent
8e6b00b42e
commit
8f4349ee51
3 changed files with 28 additions and 23 deletions
|
@ -234,13 +234,7 @@ void irq_handler(struct state *s)
|
||||||
/* This is a blank function pointer */
|
/* This is a blank function pointer */
|
||||||
void (*handler) (struct state * s);
|
void (*handler) (struct state * s);
|
||||||
|
|
||||||
#ifdef CONFIG_ROCKCREEK
|
check_workqueues_with_irq(s->int_no);
|
||||||
// evaluate only irq status register if int_no = 124
|
|
||||||
if( s->int_no != 124 )
|
|
||||||
check_workqueues();
|
|
||||||
#else
|
|
||||||
check_workqueues();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find out if we have a custom handler to run for this
|
* Find out if we have a custom handler to run for this
|
||||||
|
|
|
@ -133,6 +133,8 @@ static void icc_handler(struct state *s)
|
||||||
rckemacif_handler(s, status_low);
|
rckemacif_handler(s, status_low);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if ((status_low >> 6) || status_high)
|
||||||
|
{
|
||||||
/* determine interrupt sources */
|
/* determine interrupt sources */
|
||||||
status = status_low;
|
status = status_low;
|
||||||
status >>= 6; // shift emac bits
|
status >>= 6; // shift emac bits
|
||||||
|
@ -148,6 +150,7 @@ static void icc_handler(struct state *s)
|
||||||
iRCCE_mail_check(source);
|
iRCCE_mail_check(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||||
|
|
||||||
tmp=ReadConfigReg(CRB_OWN + (z==0 ? GLCFG0 : GLCFG1));
|
tmp=ReadConfigReg(CRB_OWN + (z==0 ? GLCFG0 : GLCFG1));
|
||||||
tmp &= ~2;
|
tmp &= ~2;
|
||||||
|
@ -293,9 +296,9 @@ int icc_init(void)
|
||||||
int icc_halt(void)
|
int icc_halt(void)
|
||||||
{
|
{
|
||||||
icc_mail_check();
|
icc_mail_check();
|
||||||
NOP1;
|
//NOP1;
|
||||||
|
|
||||||
//HALT;
|
HALT;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,14 +200,22 @@ uint32_t get_highest_priority(void);
|
||||||
*/
|
*/
|
||||||
void reschedule(void);
|
void reschedule(void);
|
||||||
|
|
||||||
static inline void check_workqueues(void)
|
static inline void check_workqueues_with_irq(int irq)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ROCKCREEK
|
#ifdef CONFIG_ROCKCREEK
|
||||||
|
if (irq != 124)
|
||||||
icc_mail_check();
|
icc_mail_check();
|
||||||
#endif
|
#endif
|
||||||
|
if (irq < 0)
|
||||||
check_scheduling();
|
check_scheduling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void check_workqueues(void)
|
||||||
|
{
|
||||||
|
// call with invalid interrupt number
|
||||||
|
check_workqueues_with_irq(-1);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue