linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n
@ 2022-03-04  1:13 Randy Dunlap
  2022-03-04  9:07 ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2022-03-04  1:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: patches, Randy Dunlap, kernel test robot, Paul Burton,
	Thomas Bogendoerfer, Maciej W. Rozycki, linux-mips

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
---
This builds OK. Is it enough for runtime interrupt handling?

 arch/mips/dec/int-handler.S |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- mmotm-2022-0302-1653.orig/arch/mips/dec/int-handler.S
+++ mmotm-2022-0302-1653/arch/mips/dec/int-handler.S
@@ -139,7 +139,7 @@
 
 		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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n
  2022-03-04  1:13 [PATCH] mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n Randy Dunlap
@ 2022-03-04  9:07 ` Maciej W. Rozycki
  2022-03-04 15:34   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2022-03-04  9:07 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, patches, kernel test robot, Paul Burton,
	Thomas Bogendoerfer, linux-mips

On Thu, 3 Mar 2022, Randy Dunlap wrote:

> 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
> ---
> This builds OK. Is it enough for runtime interrupt handling?

 There's:

#ifdef CONFIG_32BIT
	lw	t2,cpu_fpu_mask
#endif

earlier on that needs to go too, and code in arch/mips/dec/setup.c below:

	/* Register board interrupts: FPU and cascade. */

(we don't want an unhandled interrupt unmasked).  Are you happy to do such 
an update or shall I?

 I cannot verify that change at run time, because any program that does FP 
will then crash.  Maybe init(8) and sulogin(8) won't.  I can check that.

 Thanks for doing this stuff!

  Maciej

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n
  2022-03-04  9:07 ` Maciej W. Rozycki
@ 2022-03-04 15:34   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2022-03-04 15:34 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: linux-kernel, patches, kernel test robot, Paul Burton,
	Thomas Bogendoerfer, linux-mips



On 3/4/22 01:07, Maciej W. Rozycki wrote:
> On Thu, 3 Mar 2022, Randy Dunlap wrote:
> 
>> 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
>> ---
>> This builds OK. Is it enough for runtime interrupt handling?
> 
>  There's:
> 
> #ifdef CONFIG_32BIT
> 	lw	t2,cpu_fpu_mask
> #endif
> 
> earlier on that needs to go too, and code in arch/mips/dec/setup.c below:
> 
> 	/* Register board interrupts: FPU and cascade. */
> 
> (we don't want an unhandled interrupt unmasked).  Are you happy to do such 
> an update or shall I?
> 
>  I cannot verify that change at run time, because any program that does FP 
> will then crash.  Maybe init(8) and sulogin(8) won't.  I can check that.
> 
>  Thanks for doing this stuff!

I'll update the patch and send v2.

thanks.

-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-04 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04  1:13 [PATCH] mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n Randy Dunlap
2022-03-04  9:07 ` Maciej W. Rozycki
2022-03-04 15:34   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).