On Sun, Jul 25, 1999 at 09:35:36AM +1000, Bruce Evans wrote:
>>>Possible quick fix (hack): change all the spltty()'s in lpt.c to
>>>splnet()'s. lpt isn't a tty driver; it just abuses spltty(). Abusing
>>>splnet() instead should work OK for lpt and fix if_plip.
>>This seems good until the intr stuff handle dynamic update of a interrupt spl.
>>Is there some work in progress on that?
>Not much. ppc needs to do most of the work by registering its interrupt
>with the correct interrupt maskptr for the currently attached device.
>This may involve unregistering the interrupt when the device changes.
>The generic code could help here by supporting atomic changing of
>interrupt maskptrs without unregistering the interrupt. Otherwise,
>the generic code is missing mainly update of the interrupt masks when
>an interrupt is unregistered.
For the low level side, we could consider something like the following code.
But this shall be called by the nexus layer and then needs generic newbus
support (as you said above, didn't you?).
* Switch an irq from a maskptr to another without unregistering the irq
* This function is supposed to work with only one handler per irq.
switch_masks(intrmask_t *oldmaskptr, intrmask_t *newmaskptr, int irq)
intrmask_t mask = 1 << irq;
if ((oldmaskptr == NULL) || (newmaskptr == NULL))
if (((idesc = find_idesc(oldmaskptr, irq)) == NULL) ||
(find_idesc(newmaskptr, irq) != NULL))
/* block all interrupts */
s = splhigh();
/* update the irq mask ptr */
idesc->maskptr = newmaskptr;
/* remove the irq from the old mask and add it to the new one */
/* we need to update all values in the intr_mask[irq] array */
/* update mask in chains of the interrupt multiplex handler as well */
/* restore interrupts */
[EMAIL PROTECTED] / [EMAIL PROTECTED]
FreeBSD - Turning PCs into workstations - http://www.FreeBSD.org
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message