MIPS: Make DIEI support as a config option
DI(Disable Interrupt) and EI(Enable Interrupt) instructions is required by MIPSR2/MIPSR6, however, it appears to be buggy on some processors such as Loongson-3A1000. Thus we make it as a config option to allow disable it at compile time with CPU_MIPSR2 selected. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: linux-kernel@vger.kernel.org
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include <asm/compiler.h>
|
||||
#include <asm/hazards.h>
|
||||
|
||||
#if defined(CONFIG_CPU_MIPSR2) || defined (CONFIG_CPU_MIPSR6)
|
||||
#if defined(CONFIG_CPU_HAS_DIEI)
|
||||
|
||||
static inline void arch_local_irq_disable(void)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ static inline void arch_local_irq_restore(unsigned long flags)
|
||||
void arch_local_irq_disable(void);
|
||||
unsigned long arch_local_irq_save(void);
|
||||
void arch_local_irq_restore(unsigned long flags);
|
||||
#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
|
||||
#endif /* CONFIG_CPU_HAS_DIEI */
|
||||
|
||||
static inline void arch_local_irq_enable(void)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ static inline void arch_local_irq_enable(void)
|
||||
" .set push \n"
|
||||
" .set reorder \n"
|
||||
" .set noat \n"
|
||||
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
|
||||
#if defined(CONFIG_CPU_HAS_DIEI)
|
||||
" ei \n"
|
||||
#else
|
||||
" mfc0 $1,$12 \n"
|
||||
|
Reference in New Issue
Block a user