diff options
author | Greg Ungerer <gerg@linux-m68k.org> | 2016-08-25 09:12:22 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@linux-m68k.org> | 2016-09-25 22:02:58 -0400 |
commit | cbd5b982f6a1540ebb0144774d64381e7b2d39fd (patch) | |
tree | 75d26823fb8bfd1d4120b4b83adcfd7c3818ef0e | |
parent | 81d33350bab8b6889ac0f9c98bce58128be1c72d (diff) |
m68k: report correct FPU type on ColdFire MMU platforms
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>
-rw-r--r-- | arch/m68k/coldfire/head.S | 4 | ||||
-rw-r--r-- | arch/m68k/include/asm/m5441xsim.h | 1 | ||||
-rw-r--r-- | arch/m68k/include/asm/m54xxsim.h | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/m68k/coldfire/head.S b/arch/m68k/coldfire/head.S index 4ba5d5628067..bdb472c48401 100644 --- a/arch/m68k/coldfire/head.S +++ b/arch/m68k/coldfire/head.S | |||
@@ -280,8 +280,8 @@ _clear_bss: | |||
280 | movel %d0,m68k_cputype /* Mark us as a ColdFire */ | 280 | movel %d0,m68k_cputype /* Mark us as a ColdFire */ |
281 | movel #MMU_COLDFIRE,%d0 | 281 | movel #MMU_COLDFIRE,%d0 |
282 | movel %d0,m68k_mmutype | 282 | movel %d0,m68k_mmutype |
283 | movel #FPU_COLDFIRE,%d0 | 283 | movel #FPUTYPE,%d0 |
284 | movel %d0,m68k_fputype | 284 | movel %d0,m68k_fputype /* Mark FPU type */ |
285 | movel #MACHINE,%d0 | 285 | movel #MACHINE,%d0 |
286 | movel %d0,m68k_machtype /* Mark machine type */ | 286 | movel %d0,m68k_machtype /* Mark machine type */ |
287 | lea init_task,%a2 /* Set "current" init task */ | 287 | lea init_task,%a2 /* Set "current" init task */ |
diff --git a/arch/m68k/include/asm/m5441xsim.h b/arch/m68k/include/asm/m5441xsim.h index 60768b5973db..4279c0df0844 100644 --- a/arch/m68k/include/asm/m5441xsim.h +++ b/arch/m68k/include/asm/m5441xsim.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define CPU_INSTR_PER_JIFFY 2 | 11 | #define CPU_INSTR_PER_JIFFY 2 |
12 | #define MCF_BUSCLK (MCF_CLK / 2) | 12 | #define MCF_BUSCLK (MCF_CLK / 2) |
13 | #define MACHINE MACH_M5441X | 13 | #define MACHINE MACH_M5441X |
14 | #define FPUTYPE 0 | ||
14 | 15 | ||
15 | #include <asm/m54xxacr.h> | 16 | #include <asm/m54xxacr.h> |
16 | 17 | ||
diff --git a/arch/m68k/include/asm/m54xxsim.h b/arch/m68k/include/asm/m54xxsim.h index cde03902da24..7dd6cc4bcd72 100644 --- a/arch/m68k/include/asm/m54xxsim.h +++ b/arch/m68k/include/asm/m54xxsim.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define CPU_INSTR_PER_JIFFY 2 | 9 | #define CPU_INSTR_PER_JIFFY 2 |
10 | #define MCF_BUSCLK (MCF_CLK / 2) | 10 | #define MCF_BUSCLK (MCF_CLK / 2) |
11 | #define MACHINE MACH_M54XX | 11 | #define MACHINE MACH_M54XX |
12 | #define FPUTYPE FPU_COLDFIRE | ||
12 | 13 | ||
13 | #include <asm/m54xxacr.h> | 14 | #include <asm/m54xxacr.h> |
14 | 15 | ||