diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 2ebb056017ce..ea1aa1bba0f5 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -130,22 +130,18 @@ intr_priority(enum intr_type flags) INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV); switch (flags) { case INTR_TYPE_TTY: - pri = PI_TTYLOW; + pri = PI_TTY; break; case INTR_TYPE_BIO: - /* - * XXX We need to refine this. BSD/OS distinguishes - * between tape and disk priorities. - */ pri = PI_DISK; break; case INTR_TYPE_NET: pri = PI_NET; break; case INTR_TYPE_CAM: - pri = PI_DISK; /* XXX or PI_CAM? */ + pri = PI_DISK; break; - case INTR_TYPE_AV: /* Audio/video */ + case INTR_TYPE_AV: pri = PI_AV; break; case INTR_TYPE_CLK: @@ -1082,7 +1078,7 @@ swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler, *eventp = ie; } error = intr_event_add_handler(ie, name, NULL, handler, arg, - (pri * RQ_PPQ) + PI_SOFT, flags, cookiep); + PI_SWI(pri), flags, cookiep); if (error) return (error); if (pri == SWI_CLOCK) { @@ -1656,18 +1652,13 @@ db_dump_intrhand(struct intr_handler *ih) case PI_AV: db_printf("AV "); break; - case PI_TTYHIGH: - case PI_TTYLOW: + case PI_TTY: db_printf("TTY "); break; - case PI_TAPE: - db_printf("TAPE"); - break; case PI_NET: db_printf("NET "); break; case PI_DISK: - case PI_DISKLOW: db_printf("DISK"); break; case PI_DULL: diff --git a/sys/sys/priority.h b/sys/sys/priority.h index e05bd4d25792..a7aaedd039ec 100644 --- a/sys/sys/priority.h +++ b/sys/sys/priority.h @@ -85,14 +85,12 @@ #define PI_REALTIME (PRI_MIN_ITHD + 0) #define PI_AV (PRI_MIN_ITHD + 4) -#define PI_TTYHIGH (PRI_MIN_ITHD + 8) -#define PI_TAPE (PRI_MIN_ITHD + 12) -#define PI_NET (PRI_MIN_ITHD + 16) -#define PI_DISK (PRI_MIN_ITHD + 20) -#define PI_TTYLOW (PRI_MIN_ITHD + 24) -#define PI_DISKLOW (PRI_MIN_ITHD + 28) -#define PI_DULL (PRI_MIN_ITHD + 32) -#define PI_SOFT (PRI_MIN_ITHD + 36) +#define PI_NET (PRI_MIN_ITHD + 8) +#define PI_DISK (PRI_MIN_ITHD + 12) +#define PI_TTY (PRI_MIN_ITHD + 16) +#define PI_DULL (PRI_MIN_ITHD + 20) +#define PI_SOFT (PRI_MIN_ITHD + 24) +#define PI_SWI(x) (PI_SOFT + (x) * RQ_PPQ) #define PRI_MIN_KERN (64) #define PRI_MAX_KERN (PRI_MIN_REALTIME - 1)