mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Replaced the INTRMASK and INTRUNMASK macros by "|" and "&~" operations.
Some interface botches went away, leaving the macros unused outside of the implementation of interrupt masking, and it was silly for the implementation to use the macros in only one place each.
This commit is contained in:
parent
265cdeddb7
commit
ffd344ddbb
6 changed files with 8 additions and 16 deletions
|
|
@ -60,8 +60,6 @@
|
|||
|
||||
void INTREN __P((u_int));
|
||||
void INTRDIS __P((u_int));
|
||||
#define INTRMASK(msk,s) (msk |= (s))
|
||||
#define INTRUNMASK(msk,s) (msk &= ~(s))
|
||||
|
||||
#else /* APIC_IO */
|
||||
|
||||
|
|
@ -72,8 +70,6 @@ extern unsigned imen; /* interrupt mask enable */
|
|||
|
||||
#define INTREN(s) (imen &= ~(s), SET_ICUS())
|
||||
#define INTRDIS(s) (imen |= (s), SET_ICUS())
|
||||
#define INTRMASK(msk,s) (msk |= (s))
|
||||
#define INTRUNMASK(msk,s) (msk &= ~(s))
|
||||
|
||||
#if 0
|
||||
#ifdef PC98
|
||||
|
|
|
|||
|
|
@ -635,13 +635,13 @@ update_masks(intrmask_t *maskptr, int irq)
|
|||
if ((*maskptr & mask) == 0)
|
||||
return;
|
||||
/* the irq was included in the classes mask, remove it */
|
||||
INTRUNMASK(*maskptr, mask);
|
||||
*maskptr &= ~mask;
|
||||
} else {
|
||||
/* a reference to this maskptr was found in this irq's chain */
|
||||
if ((*maskptr & mask) != 0)
|
||||
return;
|
||||
/* put the irq into the classes mask */
|
||||
INTRMASK(*maskptr, mask);
|
||||
*maskptr |= mask;
|
||||
}
|
||||
/* we need to update all values in the intr_mask[irq] array */
|
||||
update_intr_masks();
|
||||
|
|
|
|||
|
|
@ -635,13 +635,13 @@ update_masks(intrmask_t *maskptr, int irq)
|
|||
if ((*maskptr & mask) == 0)
|
||||
return;
|
||||
/* the irq was included in the classes mask, remove it */
|
||||
INTRUNMASK(*maskptr, mask);
|
||||
*maskptr &= ~mask;
|
||||
} else {
|
||||
/* a reference to this maskptr was found in this irq's chain */
|
||||
if ((*maskptr & mask) != 0)
|
||||
return;
|
||||
/* put the irq into the classes mask */
|
||||
INTRMASK(*maskptr, mask);
|
||||
*maskptr |= mask;
|
||||
}
|
||||
/* we need to update all values in the intr_mask[irq] array */
|
||||
update_intr_masks();
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@
|
|||
|
||||
void INTREN __P((u_int));
|
||||
void INTRDIS __P((u_int));
|
||||
#define INTRMASK(msk,s) (msk |= (s))
|
||||
#define INTRUNMASK(msk,s) (msk &= ~(s))
|
||||
|
||||
#else /* APIC_IO */
|
||||
|
||||
|
|
@ -72,8 +70,6 @@ extern unsigned imen; /* interrupt mask enable */
|
|||
|
||||
#define INTREN(s) (imen &= ~(s), SET_ICUS())
|
||||
#define INTRDIS(s) (imen |= (s), SET_ICUS())
|
||||
#define INTRMASK(msk,s) (msk |= (s))
|
||||
#define INTRUNMASK(msk,s) (msk &= ~(s))
|
||||
|
||||
#if 0
|
||||
#ifdef PC98
|
||||
|
|
|
|||
|
|
@ -635,13 +635,13 @@ update_masks(intrmask_t *maskptr, int irq)
|
|||
if ((*maskptr & mask) == 0)
|
||||
return;
|
||||
/* the irq was included in the classes mask, remove it */
|
||||
INTRUNMASK(*maskptr, mask);
|
||||
*maskptr &= ~mask;
|
||||
} else {
|
||||
/* a reference to this maskptr was found in this irq's chain */
|
||||
if ((*maskptr & mask) != 0)
|
||||
return;
|
||||
/* put the irq into the classes mask */
|
||||
INTRMASK(*maskptr, mask);
|
||||
*maskptr |= mask;
|
||||
}
|
||||
/* we need to update all values in the intr_mask[irq] array */
|
||||
update_intr_masks();
|
||||
|
|
|
|||
|
|
@ -635,13 +635,13 @@ update_masks(intrmask_t *maskptr, int irq)
|
|||
if ((*maskptr & mask) == 0)
|
||||
return;
|
||||
/* the irq was included in the classes mask, remove it */
|
||||
INTRUNMASK(*maskptr, mask);
|
||||
*maskptr &= ~mask;
|
||||
} else {
|
||||
/* a reference to this maskptr was found in this irq's chain */
|
||||
if ((*maskptr & mask) != 0)
|
||||
return;
|
||||
/* put the irq into the classes mask */
|
||||
INTRMASK(*maskptr, mask);
|
||||
*maskptr |= mask;
|
||||
}
|
||||
/* we need to update all values in the intr_mask[irq] array */
|
||||
update_intr_masks();
|
||||
|
|
|
|||
Loading…
Reference in a new issue