diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-04-08 21:19:32 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-04-08 21:19:32 +0000 |
commit | 7d6c453d8038a6f7688bf4d0d3137bc6b56e5436 (patch) | |
tree | 62204ad0cf2b02e386e67798141b8a7efb2052de /sys/arch/arm | |
parent | 8238133246ae3851704cd0610f21634538e47b8f (diff) |
Cleanup arm soft interrupt handling; remove the unused IPL_SERIAL and rename
IPL_SOFTSERIAL to IPL_SOFTTTY.
tested by oga@
ok miod@
Diffstat (limited to 'sys/arch/arm')
-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 |
4 files changed, 28 insertions, 41 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 |