Skip to content
Snippets Groups Projects
Commit b8ebda1a authored by patacongo's avatar patacongo
Browse files

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
parent 004a4420
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -83,7 +83,7 @@ irqstate_t irqsave(void)
status &= ~CP0_STATUS_IM_MASK; /* Clear all interrupt mask bits */
status |= CP0_STATUS_IM_SWINTS; /* Keep S/W interrupts enabled */
cp0_putstatus(status); /* Disable interrupts */
return ret; /* Return status before interrtupts disabled */
return ret; /* Return status before interrupts disabled */
}
/****************************************************************************
......
......@@ -136,16 +136,19 @@ void up_irqinitialize(void)
/* And finally, enable interrupts */
#ifndef CONFIG_SUPPRESS_INTERRUPTS
/* Interrupts are enabled by setting the IE bit in the CP0 status register */
regval = 0;
asm volatile("ei %0" : "=r"(regval));
#ifndef CONFIG_SUPPRESS_INTERRUPTS
/* Then enable all interrupt levels */
irqrestore(CP0_STATUS_IM_ALL);
#else
/* Enable only software interrupts */
irqrestore(CP0_STATUS_IM_SWINTS);
#endif
}
......
......@@ -52,8 +52,10 @@ namespace std
using ::size_t;
using ::strchr;
using ::strdup;
using ::strndup;
using ::strerror;
using ::strlen;
using ::strnlen;
using ::strcat;
using ::strncat;
using ::strcmp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment