mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n
authorRandy Dunlap <rdunlap@infradead.org>
Fri, 4 Mar 2022 16:24:27 +0000 (08:24 -0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 7 Mar 2022 12:10:09 +0000 (13:10 +0100)
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>
arch/mips/dec/int-handler.S
arch/mips/dec/setup.c

index ea5b5a83f1e11b82fea00297ef50d966950a2d37..011d1d678840aa513166e0cfbf209bb975dc6a90 100644 (file)
                 */
                mfc0    t0,CP0_CAUSE            # get pending interrupts
                mfc0    t1,CP0_STATUS
-#ifdef CONFIG_32BIT
+#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
                lw      t2,cpu_fpu_mask
 #endif
                andi    t0,ST0_IM               # CAUSE.CE may be non-zero!
 
                beqz    t0,spurious
 
-#ifdef CONFIG_32BIT
+#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
                 and    t2,t0
                bnez    t2,fpu                  # handle FPU immediately
 #endif
@@ -280,7 +280,7 @@ handle_it:
                j       dec_irq_dispatch
                 nop
 
-#ifdef CONFIG_32BIT
+#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
 fpu:
                lw      t0,fpu_kstat_irq
                nop
index a8a30bb1dee8c1e1e65d4a822e0e7c8ef40016ca..82b00e45ce50a78cf48421ac15582e58d1c5915f 100644 (file)
@@ -746,7 +746,8 @@ void __init arch_init_irq(void)
                dec_interrupt[DEC_IRQ_HALT] = -1;
 
        /* Register board interrupts: FPU and cascade. */
-       if (dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) {
+       if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT) &&
+           dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) {
                struct irq_desc *desc_fpu;
                int irq_fpu;