Skip to contentSkip to conversation

m68k: only generate FPU instructions if CONFIG_FPU enabled

PATCH In review Greg Ungerer 2 participants 3 messages Aug 30, 2016 – Aug 31, 2016 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH v2 7/8 m68k: only generate FPU instructions if CONFIG_FPU enabled

Most of the m68k code that supports a hardware FPU is surrounded by CONFIG_FPU. Be consistent and surround the hardware FPU instruction setup in setup_mm.c with CONFIG_FPU as well as the check for CONFIG_M68KFPU_EMU_ONLY.

The existing classic m68k architectures all define CONFIG_FPU, so they see no change from this. But on ColdFire where we do not support the emulated FP code we can now compile without CONFIG_FPU being set as well.

---
 arch/m68k/kernel/setup_mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/kernel/setup_mm.c +1 -1
index 13f4640..adbb806 100644
@@ -245,7 +245,7 @@ void __init setup_arch(char **cmdline_p)
 	 * We should really do our own FPU check at startup.
 	 * [what do we do with buggy 68LC040s? if we have problems
 	 *  with them, we should add a test to check_bugs() below] */
-#ifndef CONFIG_M68KFPU_EMU_ONLY
+#if defined(CONFIG_FPU) && !defined(CONFIG_M68KFPU_EMU_ONLY)
 	/* clear the fpu if we have one */
 	if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060|FPU_COLDFIRE)) {
 		volatile int zero = 0;
Signature · 1 line
1.9.1
#1 lore raw

Hi Greg,

Quoted 10 lines · Greg Ungerer

Most of the m68k code that supports a hardware FPU is surrounded by CONFIG_FPU. Be consistent and surround the hardware FPU instruction setup in setup_mm.c with CONFIG_FPU as well as the check for CONFIG_M68KFPU_EMU_ONLY.

The existing classic m68k architectures all define CONFIG_FPU, so they see no change from this. But on ColdFire where we do not support the emulated FP code we can now compile without CONFIG_FPU being set as well.

Thanks for the update. Series looks good to me now.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw

Hi Geert,

Quoted 8 lines · Geert Uytterhoeven

Hi Greg,

Quoted 5 lines · Greg Ungerer

Most of the m68k code that supports a hardware FPU is surrounded by CONFIG_FPU. Be consistent and surround the hardware FPU instruction setup in setup_mm.c with CONFIG_FPU as well as the check for CONFIG_M68KFPU_EMU_ONLY.

Quoted 7 lines
Quoted 5 lines

The existing classic m68k architectures all define CONFIG_FPU, so they see no change from this. But on ColdFire where we do not support the emulated FP code we can now compile without CONFIG_FPU being set as well.

Thanks for the update. Series looks good to me now.

Thanks for the review. I'll push it into the for-next branch of the m68knommu tree (if you have no problem with it going upstream via that tree).

Regards
Greg