m68k: report correct FPU type on ColdFire MMU platforms
authorGreg Ungerer <gerg@linux-m68k.org>
Thu, 25 Aug 2016 13:12:22 +0000 (23:12 +1000)
committerGreg Ungerer <gerg@linux-m68k.org>
Mon, 26 Sep 2016 02:02:58 +0000 (12:02 +1000)
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>
arch/m68k/coldfire/head.S
arch/m68k/include/asm/m5441xsim.h
arch/m68k/include/asm/m54xxsim.h

index 4ba5d56280674a6f7ecef92c219196888c2e1a1f..bdb472c48401d791eb6cb7ca1886dec417a1880b 100644 (file)
@@ -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 */
index 60768b5973dbe46e76a5d49111072ab2c7ef3f49..4279c0df0844d3c2fe28079c7a79a2791daa990b 100644 (file)
@@ -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>
 
index cde03902da24e5daf0ec248b86e6ea8e317d232f..7dd6cc4bcd72810232bd387a3e1a09c46387cac2 100644 (file)
@@ -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>