public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Om <om.turyx@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: 64 bit PCI access using MMX register -- how?
Date: Thu, 08 Jan 2009 06:52:30 +0100	[thread overview]
Message-ID: <8763kqxs2p.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20090107233929.60ef8d98@lxorguk.ukuu.org.uk> (Alan Cox's message of "Wed, 7 Jan 2009 23:39:29 +0000")

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> One other problem: the kernel doesn't save the FPU state on context
> switches or IRQ entry (takes far too long) so that will make a nasty mess.


I think he was ok because he saved the MMX state by itself, except:

- There was no guarantee that the FPU is in MMX state, not x87 state
- He'll often get a lazy fpu save exception. This used to BUG() 
in some cases when invoked from kernel space (but that might have been
changed now). Better is to disable this explicitely around 
the access (like in kernel_fpu_begin()/end())
- Doing this all properly is fairly expensive and I suspect
just using a lock will be cheaper.

-Andi


-- 
ak@linux.intel.com

  reply	other threads:[~2009-01-08  5:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 23:03 64 bit PCI access using MMX register -- how? Om
2009-01-07 23:39 ` Alan Cox
2009-01-08  5:52   ` Andi Kleen [this message]
2009-01-08  6:46     ` Roland Dreier

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=8763kqxs2p.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=om.turyx@gmail.com \
    /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