Re: [PATCH] Add intr_mask() / intr_unmask() interface to mask / unmask individual interrupt sources

Maxime Villard <[email protected]>
Newsgroups gmane.os.netbsd.ports.i386,gmane.os.netbsd.ports.x86-64
Message-ID <[email protected]>
Le 11/08/2019 à 19:36, Jason Thorpe a écrit :
> Anyone?  Bueller?

Small notes:

+	const u_long psl = x86_read_psl();
+	x86_disable_intr();

Not sure, why disable interrupts? To prevent an interrupt between the
is_mask_count and pic_hw* changes?

+	if (mask) {
+		source->is_mask_count++;
+		KASSERT(source->is_mask_count != 0);
+		(*pic->pic_hwmask)(pic, ih->ih_pin);

Seems like pic_hwmask only needs to be called when is_mask_count==0.

Note that XENINTRSTUB will also need the same changes.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.