Re: 64 bit PCI access using MMX register -- how?

From: Andi Kleen
Date: Thu Jan 08 2009 - 00:52:46 EST


Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/