summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-11-19 12:28:42 +0000
committerdfr <dfr@FreeBSD.org>2000-11-19 12:28:42 +0000
commitda6f7f0f11cab2cfd8cdef0e009c1bca94eea240 (patch)
tree8b08f940f2d889f6b77f8b61656f25c658933fc4 /sys/alpha
parent5a46c864c6be00226f6fe8c9778d0301cfeb85f2 (diff)
downloadFreeBSD-src-da6f7f0f11cab2cfd8cdef0e009c1bca94eea240.zip
FreeBSD-src-da6f7f0f11cab2cfd8cdef0e009c1bca94eea240.tar.gz
Convert various calls to splhigh() to disable_intr() since splhigh() is
now a no-op.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/clock.c27
-rw-r--r--sys/alpha/alpha/db_interface.c5
-rw-r--r--sys/alpha/alpha/interrupt.c10
-rw-r--r--sys/alpha/alpha/mp_machdep.c5
-rw-r--r--sys/alpha/alpha/prom.c12
-rw-r--r--sys/alpha/alpha/vm_machdep.c1
6 files changed, 34 insertions, 26 deletions
diff --git a/sys/alpha/alpha/clock.c b/sys/alpha/alpha/clock.c
index ef7cb65..b74dc5b 100644
--- a/sys/alpha/alpha/clock.c
+++ b/sys/alpha/alpha/clock.c
@@ -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);
}
diff --git a/sys/alpha/alpha/db_interface.c b/sys/alpha/alpha/db_interface.c
index aaa80b1..4ed58ca 100644
--- a/sys/alpha/alpha/db_interface.c
+++ b/sys/alpha/alpha/db_interface.c
@@ -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;
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c
index 4d3ddc9..76321a1 100644
--- a/sys/alpha/alpha/interrupt.c
+++ b/sys/alpha/alpha/interrupt.c
@@ -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
diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c
index 6514229..393802d 100644
--- a/sys/alpha/alpha/mp_machdep.c
+++ b/sys/alpha/alpha/mp_machdep.c
@@ -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);
}
/*
diff --git a/sys/alpha/alpha/prom.c b/sys/alpha/alpha/prom.c
index f299d0c..1958d79 100644
--- a/sys/alpha/alpha/prom.c
+++ b/sys/alpha/alpha/prom.c
@@ -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
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index 0aff5a9..1f1a7f2 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -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);
OpenPOWER on IntegriCloud