From: Daniel Hellstrom Date: Wed, 26 Jan 2011 06:37:05 +0000 (+0000) Subject: sparc32/leon: FPU-FSR only available when FPU present X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2666e476022c678b3758e753b20c22ca598dc73f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sparc32/leon: FPU-FSR only available when FPU present Signed-off-by: Daniel Hellstrom Acked-by: Sam Ravnborg Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 0dc714fa23d8..7925c54f4133 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c @@ -324,7 +324,7 @@ void __cpuinit cpu_probe(void) psr = get_psr(); put_psr(psr | PSR_EF); #ifdef CONFIG_SPARC_LEON - fpu_vers = 7; + fpu_vers = get_psr() & PSR_EF ? ((get_fsr() >> 17) & 0x7) : 7; #else fpu_vers = ((get_fsr() >> 17) & 0x7); #endif