All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Hellstrom <daniel@gaisler.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] SPARC/LEON: FPU-FSR only available when FPU present
Date: Thu, 27 Jan 2011 11:06:27 +0000	[thread overview]
Message-ID: <4D4151B3.9030807@gaisler.com> (raw)
In-Reply-To: <1296059825-22822-1-git-send-email-daniel@gaisler.com>

Sam Ravnborg wrote:

>On Wed, Jan 26, 2011 at 05:37:05PM +0100, Daniel Hellstrom wrote:
>  
>
>>Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
>>---
>> 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.
>  
>
Please ack this patch, and see the follow up patch doing some cleaning 
of PSR/FSR code.

>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?
>  
>
see discussion in other email.

Daniel

  parent reply	other threads:[~2011-01-27 11:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 16:37 [PATCH] SPARC/LEON: FPU-FSR only available when FPU present Daniel Hellstrom
2011-01-26 20:36 ` Sam Ravnborg
2011-01-26 21:08 ` daniel
2011-01-27 11:06 ` Daniel Hellstrom [this message]
2011-01-27 17:29 ` Sam Ravnborg
2011-01-28 23:07 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D4151B3.9030807@gaisler.com \
    --to=daniel@gaisler.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.