two interrupt service routines

Chris Torek chris at mimsy.UUCP
Wed Aug 17 21:38:58 AEST 1988


In article <3486 at phoenix.Princeton.EDU> paul at phoenix.Princeton.EDU
(Paul Lansky) writes:
>I have a device which is capable of interrupting to two different
>interrupt vectors.  How do I write a probe routine in the driver
>(under Ultrix 2.0 or 4.3) ...?  The device is the Dec DRQ3B DMA
>card, by the way.

While I am not familiar with that particular card, most if not all
DEC hardware that uses multiple vectors also uses adjacent vectors.
What you must do is arrange for an interrupt to occur at the lowest
numbered vector.  If the vector(s) is/are programmable, one uses
uba_hd[uban].uh_lastiv to select the vectors; in that case, it may
not be necessary to have the device interrupt, although it will not
hurt.

If for some reason it is inconvenient or impossible to make the device
interrupt at its lowest vector, use some other vector, then adjust
`cvec' afterward by the difference:

		addr->foo_csr = FOO_MAINT_INTR;
		DELAY(1000);
		addr->foo_csr = 0;
		if (cvec && cvec != 0x200)
			cvec -= 4;	/* 1 vector's worth */

Note that in recent Ultrix kernels, br and cvec must NOT be
declared in the probe routine, while in 4.xBSD kernels, they
MUST be the first two register variables.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list