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

mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n

Include the DECstation interrupt handler in opting out of
FPU support.

Fixes a linker error:

mips-linux-ld: arch/mips/dec/int-handler.o: in function `fpu':
(.text+0x148): undefined reference to `handle_fpe_int'

Fixes: 183b40f992c8 ("MIPS: Allow FP support to be disabled")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Maciej W. Rozycki <macro@orcam.me.uk>
Cc: linux-mips@vger.kernel.org
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Randy Dunlap and committed by
Thomas Bogendoerfer
97bf0395 d17b6641

+5 -4
+3 -3
arch/mips/dec/int-handler.S
··· 131 131 */ 132 132 mfc0 t0,CP0_CAUSE # get pending interrupts 133 133 mfc0 t1,CP0_STATUS 134 - #ifdef CONFIG_32BIT 134 + #if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT) 135 135 lw t2,cpu_fpu_mask 136 136 #endif 137 137 andi t0,ST0_IM # CAUSE.CE may be non-zero! ··· 139 139 140 140 beqz t0,spurious 141 141 142 - #ifdef CONFIG_32BIT 142 + #if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT) 143 143 and t2,t0 144 144 bnez t2,fpu # handle FPU immediately 145 145 #endif ··· 280 280 j dec_irq_dispatch 281 281 nop 282 282 283 - #ifdef CONFIG_32BIT 283 + #if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT) 284 284 fpu: 285 285 lw t0,fpu_kstat_irq 286 286 nop
+2 -1
arch/mips/dec/setup.c
··· 746 746 dec_interrupt[DEC_IRQ_HALT] = -1; 747 747 748 748 /* Register board interrupts: FPU and cascade. */ 749 - if (dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) { 749 + if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT) && 750 + dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) { 750 751 struct irq_desc *desc_fpu; 751 752 int irq_fpu; 752 753