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;
|
vers = mfpvr() >> 16;
|
||||||
|
|
||||||
#ifdef AIM
|
#ifdef AIM
|
||||||
|
mtmsr(msr & ~PSL_EE);
|
||||||
|
if (sched_runnable()) {
|
||||||
|
mtmsr(msr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (vers) {
|
switch (vers) {
|
||||||
case IBM970:
|
case IBM970:
|
||||||
case IBM970FX:
|
case IBM970FX:
|
||||||
@ -583,6 +588,11 @@ cpu_idle_e500(void)
|
|||||||
msr = mfmsr();
|
msr = mfmsr();
|
||||||
|
|
||||||
#ifdef E500
|
#ifdef E500
|
||||||
|
mtmsr(msr & ~PSL_EE);
|
||||||
|
if (sched_runnable()) {
|
||||||
|
mtmsr(msr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* Freescale E500 core RM section 6.4.1. */
|
/* Freescale E500 core RM section 6.4.1. */
|
||||||
__asm __volatile("msync; mtmsr %0; isync" ::
|
__asm __volatile("msync; mtmsr %0; isync" ::
|
||||||
"r" (msr | PSL_WE));
|
"r" (msr | PSL_WE));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user