Convert various calls to splhigh() to disable_intr() since splhigh() is

now a no-op.
This commit is contained in:
dfr 2000-11-19 12:28:42 +00:00
parent be0be4286a
commit 0766263be1
8 changed files with 34 additions and 28 deletions

View File

@ -269,7 +269,8 @@ getit(void)
int high, low;
int s;
s = splhigh();
s = save_intr();
disable_intr();
/* Select timer0 and latch counter value. */
outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
@ -277,7 +278,7 @@ getit(void)
low = inb(TIMER_CNTR0);
high = inb(TIMER_CNTR0);
splx(s);
restore_intr(s);
return ((high << 8) | low);
}
@ -370,7 +371,8 @@ set_timer_freq(u_int freq, int intr_freq)
int new_timer0_max_count;
int s;
s = splhigh();
s = save_intr();
disable_intr();
timer_freq = freq;
new_timer0_max_count = TIMER_DIV(intr_freq);
if (new_timer0_max_count != timer0_max_count) {
@ -379,14 +381,15 @@ set_timer_freq(u_int freq, int intr_freq)
outb(TIMER_CNTR0, timer0_max_count & 0xff);
outb(TIMER_CNTR0, timer0_max_count >> 8);
}
splx(s);
restore_intr(s);
}
static void
handleclock(void* arg)
{
if (timecounter->tc_get_timecount == i8254_get_timecount) {
int s = splhigh();
int s = save_intr();
disable_intr();
if (i8254_ticked)
i8254_ticked = 0;
else {
@ -394,7 +397,7 @@ handleclock(void* arg)
i8254_lastcount = 0;
}
clkintr_pending = 0;
splx(s);
restore_intr(s);
}
hardclock(arg);
@ -566,7 +569,8 @@ i8254_get_timecount(struct timecounter *tc)
u_int high, low;
int s;
s = splhigh();
s = save_intr();
disable_intr();
/* Select timer0 and latch counter value. */
outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
@ -584,7 +588,7 @@ i8254_get_timecount(struct timecounter *tc)
i8254_lastcount = count;
count += i8254_offset;
splx(s);
restore_intr(s);
return (count);
}
@ -636,12 +640,13 @@ sysbeepstop(void *chan)
int
sysbeep(int pitch, int period)
{
int x = splhigh();
int s = save_intr();
disable_intr();
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
if (!beeping) {
/* Something else owns it. */
splx(x);
restore_intr(s);
return (-1); /* XXX Should be EBUSY, but nobody cares anyway. */
}
@ -655,7 +660,7 @@ sysbeep(int pitch, int period)
beeping = period;
timeout(sysbeepstop, (void *)NULL, period);
}
splx(x);
restore_intr(s);
return (0);
}

View File

@ -191,7 +191,8 @@ kdb_trap(a0, a1, a2, entry, regs)
ddb_regs = *regs;
s = splhigh();
s = save_intr();
disable_intr();
#if 0
db_printf("stopping %x\n", PCPU_GET(other_cpus));
@ -214,7 +215,7 @@ kdb_trap(a0, a1, a2, entry, regs)
restart_cpus(stopped_cpus);
#endif
splx(s);
restore_intr(s);
*regs = ddb_regs;

View File

@ -352,9 +352,10 @@ alpha_setup_intr(const char *name, int vector, driver_intr_t *handler,
i->disable = disable;
i->enable = enable;
s = splhigh();
s = save_intr();
disable_intr();
LIST_INSERT_HEAD(&alpha_intr_hash[h], i, list);
splx(s);
restore_intr(s);
}
/* Second, create the interrupt thread if needed. */
@ -484,9 +485,10 @@ alpha_teardown_intr(void *cookie)
/* XXX - if the ithd has no handlers left, we should remove it */
#if 0
s = splhigh();
s = save_intr();
disable_intr();
LIST_REMOVE(i, list);
splx(s);
restore_intr(s);
free(i, M_DEVBUF);
#endif

View File

@ -914,7 +914,8 @@ smp_rendezvous(void (* setup_func)(void *),
int s;
/* disable interrupts on this CPU, save interrupt status */
s = splhigh();
s = save_intr();
disable_intr();
/* obtain rendezvous lock */
s_lock(&smp_rv_lock); /* XXX sleep here? NOWAIT flag? */
@ -937,7 +938,7 @@ smp_rendezvous(void (* setup_func)(void *),
s_unlock(&smp_rv_lock);
/* restore interrupt flag */
splx(s);
restore_intr(s);
}
/*

View File

@ -134,14 +134,14 @@ promcnputc(dev, c)
unsigned char *to = (unsigned char *)0x20000000;
int s;
s = enter_prom(); /* splhigh() and map prom */
s = enter_prom(); /* disable_intr() and map prom */
*to = c;
do {
ret.bits = prom_putstr(alpha_console, to, 1);
} while ((ret.u.retval & 1) == 0);
leave_prom(s); /* unmap prom and splx(s) */
leave_prom(s); /* unmap prom and restore_intr(s) */
}
/*
@ -189,9 +189,9 @@ promcncheckc(dev)
static int
enter_prom()
{
int s = splhigh();
pt_entry_t *lev1map;
int s = save_intr();
disable_intr();
if (!prom_mapped) {
#ifdef SIMOS
@ -230,7 +230,7 @@ leave_prom __P((s))
lev1map[0] = saved_pte[0]; /* XXX */
prom_cache_sync(); /* XXX */
}
splx(s);
restore_intr(s);
}
static void
@ -270,7 +270,7 @@ prom_halt(halt)
/*
* Turn off interrupts, for sanity.
*/
(void) splhigh();
disable_intr();
/*
* Set "boot request" part of the CPU state depending on what

View File

@ -253,7 +253,6 @@ cpu_exit(p)
{
alpha_fpstate_drop(p);
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);

View File

@ -253,7 +253,6 @@ cpu_exit(p)
{
alpha_fpstate_drop(p);
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);

View File

@ -253,7 +253,6 @@ cpu_exit(p)
{
alpha_fpstate_drop(p);
(void) splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
mtx_assert(&Giant, MA_NOTOWNED);