Browse Source

sparc32/leon: FPU-FSR only available when FPU present

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Hellstrom 14 years ago
parent
commit
2666e47602
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/sparc/kernel/cpu.c

+ 1 - 1
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