Skip to content

Commit

Permalink
m68k: only generate FPU instructions if CONFIG_FPU enabled
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
  • Loading branch information
Greg Ungerer committed Sep 26, 2016
1 parent 8912eac commit 6d3ec80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m68k/kernel/setup_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d3ec80

Please sign in to comment.