Skip to content

Commit

Permalink
m68k: report correct FPU type on ColdFire MMU platforms
Browse files Browse the repository at this point in the history
Not all ColdFire SoC parts that have an MMU also have an FPU - so set
an FPU type (via m68k_fputype) appropriate for the configured platform.

With this set correctly /proc/cpuinfo will report FPU "none" on devices
that don't have one. And kernel code paths that initialize FPU hardware
will now only execute if an FPU is actually present.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
  • Loading branch information
Greg Ungerer committed Sep 26, 2016
1 parent 81d3335 commit cbd5b98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/m68k/coldfire/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ _clear_bss:
movel %d0,m68k_cputype /* Mark us as a ColdFire */
movel #MMU_COLDFIRE,%d0
movel %d0,m68k_mmutype
movel #FPU_COLDFIRE,%d0
movel %d0,m68k_fputype
movel #FPUTYPE,%d0
movel %d0,m68k_fputype /* Mark FPU type */
movel #MACHINE,%d0
movel %d0,m68k_machtype /* Mark machine type */
lea init_task,%a2 /* Set "current" init task */
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/m5441xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define CPU_INSTR_PER_JIFFY 2
#define MCF_BUSCLK (MCF_CLK / 2)
#define MACHINE MACH_M5441X
#define FPUTYPE 0

#include <asm/m54xxacr.h>

Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/m54xxsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define CPU_INSTR_PER_JIFFY 2
#define MCF_BUSCLK (MCF_CLK / 2)
#define MACHINE MACH_M54XX
#define FPUTYPE FPU_COLDFIRE

#include <asm/m54xxacr.h>

Expand Down

0 comments on commit cbd5b98

Please sign in to comment.