Re: [PATCH] SPARC/LEON: FPU-FSR only available when FPU present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, 26 Jan 2011 21:36:58  0100, Sam Ravnborg  wrote:
On Wed, Jan 26, 2011 at 05:37:05PM  0100, Daniel Hellstrom wrote:
 > > Signed-off-by: Daniel Hellstrom <daniel@xxxxxxxxxxx>
 > > ---
 > >  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 0dc714f..7925c54 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
 >
> This file is full of numbers. > But for new stuff it would be great with symbolic constants. >
 > I also do wonder if your new version could be
 > used for non-leon?
> PSR_EF say if the FPU is enabled or not. > If it is disabled can we then trust the FSR.ver field?
 >
 Â
 Â
That got me thinking before as well. I spoke yearlier on the subject with Jiri Gaisler, who is the most knowlegable I met on sparcs, and he said that it might be needed by old sparc machines and that newer onse all have FPU anyway. Of course I agree with you, reading the manual led me to the same conclusion. It is a bit of a contradiction in the manual since it states that FSR.ver should return 0x7 (all pull-up high...) when no FPU is present. Â To conclude I think we should not change this behaviour. Please accept this simple patch that make /proc/cpuinfo work again on LEON... :)
 Â
 Thanks,
 Â
 Daniel

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux