plan9fox/sys
cinap_lenrek 1d93a5628a pc, pc64, xen: rewrite interrupt handling code
This implements proper intrdisable() support for all
interrupt controllers.

For enable, (*arch->intrassign)(Vctl*) fills in the
Vctl.enable and Vctl.disable pointers with the
appropriate routines and returns the assigned
vector number.

Once the Vctl struct has been linked to its vector
chain, Vctl.enable(Vctl*, shared) gets called with a
flag if the vector has been already enabled (shared).

This order is important here as enabling the interrupt
on the controller before we have linked the chain can
cause spurious interrupts, expecially on mp system
where the interrupt can target a different cpu than
the caller of intrenable().

The intrdisable() case is the other way around.
We first disable the interrupt on the controller
and after that unlink the Vctl from the chain.
On a multiprocessor, the xfree() of the Vctl struct
is delayed to avoid freeing it while it is still
in use by another cpu.

The xen port now also uses pc/irq.c which has been
made generic enougth to handle xen's irq scheme.
Also, archgeneric is now a separate file to avoid
pulling in dependencies from the 8259 interrupt
controller code.
2020-11-29 17:43:22 +01:00
..
doc
games/lib fortunes: As much as I'd love to I feel I have to let it go -- rminnich 2020-04-18 21:37:53 -04:00
include libbio: add aux pointer to bio 2020-11-01 11:42:54 -08:00
lib kbmap/neo2: add support for neo2 kbmak (thanks jstsmthrgk) 2020-11-26 11:18:41 -08:00
man fplot(1): use abs() 2020-11-27 10:35:57 +01:00
src pc, pc64, xen: rewrite interrupt handling code 2020-11-29 17:43:22 +01:00