Nuke current_mask.

This commit is contained in:
toshii 2001-05-22 17:01:16 +00:00
parent 607b14bf7b
commit 7073a10bbd
3 changed files with 8 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stubs.c,v 1.2 2001/03/31 12:22:38 toshii Exp $ */ /* $NetBSD: stubs.c,v 1.3 2001/05/22 17:01:16 toshii Exp $ */
/* /*
* Copyright (c) 1994-1998 Mark Brinicombe. * Copyright (c) 1994-1998 Mark Brinicombe.
@ -253,12 +253,12 @@ set_spl_masks()
{ {
int loop; int loop;
for (loop = 0; loop < _SPL_LEVELS; ++loop) { for (loop = 0; loop < _SPL_LEVELS; ++loop)
spl_masks[loop] = 0xffffffff;
spl_smasks[loop] = 0; spl_smasks[loop] = 0;
}
spl_masks[_SPL_BIO] = imask[IPL_BIO]; for (loop = 0; loop <= _SPL_BIO; loop++)
spl_masks[loop] = imask[IPL_BIO];
spl_masks[_SPL_NET] = imask[IPL_NET]; spl_masks[_SPL_NET] = imask[IPL_NET];
spl_masks[_SPL_SOFTSERIAL] = imask[IPL_TTY]; spl_masks[_SPL_SOFTSERIAL] = imask[IPL_TTY];
spl_masks[_SPL_TTY] = imask[IPL_TTY]; spl_masks[_SPL_TTY] = imask[IPL_TTY];

View File

@ -1,4 +1,4 @@
/* $NetBSD: sa11x0_irq.S,v 1.5 2001/05/14 16:19:31 toshii Exp $ */ /* $NetBSD: sa11x0_irq.S,v 1.6 2001/05/22 17:01:17 toshii Exp $ */
/* /*
* Copyright (c) 1998 Mark Brinicombe. * Copyright (c) 1998 Mark Brinicombe.
@ -299,9 +299,6 @@ irqast:
b . - 8 b . - 8
Lcurrent_mask:
.word _C_LABEL(current_mask) /* irq's that are usable */
ENTRY(irq_setmasks) ENTRY(irq_setmasks)
/* Disable interrupts */ /* Disable interrupts */
mrs r3, cpsr_all mrs r3, cpsr_all
@ -309,16 +306,13 @@ ENTRY(irq_setmasks)
msr cpsr_all, r1 msr cpsr_all, r1
/* Calculate interrupt mask */ /* Calculate interrupt mask */
ldr r1, Lcurrent_mask /* All the enabled interrupts */
ldr r1, [r1]
ldr r0, Lspl_masks ldr r0, Lspl_masks
ldr r2, Lcurrent_spl_level ldr r2, Lcurrent_spl_level
ldr r2, [r2] ldr r2, [r2]
ldr r2, [r0, r2, lsl #2] ldr r2, [r0, r2, lsl #2]
and r1, r1, r2
ldr r0, [pc, #_C_LABEL(saipic_base) - . - 8] ldr r0, [pc, #_C_LABEL(saipic_base) - . - 8]
str r1, [r0, #(SAIPIC_MR)] /* Set mask register */ str r2, [r0, #(SAIPIC_MR)] /* Set mask register */
/* Restore old cpsr and exit */ /* Restore old cpsr and exit */
msr cpsr_all, r3 msr cpsr_all, r3

View File

@ -1,4 +1,4 @@
/* $NetBSD: sa11x0_irqhandler.c,v 1.5 2001/05/18 14:51:40 toshii Exp $ */ /* $NetBSD: sa11x0_irqhandler.c,v 1.6 2001/05/22 17:01:17 toshii Exp $ */
/*- /*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@ -98,7 +98,6 @@
irqhandler_t *irqhandlers[NIRQS]; irqhandler_t *irqhandlers[NIRQS];
int current_intr_depth; int current_intr_depth;
u_int current_mask;
u_int actual_mask; u_int actual_mask;
u_int imask[NIPL]; u_int imask[NIPL];
u_int irqblock[NIRQS]; u_int irqblock[NIRQS];
@ -231,7 +230,6 @@ sa11x0_intr_establish(sa11x0_chipset_tag_t ic, int irq, int type, int level,
saved_cpsr = SetCPSR(I32_bit, I32_bit); saved_cpsr = SetCPSR(I32_bit, I32_bit);
set_spl_masks(); set_spl_masks();
current_mask |= (1 << irq);
irq_setmasks(); irq_setmasks();
@ -275,7 +273,6 @@ sa11x0_intr_disestablish(sa11x0_chipset_tag_t ic, void *arg)
saved_cpsr = SetCPSR(I32_bit, I32_bit); saved_cpsr = SetCPSR(I32_bit, I32_bit);
set_spl_masks(); set_spl_masks();
current_mask &= ~(1 << irq);
irq_setmasks(); irq_setmasks();
SetCPSR(I32_bit, saved_cpsr & I32_bit); SetCPSR(I32_bit, saved_cpsr & I32_bit);