Fix some MIPS software interrupt enabling issues

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4067 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-10-29 02:29:13 +00:00
parent 64fba1740e
commit 44dc775b08
3 changed files with 581 additions and 578 deletions

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ irqstate_t irqsave(void)
status &= ~CP0_STATUS_IM_MASK; /* Clear all interrupt mask bits */ status &= ~CP0_STATUS_IM_MASK; /* Clear all interrupt mask bits */
status |= CP0_STATUS_IM_SWINTS; /* Keep S/W interrupts enabled */ status |= CP0_STATUS_IM_SWINTS; /* Keep S/W interrupts enabled */
cp0_putstatus(status); /* Disable interrupts */ cp0_putstatus(status); /* Disable interrupts */
return ret; /* Return status before interrtupts disabled */ return ret; /* Return status before interrupts disabled */
} }
/**************************************************************************** /****************************************************************************

View File

@ -136,16 +136,19 @@ void up_irqinitialize(void)
/* And finally, enable interrupts */ /* And finally, enable interrupts */
#ifndef CONFIG_SUPPRESS_INTERRUPTS
/* Interrupts are enabled by setting the IE bit in the CP0 status register */ /* Interrupts are enabled by setting the IE bit in the CP0 status register */
regval = 0; regval = 0;
asm volatile("ei %0" : "=r"(regval)); asm volatile("ei %0" : "=r"(regval));
#ifndef CONFIG_SUPPRESS_INTERRUPTS
/* Then enable all interrupt levels */ /* Then enable all interrupt levels */
irqrestore(CP0_STATUS_IM_ALL); irqrestore(CP0_STATUS_IM_ALL);
#else
/* Enable only software interrupts */
irqrestore(CP0_STATUS_IM_SWINTS);
#endif #endif
} }