Commit f4f7d86b authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle

MIPS: lib: mips-atomic.c: Remove obsolete ifdefery

Having #ifdefs just to guard comments is not really helpful
so drop them. Moreover, the code wasn't really reached anyway
since there is a #ifndef CONFIG_CPU_MIPSR2 on the top of the file.
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8513/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent da85e364
...@@ -42,15 +42,11 @@ notrace void arch_local_irq_disable(void) ...@@ -42,15 +42,11 @@ notrace void arch_local_irq_disable(void)
__asm__ __volatile__( __asm__ __volatile__(
" .set push \n" " .set push \n"
" .set noat \n" " .set noat \n"
#if defined(CONFIG_CPU_MIPSR2)
/* see irqflags.h for inline function */
#else
" mfc0 $1,$12 \n" " mfc0 $1,$12 \n"
" ori $1,0x1f \n" " ori $1,0x1f \n"
" xori $1,0x1f \n" " xori $1,0x1f \n"
" .set noreorder \n" " .set noreorder \n"
" mtc0 $1,$12 \n" " mtc0 $1,$12 \n"
#endif
" " __stringify(__irq_disable_hazard) " \n" " " __stringify(__irq_disable_hazard) " \n"
" .set pop \n" " .set pop \n"
: /* no outputs */ : /* no outputs */
...@@ -72,15 +68,11 @@ notrace unsigned long arch_local_irq_save(void) ...@@ -72,15 +68,11 @@ notrace unsigned long arch_local_irq_save(void)
" .set push \n" " .set push \n"
" .set reorder \n" " .set reorder \n"
" .set noat \n" " .set noat \n"
#if defined(CONFIG_CPU_MIPSR2)
/* see irqflags.h for inline function */
#else
" mfc0 %[flags], $12 \n" " mfc0 %[flags], $12 \n"
" ori $1, %[flags], 0x1f \n" " ori $1, %[flags], 0x1f \n"
" xori $1, 0x1f \n" " xori $1, 0x1f \n"
" .set noreorder \n" " .set noreorder \n"
" mtc0 $1, $12 \n" " mtc0 $1, $12 \n"
#endif
" " __stringify(__irq_disable_hazard) " \n" " " __stringify(__irq_disable_hazard) " \n"
" .set pop \n" " .set pop \n"
: [flags] "=r" (flags) : [flags] "=r" (flags)
...@@ -103,18 +95,12 @@ notrace void arch_local_irq_restore(unsigned long flags) ...@@ -103,18 +95,12 @@ notrace void arch_local_irq_restore(unsigned long flags)
" .set push \n" " .set push \n"
" .set noreorder \n" " .set noreorder \n"
" .set noat \n" " .set noat \n"
#if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU)
/* see irqflags.h for inline function */
#elif defined(CONFIG_CPU_MIPSR2)
/* see irqflags.h for inline function */
#else
" mfc0 $1, $12 \n" " mfc0 $1, $12 \n"
" andi %[flags], 1 \n" " andi %[flags], 1 \n"
" ori $1, 0x1f \n" " ori $1, 0x1f \n"
" xori $1, 0x1f \n" " xori $1, 0x1f \n"
" or %[flags], $1 \n" " or %[flags], $1 \n"
" mtc0 %[flags], $12 \n" " mtc0 %[flags], $12 \n"
#endif
" " __stringify(__irq_disable_hazard) " \n" " " __stringify(__irq_disable_hazard) " \n"
" .set pop \n" " .set pop \n"
: [flags] "=r" (__tmp1) : [flags] "=r" (__tmp1)
...@@ -136,18 +122,12 @@ notrace void __arch_local_irq_restore(unsigned long flags) ...@@ -136,18 +122,12 @@ notrace void __arch_local_irq_restore(unsigned long flags)
" .set push \n" " .set push \n"
" .set noreorder \n" " .set noreorder \n"
" .set noat \n" " .set noat \n"
#if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU)
/* see irqflags.h for inline function */
#elif defined(CONFIG_CPU_MIPSR2)
/* see irqflags.h for inline function */
#else
" mfc0 $1, $12 \n" " mfc0 $1, $12 \n"
" andi %[flags], 1 \n" " andi %[flags], 1 \n"
" ori $1, 0x1f \n" " ori $1, 0x1f \n"
" xori $1, 0x1f \n" " xori $1, 0x1f \n"
" or %[flags], $1 \n" " or %[flags], $1 \n"
" mtc0 %[flags], $12 \n" " mtc0 %[flags], $12 \n"
#endif
" " __stringify(__irq_disable_hazard) " \n" " " __stringify(__irq_disable_hazard) " \n"
" .set pop \n" " .set pop \n"
: [flags] "=r" (__tmp1) : [flags] "=r" (__tmp1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment