Convert various calls to splhigh() to disable_intr() since splhigh() is
now a no-op.
This commit is contained in:
parent
be0be4286a
commit
0766263be1
@ -269,7 +269,8 @@ getit(void)
|
|||||||
int high, low;
|
int high, low;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
|
|
||||||
/* Select timer0 and latch counter value. */
|
/* Select timer0 and latch counter value. */
|
||||||
outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
|
outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
|
||||||
@ -277,7 +278,7 @@ getit(void)
|
|||||||
low = inb(TIMER_CNTR0);
|
low = inb(TIMER_CNTR0);
|
||||||
high = inb(TIMER_CNTR0);
|
high = inb(TIMER_CNTR0);
|
||||||
|
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
return ((high << 8) | low);
|
return ((high << 8) | low);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,7 +371,8 @@ set_timer_freq(u_int freq, int intr_freq)
|
|||||||
int new_timer0_max_count;
|
int new_timer0_max_count;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
timer_freq = freq;
|
timer_freq = freq;
|
||||||
new_timer0_max_count = TIMER_DIV(intr_freq);
|
new_timer0_max_count = TIMER_DIV(intr_freq);
|
||||||
if (new_timer0_max_count != timer0_max_count) {
|
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 & 0xff);
|
||||||
outb(TIMER_CNTR0, timer0_max_count >> 8);
|
outb(TIMER_CNTR0, timer0_max_count >> 8);
|
||||||
}
|
}
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handleclock(void* arg)
|
handleclock(void* arg)
|
||||||
{
|
{
|
||||||
if (timecounter->tc_get_timecount == i8254_get_timecount) {
|
if (timecounter->tc_get_timecount == i8254_get_timecount) {
|
||||||
int s = splhigh();
|
int s = save_intr();
|
||||||
|
disable_intr();
|
||||||
if (i8254_ticked)
|
if (i8254_ticked)
|
||||||
i8254_ticked = 0;
|
i8254_ticked = 0;
|
||||||
else {
|
else {
|
||||||
@ -394,7 +397,7 @@ handleclock(void* arg)
|
|||||||
i8254_lastcount = 0;
|
i8254_lastcount = 0;
|
||||||
}
|
}
|
||||||
clkintr_pending = 0;
|
clkintr_pending = 0;
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
hardclock(arg);
|
hardclock(arg);
|
||||||
@ -566,7 +569,8 @@ i8254_get_timecount(struct timecounter *tc)
|
|||||||
u_int high, low;
|
u_int high, low;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
|
|
||||||
/* Select timer0 and latch counter value. */
|
/* Select timer0 and latch counter value. */
|
||||||
outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
|
outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);
|
||||||
@ -584,7 +588,7 @@ i8254_get_timecount(struct timecounter *tc)
|
|||||||
i8254_lastcount = count;
|
i8254_lastcount = count;
|
||||||
count += i8254_offset;
|
count += i8254_offset;
|
||||||
|
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
return (count);
|
return (count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -636,12 +640,13 @@ sysbeepstop(void *chan)
|
|||||||
int
|
int
|
||||||
sysbeep(int pitch, int period)
|
sysbeep(int pitch, int period)
|
||||||
{
|
{
|
||||||
int x = splhigh();
|
int s = save_intr();
|
||||||
|
disable_intr();
|
||||||
|
|
||||||
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
|
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
|
||||||
if (!beeping) {
|
if (!beeping) {
|
||||||
/* Something else owns it. */
|
/* Something else owns it. */
|
||||||
splx(x);
|
restore_intr(s);
|
||||||
return (-1); /* XXX Should be EBUSY, but nobody cares anyway. */
|
return (-1); /* XXX Should be EBUSY, but nobody cares anyway. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,7 +660,7 @@ sysbeep(int pitch, int period)
|
|||||||
beeping = period;
|
beeping = period;
|
||||||
timeout(sysbeepstop, (void *)NULL, period);
|
timeout(sysbeepstop, (void *)NULL, period);
|
||||||
}
|
}
|
||||||
splx(x);
|
restore_intr(s);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,8 @@ kdb_trap(a0, a1, a2, entry, regs)
|
|||||||
|
|
||||||
ddb_regs = *regs;
|
ddb_regs = *regs;
|
||||||
|
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
db_printf("stopping %x\n", PCPU_GET(other_cpus));
|
db_printf("stopping %x\n", PCPU_GET(other_cpus));
|
||||||
@ -214,7 +215,7 @@ kdb_trap(a0, a1, a2, entry, regs)
|
|||||||
restart_cpus(stopped_cpus);
|
restart_cpus(stopped_cpus);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
|
|
||||||
*regs = ddb_regs;
|
*regs = ddb_regs;
|
||||||
|
|
||||||
|
@ -352,9 +352,10 @@ alpha_setup_intr(const char *name, int vector, driver_intr_t *handler,
|
|||||||
i->disable = disable;
|
i->disable = disable;
|
||||||
i->enable = enable;
|
i->enable = enable;
|
||||||
|
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
LIST_INSERT_HEAD(&alpha_intr_hash[h], i, list);
|
LIST_INSERT_HEAD(&alpha_intr_hash[h], i, list);
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Second, create the interrupt thread if needed. */
|
/* 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 */
|
/* XXX - if the ithd has no handlers left, we should remove it */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
LIST_REMOVE(i, list);
|
LIST_REMOVE(i, list);
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
|
|
||||||
free(i, M_DEVBUF);
|
free(i, M_DEVBUF);
|
||||||
#endif
|
#endif
|
||||||
|
@ -914,7 +914,8 @@ smp_rendezvous(void (* setup_func)(void *),
|
|||||||
int s;
|
int s;
|
||||||
|
|
||||||
/* disable interrupts on this CPU, save interrupt status */
|
/* disable interrupts on this CPU, save interrupt status */
|
||||||
s = splhigh();
|
s = save_intr();
|
||||||
|
disable_intr();
|
||||||
|
|
||||||
/* obtain rendezvous lock */
|
/* obtain rendezvous lock */
|
||||||
s_lock(&smp_rv_lock); /* XXX sleep here? NOWAIT flag? */
|
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);
|
s_unlock(&smp_rv_lock);
|
||||||
|
|
||||||
/* restore interrupt flag */
|
/* restore interrupt flag */
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -134,14 +134,14 @@ promcnputc(dev, c)
|
|||||||
unsigned char *to = (unsigned char *)0x20000000;
|
unsigned char *to = (unsigned char *)0x20000000;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
s = enter_prom(); /* splhigh() and map prom */
|
s = enter_prom(); /* disable_intr() and map prom */
|
||||||
*to = c;
|
*to = c;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
ret.bits = prom_putstr(alpha_console, to, 1);
|
ret.bits = prom_putstr(alpha_console, to, 1);
|
||||||
} while ((ret.u.retval & 1) == 0);
|
} 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
|
static int
|
||||||
enter_prom()
|
enter_prom()
|
||||||
{
|
{
|
||||||
int s = splhigh();
|
|
||||||
|
|
||||||
pt_entry_t *lev1map;
|
pt_entry_t *lev1map;
|
||||||
|
int s = save_intr();
|
||||||
|
disable_intr();
|
||||||
|
|
||||||
if (!prom_mapped) {
|
if (!prom_mapped) {
|
||||||
#ifdef SIMOS
|
#ifdef SIMOS
|
||||||
@ -230,7 +230,7 @@ leave_prom __P((s))
|
|||||||
lev1map[0] = saved_pte[0]; /* XXX */
|
lev1map[0] = saved_pte[0]; /* XXX */
|
||||||
prom_cache_sync(); /* XXX */
|
prom_cache_sync(); /* XXX */
|
||||||
}
|
}
|
||||||
splx(s);
|
restore_intr(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -270,7 +270,7 @@ prom_halt(halt)
|
|||||||
/*
|
/*
|
||||||
* Turn off interrupts, for sanity.
|
* Turn off interrupts, for sanity.
|
||||||
*/
|
*/
|
||||||
(void) splhigh();
|
disable_intr();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set "boot request" part of the CPU state depending on what
|
* Set "boot request" part of the CPU state depending on what
|
||||||
|
@ -253,7 +253,6 @@ cpu_exit(p)
|
|||||||
{
|
{
|
||||||
alpha_fpstate_drop(p);
|
alpha_fpstate_drop(p);
|
||||||
|
|
||||||
(void) splhigh();
|
|
||||||
mtx_enter(&sched_lock, MTX_SPIN);
|
mtx_enter(&sched_lock, MTX_SPIN);
|
||||||
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
|
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
|
||||||
mtx_assert(&Giant, MA_NOTOWNED);
|
mtx_assert(&Giant, MA_NOTOWNED);
|
||||||
|
@ -253,7 +253,6 @@ cpu_exit(p)
|
|||||||
{
|
{
|
||||||
alpha_fpstate_drop(p);
|
alpha_fpstate_drop(p);
|
||||||
|
|
||||||
(void) splhigh();
|
|
||||||
mtx_enter(&sched_lock, MTX_SPIN);
|
mtx_enter(&sched_lock, MTX_SPIN);
|
||||||
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
|
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
|
||||||
mtx_assert(&Giant, MA_NOTOWNED);
|
mtx_assert(&Giant, MA_NOTOWNED);
|
||||||
|
@ -253,7 +253,6 @@ cpu_exit(p)
|
|||||||
{
|
{
|
||||||
alpha_fpstate_drop(p);
|
alpha_fpstate_drop(p);
|
||||||
|
|
||||||
(void) splhigh();
|
|
||||||
mtx_enter(&sched_lock, MTX_SPIN);
|
mtx_enter(&sched_lock, MTX_SPIN);
|
||||||
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
|
mtx_exit(&Giant, MTX_DEF | MTX_NOSWITCH);
|
||||||
mtx_assert(&Giant, MA_NOTOWNED);
|
mtx_assert(&Giant, MA_NOTOWNED);
|
||||||
|
Loading…
Reference in New Issue
Block a user