Date: Mon, 05 Aug 2002 13:09:16 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: "John S. Bucy" <bucy@ece.cmu.edu> Cc: freebsd-hackers@freebsd.org Subject: Re: weird npxintr Message-ID: <3D4EDB6C.A339167F@mindspring.com> References: <20020805182753.GD494@catalepsy.pdl.cmu.edu> <3D4EC913.528452C2@mindspring.com> <20020805191440.GE494@catalepsy.pdl.cmu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
"John S. Bucy" wrote: > Err ... our code is getting called from dadone which gets called up > from swi_cambio which is the soft interrupt handler, right? The software interrupt handler runs any time you call splx() to unset the SPL level back to nothing from a raised SPL. This is not limited to happening when you have a valid current process. > By copy, do you mean bcopy/memcpy or load/store to a register? bcopy/memcopy/uiomove/copyin/copyout > We're certainly not in the middle of a bcopy when we get the interrupt... > > Again, I'm fairly certain that we aren't touching any fp registers or > issuing any fp instructions. You are if the kernel is running any one of those kernel supplied functions, whether you think you are or not. In general, the FPU exceptions happen only on the next instruction following an exception, not at the time of the exception itself. This lets them pipeline integer and floating point instructions (it's a cheap way out of making the hardware do the right thing). So you appear to be loading an MMX register after there has been an exception, without an intervening context switch to cause the exception to be sent to the correct process (the "curproc = 0" is a dead give away here). I know GCC 2.95 doesn't do this; since you are posting on the -hackers list instead of the -current list, I guess you are not running current, so you aren't running GCC 3.1, right? I don't know what GCC 3.1 does; one way to tell would be to see if you get exceptions... ;^). You should be able to tell the compiler to not generate any MMX instructions, as an override. Be aware that you can't just use the GCC 3.1 on an older kernel. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D4EDB6C.A339167F>