From ffd344ddbba085b9e349df85fa9607ccbd2e47c9 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 26 Dec 1999 12:43:47 +0000 Subject: [PATCH] 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. --- sys/amd64/isa/icu.h | 4 ---- sys/amd64/isa/intr_machdep.c | 4 ++-- sys/amd64/isa/nmi.c | 4 ++-- sys/i386/isa/icu.h | 4 ---- sys/i386/isa/intr_machdep.c | 4 ++-- sys/i386/isa/nmi.c | 4 ++-- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/amd64/isa/icu.h b/sys/amd64/isa/icu.h index 14e8d14aa9b..ed3a8790249 100644 --- a/sys/amd64/isa/icu.h +++ b/sys/amd64/isa/icu.h @@ -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 diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c index 8e0e96c2580..462000626af 100644 --- a/sys/amd64/isa/intr_machdep.c +++ b/sys/amd64/isa/intr_machdep.c @@ -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(); diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c index 8e0e96c2580..462000626af 100644 --- a/sys/amd64/isa/nmi.c +++ b/sys/amd64/isa/nmi.c @@ -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(); diff --git a/sys/i386/isa/icu.h b/sys/i386/isa/icu.h index 14e8d14aa9b..ed3a8790249 100644 --- a/sys/i386/isa/icu.h +++ b/sys/i386/isa/icu.h @@ -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 diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index 8e0e96c2580..462000626af 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/isa/intr_machdep.c @@ -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(); diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c index 8e0e96c2580..462000626af 100644 --- a/sys/i386/isa/nmi.c +++ b/sys/i386/isa/nmi.c @@ -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();