kernel message while running icc-em64t
Bruce Evans
bde at zeta.org.au
Sun Feb 20 01:14:15 PST 2005
On Sat, 19 Feb 2005, Alexander Leidinger wrote:
> On Thu, 17 Feb 2005 14:11:15 -0800
> Peter Wemm <peter at wemm.org> wrote:
>
> > > >> fpudna: fpcurthread == curthread 2342 times
> > > >> fpudna: fpcurthread == curthread 2343 times
>
> > If I had to guess, I'd guess that it is trying to issue SSE3
> > instructions to see if they work..
Does SSE3 cause DNA traps that are not associated with the FPU and/or
not cleared by calling stop_emulating()?
> I think the question is: Does this needs to get printed and if yes,
> does the information it represents has to be that cryptic?
This needs to panic like it used to, and the broken invariant reported
by the panic needs to be fixed instead of mishandled.
The panic was broken in rev.1.131 of npx.c.
I use the following fix for the non-panic and for some nearby style
(-only?) bugs:
%%%
Index: npx.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/npx.c,v
retrieving revision 1.152
diff -u -2 -r1.152 npx.c
--- npx.c 19 Jun 2004 22:24:16 -0000 1.152
+++ npx.c 20 Feb 2005 07:49:45 -0000
@@ -764,7 +764,4 @@
* access foreign pcb's.
*/
-
-static int err_count = 0;
-
int
npxdna()
@@ -776,18 +773,8 @@
if (!npx_exists)
return (0);
- if (PCPU_GET(fpcurthread) == curthread) {
- printf("npxdna: fpcurthread == curthread %d times\n",
- ++err_count);
- stop_emulating();
- return (1);
- }
- if (PCPU_GET(fpcurthread) != NULL) {
- printf("npxdna: fpcurthread = %p (%d), curthread = %p (%d)\n",
- PCPU_GET(fpcurthread),
- PCPU_GET(fpcurthread)->td_proc->p_pid,
- curthread, curthread->td_proc->p_pid);
- panic("npxdna");
- }
s = intr_disable();
+ if (PCPU_GET(fpcurthread) != NULL)
+ panic("npxdna: fpcurthread = %p, curthread = %p",
+ (void *)PCPU_GET(fpcurthread), (void *)curthread);
stop_emulating();
/*
%%%
The changes here are:
- back out the bogus code related to this bug in rev.1.131, so that
there is a panic again and not too much code for (mis)handing a case
that can't happen.
- move the invariant check inside the critical region. I think it was
OK, but this depends on the delicate point that interrupts can only
change fpcurthread from non-null to null, and since we are asserting
that fpcurthread is null, it shouldn't change underneath us. See
rev.1.90 for the addition of the critical region.
- catch up with 4.4BSD and use panic()'s support for variadic args
- don't invoke undefined behaviour by printing non-`void *'s using %p
- use KNF continuation indent of 4 (npx.c gets this wrong in several
places since I didn't know the rule when I wrote most of npx.c).
Bruce
More information about the freebsd-amd64
mailing list