Skip to content

Commit 97bf039

Browse files
rddunlaptsbogend
authored andcommitted
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: 183b40f ("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>
1 parent d17b664 commit 97bf039

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

arch/mips/dec/int-handler.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@
131131
*/
132132
mfc0 t0,CP0_CAUSE # get pending interrupts
133133
mfc0 t1,CP0_STATUS
134-
#ifdef CONFIG_32BIT
134+
#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
135135
lw t2,cpu_fpu_mask
136136
#endif
137137
andi t0,ST0_IM # CAUSE.CE may be non-zero!
138138
and t0,t1 # isolate allowed ones
139139

140140
beqz t0,spurious
141141

142-
#ifdef CONFIG_32BIT
142+
#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
143143
and t2,t0
144144
bnez t2,fpu # handle FPU immediately
145145
#endif
@@ -280,7 +280,7 @@ handle_it:
280280
j dec_irq_dispatch
281281
nop
282282

283-
#ifdef CONFIG_32BIT
283+
#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
284284
fpu:
285285
lw t0,fpu_kstat_irq
286286
nop

arch/mips/dec/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,8 @@ void __init arch_init_irq(void)
746746
dec_interrupt[DEC_IRQ_HALT] = -1;
747747

748748
/* 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) {
750751
struct irq_desc *desc_fpu;
751752
int irq_fpu;
752753

0 commit comments

Comments
 (0)