diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2011-01-26 01:37:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:19:05 -0400 |
commit | 2666e476022c678b3758e753b20c22ca598dc73f (patch) | |
tree | 63703a00065e35c6898e5cc36fb81826fad6f938 /arch | |
parent | 7279b82cb1975ba4e337a549757f17418cfdffad (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
324 | psr = get_psr(); | 324 | psr = get_psr(); |
325 | put_psr(psr | PSR_EF); | 325 | put_psr(psr | PSR_EF); |
326 | #ifdef CONFIG_SPARC_LEON | 326 | #ifdef CONFIG_SPARC_LEON |
327 | fpu_vers = 7; | 327 | fpu_vers = get_psr() & PSR_EF ? ((get_fsr() >> 17) & 0x7) : 7; |
328 | #else | 328 | #else |
329 | fpu_vers = ((get_fsr() >> 17) & 0x7); | 329 | fpu_vers = ((get_fsr() >> 17) & 0x7); |
330 | #endif | 330 | #endif |