Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Cleanup the unused __arch_local_irq_restore() function

In history, __arch_local_irq_restore() is only used by SMTC. However,
SMTC support has been removed since 3.16, this patch remove the unused
function.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12159/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Huacai Chen and committed by
Ralf Baechle
6e526844 503943e0

+1 -59
-30
arch/mips/include/asm/irqflags.h
··· 84 84 : "memory"); 85 85 } 86 86 87 - static inline void __arch_local_irq_restore(unsigned long flags) 88 - { 89 - __asm__ __volatile__( 90 - " .set push \n" 91 - " .set noreorder \n" 92 - " .set noat \n" 93 - #if defined(CONFIG_IRQ_MIPS_CPU) 94 - /* 95 - * Slow, but doesn't suffer from a relatively unlikely race 96 - * condition we're having since days 1. 97 - */ 98 - " beqz %[flags], 1f \n" 99 - " di \n" 100 - " ei \n" 101 - "1: \n" 102 - #else 103 - /* 104 - * Fast, dangerous. Life is fun, life is good. 105 - */ 106 - " mfc0 $1, $12 \n" 107 - " ins $1, %[flags], 0, 1 \n" 108 - " mtc0 $1, $12 \n" 109 - #endif 110 - " " __stringify(__irq_disable_hazard) " \n" 111 - " .set pop \n" 112 - : [flags] "=r" (flags) 113 - : "0" (flags) 114 - : "memory"); 115 - } 116 87 #else 117 88 /* Functions that require preempt_{dis,en}able() are in mips-atomic.c */ 118 89 void arch_local_irq_disable(void); 119 90 unsigned long arch_local_irq_save(void); 120 91 void arch_local_irq_restore(unsigned long flags); 121 - void __arch_local_irq_restore(unsigned long flags); 122 92 #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ 123 93 124 94 static inline void arch_local_irq_enable(void)
+1 -29
arch/mips/lib/mips-atomic.c
··· 57 57 } 58 58 EXPORT_SYMBOL(arch_local_irq_disable); 59 59 60 - 61 60 notrace unsigned long arch_local_irq_save(void) 62 61 { 63 62 unsigned long flags; ··· 110 111 } 111 112 EXPORT_SYMBOL(arch_local_irq_restore); 112 113 113 - 114 - notrace void __arch_local_irq_restore(unsigned long flags) 115 - { 116 - unsigned long __tmp1; 117 - 118 - preempt_disable(); 119 - 120 - __asm__ __volatile__( 121 - " .set push \n" 122 - " .set noreorder \n" 123 - " .set noat \n" 124 - " mfc0 $1, $12 \n" 125 - " andi %[flags], 1 \n" 126 - " ori $1, 0x1f \n" 127 - " xori $1, 0x1f \n" 128 - " or %[flags], $1 \n" 129 - " mtc0 %[flags], $12 \n" 130 - " " __stringify(__irq_disable_hazard) " \n" 131 - " .set pop \n" 132 - : [flags] "=r" (__tmp1) 133 - : "0" (flags) 134 - : "memory"); 135 - 136 - preempt_enable(); 137 - } 138 - EXPORT_SYMBOL(__arch_local_irq_restore); 139 - 140 - #endif /* !CONFIG_CPU_MIPSR2 */ 114 + #endif /* !CONFIG_CPU_MIPSR2 && !CONFIG_CPU_MIPSR6 */