Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <KevinK@mips.com>
To: "Ralf Baechle" <ralf@linux-mips.org>,
	"Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Cc: <linux-mips@linux-mips.org>
Subject: Re: preempt safe fpu-emulator
Date: Thu, 28 Apr 2005 06:58:28 -0700	[thread overview]
Message-ID: <002d01c54bfa$5b913f80$0deca8c0@Ulysses> (raw)
In-Reply-To: 20050428134118.GC1276@linux-mips.org

When I first integrated the Algorithmics emulator with the Linux kernel
several years back, I tried doing something like this but ran into some
problem that I cannot recall exactly - there may have been some case
where the system expected threads to "inherit" FCSR changes.  I agree
that this is an obviously cleaner approach, but be careful.

            Regards,

            Kevin K.

----- Original Message ----- 
From: "Ralf Baechle" <ralf@linux-mips.org>
To: "Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Cc: <linux-mips@linux-mips.org>
Sent: Thursday, April 28, 2005 6:41 AM
Subject: Re: preempt safe fpu-emulator


> On Wed, Apr 27, 2005 at 02:36:22PM +0900, Atsushi Nemoto wrote:
> 
> > Hi.  Here is a patch to make the fpu-emulator preempt-safe.  It would
> > be SMP-safe also.
> > 
> > The 'ieee754_csr' global variable is removed.  Now the 'ieee754_csr'
> > is an alias of current->thread.fpu.soft.fcr31.  While the fpu-emulator
> > uses different mapping for RM bits (FPU_CSR_Rm vs. IEEE754_Rm), RM
> > bits are converted before (and after) calling of cop1Emulate().  If we
> > adjusted IEEE754_Rm to match with FPU_CSR_Rm, we can remove ieee_rm[]
> > and mips_rm[].  Should we do it?
> > 
> > With this patch, whole fpu-emulator can be run without disabling
> > preempt.  I will post a patch to fix preemption issue soon.
> 
> I applied both your patches with some slight cleanup for the endianess
> stuff in arch/mips/math-emu/ieee754.h and non-Linux stuff.
> 
>   Ralf
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: "Kevin D. Kissell" <KevinK@mips.com>
To: Ralf Baechle <ralf@linux-mips.org>, Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Subject: Re: preempt safe fpu-emulator
Date: Thu, 28 Apr 2005 06:58:28 -0700	[thread overview]
Message-ID: <002d01c54bfa$5b913f80$0deca8c0@Ulysses> (raw)
Message-ID: <20050428135828.bJhMfFhcLm5TEFHp42eelSRA6830ezK-rSS2OpXamTA@z> (raw)
In-Reply-To: 20050428134118.GC1276@linux-mips.org

When I first integrated the Algorithmics emulator with the Linux kernel
several years back, I tried doing something like this but ran into some
problem that I cannot recall exactly - there may have been some case
where the system expected threads to "inherit" FCSR changes.  I agree
that this is an obviously cleaner approach, but be careful.

            Regards,

            Kevin K.

----- Original Message ----- 
From: "Ralf Baechle" <ralf@linux-mips.org>
To: "Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Cc: <linux-mips@linux-mips.org>
Sent: Thursday, April 28, 2005 6:41 AM
Subject: Re: preempt safe fpu-emulator


> On Wed, Apr 27, 2005 at 02:36:22PM +0900, Atsushi Nemoto wrote:
> 
> > Hi.  Here is a patch to make the fpu-emulator preempt-safe.  It would
> > be SMP-safe also.
> > 
> > The 'ieee754_csr' global variable is removed.  Now the 'ieee754_csr'
> > is an alias of current->thread.fpu.soft.fcr31.  While the fpu-emulator
> > uses different mapping for RM bits (FPU_CSR_Rm vs. IEEE754_Rm), RM
> > bits are converted before (and after) calling of cop1Emulate().  If we
> > adjusted IEEE754_Rm to match with FPU_CSR_Rm, we can remove ieee_rm[]
> > and mips_rm[].  Should we do it?
> > 
> > With this patch, whole fpu-emulator can be run without disabling
> > preempt.  I will post a patch to fix preemption issue soon.
> 
> I applied both your patches with some slight cleanup for the endianess
> stuff in arch/mips/math-emu/ieee754.h and non-Linux stuff.
> 
>   Ralf
> 
> 

  reply	other threads:[~2005-04-28 14:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-27  5:36 preempt safe fpu-emulator Atsushi Nemoto
2005-04-27  5:46 ` Atsushi Nemoto
2005-04-27 10:49   ` New Forum for support of RB500 (MIPS board) John Tully
2005-04-28 13:41 ` preempt safe fpu-emulator Ralf Baechle
2005-04-28 13:58   ` Kevin D. Kissell [this message]
2005-04-28 13:58     ` Kevin D. Kissell
2005-04-28 15:21     ` Ralf Baechle
2005-04-28 15:25       ` Maciej W. Rozycki
2005-04-28 15:33         ` Ralf Baechle
2005-04-28 15:34           ` Ralf Baechle
2005-04-28 16:06       ` Kevin D. Kissell
2005-04-28 16:06         ` Kevin D. Kissell
2005-04-29 13:40         ` Atsushi Nemoto
2005-04-30 14:36   ` Atsushi Nemoto

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='002d01c54bfa$5b913f80$0deca8c0@Ulysses' \
    --to=kevink@mips.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox