diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/arm/softintr.c | 6 | ||||
-rw-r--r-- | sys/arch/arm/include/softintr.h | 11 | ||||
-rw-r--r-- | sys/arch/arm/xscale/i80321_intr.c | 8 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_intr.c | 44 | ||||
-rw-r--r-- | sys/arch/armish/include/intr.h | 4 | ||||
-rw-r--r-- | sys/arch/zaurus/include/intr.h | 7 |
6 files changed, 33 insertions, 47 deletions
diff --git a/sys/arch/arm/arm/softintr.c b/sys/arch/arm/arm/softintr.c index bf9e9835ce8..96480df841e 100644 --- a/sys/arch/arm/arm/softintr.c +++ b/sys/arch/arm/arm/softintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softintr.c,v 1.4 2007/05/29 18:10:42 miod Exp $ */ +/* $OpenBSD: softintr.c,v 1.5 2009/04/08 21:19:30 kettenis Exp $ */ /* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */ /* @@ -135,8 +135,8 @@ softintr_establish(int ipl, void (*func)(void *), void *arg) break; case IPL_TTY: - case IPL_SOFTSERIAL: - si = SI_SOFTSERIAL; + case IPL_SOFTTTY: + si = SI_SOFTTTY; break; default: diff --git a/sys/arch/arm/include/softintr.h b/sys/arch/arm/include/softintr.h index 8fde322797c..cc4065ba67c 100644 --- a/sys/arch/arm/include/softintr.h +++ b/sys/arch/arm/include/softintr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softintr.h,v 1.2 2007/05/10 17:59:24 deraadt Exp $ */ +/* $OpenBSD: softintr.h,v 1.3 2009/04/08 21:19:30 kettenis Exp $ */ /* $NetBSD: softintr.h,v 1.1 2002/01/29 22:54:14 thorpej Exp $ */ /* @@ -51,17 +51,10 @@ #define SI_SOFT 0 /* for IPL_SOFT */ #define SI_SOFTCLOCK 1 /* for IPL_SOFTCLOCK */ #define SI_SOFTNET 2 /* for IPL_SOFTNET */ -#define SI_SOFTSERIAL 3 /* for IPL_SOFTSERIAL */ +#define SI_SOFTTTY 3 /* for IPL_SOFTTTY */ #define SI_NQUEUES 4 -#define SI_QUEUENAMES { \ - "generic", \ - "clock", \ - "net", \ - "serial", \ -} - struct soft_intrhand { TAILQ_ENTRY(soft_intrhand) sih_list; void (*sih_func)(void *); diff --git a/sys/arch/arm/xscale/i80321_intr.c b/sys/arch/arm/xscale/i80321_intr.c index 0ab42780968..9ac0f057638 100644 --- a/sys/arch/arm/xscale/i80321_intr.c +++ b/sys/arch/arm/xscale/i80321_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i80321_intr.c,v 1.11 2007/05/19 15:47:16 miod Exp $ */ +/* $OpenBSD: i80321_intr.c,v 1.12 2009/04/08 21:19:31 kettenis Exp $ */ /* * Copyright (c) 2006 Dale Rahn <drahn@openbsd.org> @@ -160,8 +160,8 @@ i80321intc_calc_mask(void) i80321intc_smask[i] |= SI_TO_IRQBIT(SI_SOFTCLOCK); if (i < IPL_SOFTNET) i80321intc_smask[i] |= SI_TO_IRQBIT(SI_SOFTNET); - if (i < IPL_SOFTSERIAL) - i80321intc_smask[i] |= SI_TO_IRQBIT(SI_SOFTSERIAL); + if (i < IPL_SOFTTTY) + i80321intc_smask[i] |= SI_TO_IRQBIT(SI_SOFTTTY); #if 0 printf("mask[%d]: %x %x\n", i, i80321intc_smask[i], i80321intc_imask[i]); @@ -199,7 +199,7 @@ i80321intc_do_pending(void) } do { - DO_SOFTINT(SI_SOFTSERIAL, IPL_SOFTSERIAL); + DO_SOFTINT(SI_SOFTTTY, IPL_SOFTTTY); DO_SOFTINT(SI_SOFTNET, IPL_SOFTNET); DO_SOFTINT(SI_SOFTCLOCK, IPL_SOFTCLOCK); DO_SOFTINT(SI_SOFT, IPL_SOFT); diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c index 0ba419b4fac..8a9bb619dab 100644 --- a/sys/arch/arm/xscale/pxa2x0_intr.c +++ b/sys/arch/arm/xscale/pxa2x0_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_intr.c,v 1.17 2008/05/19 18:42:12 miod Exp $ */ +/* $OpenBSD: pxa2x0_intr.c,v 1.18 2009/04/08 21:19:31 kettenis Exp $ */ /* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */ /* @@ -152,14 +152,14 @@ pxaintc_attach(struct device *parent, struct device *self, void *args) handler[i].name = "stray"; handler[i].func = pxa2x0_stray_interrupt; handler[i].arg = (void *)(u_int32_t) i; - extirq_level[i] = IPL_SERIAL; + extirq_level[i] = IPL_HIGH; #endif } pxa2x0_init_interrupt_masks(); - _splraise(IPL_SERIAL); + _splraise(IPL_HIGH); enable_interrupts(I32_bit); } @@ -191,7 +191,7 @@ static const int si_to_ipl[SI_NQUEUES] = { IPL_SOFT, /* SI_SOFT */ IPL_SOFTCLOCK, /* SI_SOFTCLOCK */ IPL_SOFTNET, /* SI_SOFTNET */ - IPL_SOFTSERIAL, /* SI_SOFTSERIAL */ + IPL_SOFTTTY, /* SI_SOFTTTY */ }; /* @@ -297,7 +297,7 @@ pxa2x0_update_intr_masks(int irqno, int irqlevel) for (irq = 0; irq < ICU_LEN; irq++) { int i; int max = IPL_NONE; - int min = IPL_HIGH; /* XXX kill IPL_SERIAL */ + int min = IPL_HIGH; TAILQ_FOREACH(ih, &handler[irq].list, ih_list) { if (ih->ih_level > max) max = ih->ih_level; @@ -316,7 +316,7 @@ pxa2x0_update_intr_masks(int irqno, int irqlevel) pxa2x0_imask[i] |= (1 << irq); /* Disable interrupt at upper level */ - for( ; i < NIPL-1; ++i) + for( ; i < NIPL; ++i) pxa2x0_imask[i] &= ~(1 << irq); } @@ -325,17 +325,17 @@ pxa2x0_update_intr_masks(int irqno, int irqlevel) SI_TO_IRQBIT(SI_SOFT) | SI_TO_IRQBIT(SI_SOFTCLOCK) | SI_TO_IRQBIT(SI_SOFTNET) | - SI_TO_IRQBIT(SI_SOFTSERIAL); + SI_TO_IRQBIT(SI_SOFTTTY); pxa2x0_imask[IPL_SOFT] |= SI_TO_IRQBIT(SI_SOFTCLOCK) | SI_TO_IRQBIT(SI_SOFTNET) | - SI_TO_IRQBIT(SI_SOFTSERIAL); + SI_TO_IRQBIT(SI_SOFTTTY); pxa2x0_imask[IPL_SOFTCLOCK] |= SI_TO_IRQBIT(SI_SOFTNET) | - SI_TO_IRQBIT(SI_SOFTSERIAL); + SI_TO_IRQBIT(SI_SOFTTTY); pxa2x0_imask[IPL_SOFTNET] |= - SI_TO_IRQBIT(SI_SOFTSERIAL); - pxa2x0_imask[IPL_SOFTSERIAL] |= + SI_TO_IRQBIT(SI_SOFTTTY); + pxa2x0_imask[IPL_SOFTTTY] |= 0; #else int level; /* debug */ @@ -346,7 +346,7 @@ pxa2x0_update_intr_masks(int irqno, int irqlevel) for(i = 0; i < irqlevel; ++i) pxa2x0_imask[i] |= mask; /* Enable interrupt at lower level */ - for( ; i < NIPL-1; ++i) + for( ; i < NIPL; ++i) pxa2x0_imask[i] &= ~mask; /* Disable interrupt at upper level */ #endif @@ -357,8 +357,8 @@ pxa2x0_update_intr_masks(int irqno, int irqlevel) */ pxa2x0_imask[IPL_BIO] &= pxa2x0_imask[IPL_SOFTNET]; pxa2x0_imask[IPL_NET] &= pxa2x0_imask[IPL_BIO]; - pxa2x0_imask[IPL_SOFTSERIAL] &= pxa2x0_imask[IPL_NET]; - pxa2x0_imask[IPL_TTY] &= pxa2x0_imask[IPL_SOFTSERIAL]; + pxa2x0_imask[IPL_SOFTTTY] &= pxa2x0_imask[IPL_NET]; + pxa2x0_imask[IPL_TTY] &= pxa2x0_imask[IPL_SOFTTTY]; /* * splvm() blocks all interrupts that use the kernel memory @@ -383,12 +383,6 @@ pxa2x0_update_intr_masks(int irqno, int irqlevel) */ pxa2x0_imask[IPL_HIGH] &= pxa2x0_imask[IPL_STATCLOCK]; - /* - * XXX We need serial drivers to run at the absolute highest priority - * in order to avoid overruns, so serial > high. - */ - pxa2x0_imask[IPL_SERIAL] &= pxa2x0_imask[IPL_HIGH]; - #ifdef DEBUG for (level = IPL_NONE; level < NIPL; level++) { printf("imask %d, %x\n", level, pxa2x0_imask[level]); @@ -426,7 +420,7 @@ pxa2x0_init_interrupt_masks(void) SI_TO_IRQBIT(SI_SOFT) | SI_TO_IRQBIT(SI_SOFTCLOCK) | SI_TO_IRQBIT(SI_SOFTNET) | - SI_TO_IRQBIT(SI_SOFTSERIAL); + SI_TO_IRQBIT(SI_SOFTTTY); /* * Initialize the soft interrupt masks to block themselves. @@ -434,7 +428,7 @@ pxa2x0_init_interrupt_masks(void) pxa2x0_imask[IPL_SOFT] = ~SI_TO_IRQBIT(SI_SOFT); pxa2x0_imask[IPL_SOFTCLOCK] = ~SI_TO_IRQBIT(SI_SOFTCLOCK); pxa2x0_imask[IPL_SOFTNET] = ~SI_TO_IRQBIT(SI_SOFTNET); - pxa2x0_imask[IPL_SOFTSERIAL] = ~SI_TO_IRQBIT(SI_SOFTSERIAL); + pxa2x0_imask[IPL_SOFTTTY] = ~SI_TO_IRQBIT(SI_SOFTTTY); pxa2x0_imask[IPL_SOFT] &= pxa2x0_imask[IPL_NONE]; @@ -480,7 +474,7 @@ pxa2x0_do_pending(void) } do { - DO_SOFTINT(SI_SOFTSERIAL,IPL_SOFTSERIAL); + DO_SOFTINT(SI_SOFTTTY,IPL_SOFTTTY); DO_SOFTINT(SI_SOFTNET, IPL_SOFTNET); DO_SOFTINT(SI_SOFTCLOCK, IPL_SOFTCLOCK); DO_SOFTINT(SI_SOFT, IPL_SOFT); @@ -623,8 +617,8 @@ pxa2x0_intr_disestablish(void *cookie) ih->arg = (void *) irqno; ih->func = pxa2x0_stray_interrupt; ih->name = "stray"; - extirq_level[irqno] = IPL_SERIAL; - pxa2x0_update_intr_masks(irqno, IPL_SERIAL); + extirq_level[irqno] = IPL_HIGH; + pxa2x0_update_intr_masks(irqno, IPL_HIGH); restore_interrupts(psw); #endif diff --git a/sys/arch/armish/include/intr.h b/sys/arch/armish/include/intr.h index 0baf01aec68..70b7aa7b182 100644 --- a/sys/arch/armish/include/intr.h +++ b/sys/arch/armish/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.4 2007/05/15 05:26:44 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.5 2009/04/08 21:19:31 kettenis Exp $ */ /* $NetBSD: intr.h,v 1.12 2003/06/16 20:00:59 thorpej Exp $ */ /* @@ -49,7 +49,7 @@ #define IPL_SOFTNET 3 /* software network interrupt */ #define IPL_BIO 4 /* block I/O */ #define IPL_NET 5 /* network */ -#define IPL_SOFTSERIAL 6 /* software serial interrupt */ +#define IPL_SOFTTTY 6 /* software serial interrupt */ #define IPL_TTY 7 /* terminals */ #define IPL_VM 8 /* memory allocation */ #define IPL_AUDIO 9 /* audio device */ diff --git a/sys/arch/zaurus/include/intr.h b/sys/arch/zaurus/include/intr.h index 24fe0fb3e11..2545a62309b 100644 --- a/sys/arch/zaurus/include/intr.h +++ b/sys/arch/zaurus/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.7 2007/05/15 05:26:45 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.8 2009/04/08 21:19:31 kettenis Exp $ */ /* $NetBSD: intr.h,v 1.12 2003/06/16 20:00:59 thorpej Exp $ */ /* @@ -49,16 +49,15 @@ #define IPL_SOFTNET 3 /* software network interrupt */ #define IPL_BIO 4 /* block I/O */ #define IPL_NET 5 /* network */ -#define IPL_SOFTSERIAL 6 /* software serial interrupt */ +#define IPL_SOFTTTY 6 /* software serial interrupt */ #define IPL_TTY 7 /* terminals */ #define IPL_VM 8 /* memory allocation */ #define IPL_AUDIO 9 /* audio device */ #define IPL_CLOCK 10 /* clock interrupt */ #define IPL_STATCLOCK 11 /* statistics clock interrupt */ #define IPL_HIGH 12 /* everything */ -#define IPL_SERIAL 13 /* serial device */ -#define NIPL 14 +#define NIPL 13 /* Interrupt sharing types. */ #define IST_NONE 0 /* none */ |