Handle the race in cpu_idle() when due to the critical section CPU could get
into sleep after receiving interrupt, delaying interrupt thread execution indefinitely until the next interrupt arrive. Reviewed by: nwhitehorn MFC after: 3 days
This commit is contained in:
parent
5f8ad41c0d
commit
9081a9b2c3
@ -553,6 +553,11 @@ cpu_idle_60x(void)
|
||||
vers = mfpvr() >> 16;
|
||||
|
||||
#ifdef AIM
|
||||
mtmsr(msr & ~PSL_EE);
|
||||
if (sched_runnable()) {
|
||||
mtmsr(msr);
|
||||
return;
|
||||
}
|
||||
switch (vers) {
|
||||
case IBM970:
|
||||
case IBM970FX:
|
||||
@ -583,6 +588,11 @@ cpu_idle_e500(void)
|
||||
msr = mfmsr();
|
||||
|
||||
#ifdef E500
|
||||
mtmsr(msr & ~PSL_EE);
|
||||
if (sched_runnable()) {
|
||||
mtmsr(msr);
|
||||
return;
|
||||
}
|
||||
/* Freescale E500 core RM section 6.4.1. */
|
||||
__asm __volatile("msync; mtmsr %0; isync" ::
|
||||
"r" (msr | PSL_WE));
|
||||
|
Loading…
x
Reference in New Issue
Block a user