Subject: Re: Bug in x86 ioapic interrupt code for devices with shared interrupts?
To: None <>
From: None <>
List: port-amd64
Date: 03/03/2006 14:25:44

I see that FreeBSD has, for some years now, had code at the very
front of bge_intr() looking like:

	bge_statusword =

the remainder of bge_intr() then uses bge_statusword to decide what
work, if any, to do during the current invocation.

(I suspect the atomic instruction is extraneous, introduced due to
backporting fixes from an SMP-safe FreeBSD-5 driver without particular
care to whether FreeBSD-4 needs the SMP-safeness; tho' from this far
away, it's hard to be certain

OpenBSD has simliar code, without the SMP-safe-atomic-operation

	/* Make sure this is really our interrupt. */
	if (!(sc->bge_rdata->bge_status_block.bge_status &
		return (0);

Given that mere mortals can't get either vendor design docs on this
chip family, or solid design-level insight into the (poorly-designed)
open-source drivers, I'd somewhat prefer to copy the solutino seen in
the {Free,Open}BSD variants of bge(4).

Anyway.... I'll try to squeeze testing one patch or other, or both,
onwhatever set of bge's I can dregde up, into my already- overcommited
weekend.  Or by Wednesday for sure.