lkml.org 
[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 64 bit PCI access using MMX register -- how?
FromAndi Kleen <>
DateThu, 08 Jan 2009 06:52:30 +0100
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


\
 
 \ /
  Last update: 2009-01-08 06:55    [from the cache]
©2003-2008