Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/isa Replaced enable/disable_intr by splhi...
details: https://anonhg.NetBSD.org/src/rev/f513ec1aa1db
branches: trunk
changeset: 326613:f513ec1aa1db
user: phx <phx%NetBSD.org@localhost>
date: Fri Feb 07 09:22:02 2014 +0000
description:
Replaced enable/disable_intr by splhigh/splx.
diffstat:
sys/arch/sandpoint/isa/isaclock.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (67 lines):
diff -r 02dc330ba5bc -r f513ec1aa1db sys/arch/sandpoint/isa/isaclock.c
--- a/sys/arch/sandpoint/isa/isaclock.c Fri Feb 07 08:51:34 2014 +0000
+++ b/sys/arch/sandpoint/isa/isaclock.c Fri Feb 07 09:22:02 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isaclock.c,v 1.13 2009/03/14 21:04:15 dsl Exp $ */
+/* $NetBSD: isaclock.c,v 1.14 2014/02/07 09:22:02 phx Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -121,7 +121,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.13 2009/03/14 21:04:15 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.14 2014/02/07 09:22:02 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -140,9 +140,6 @@
#include <sandpoint/isa/nvram.h>
#include <sandpoint/isa/spkrreg.h>
-extern void disable_intr(void); /* In locore.S */
-extern void enable_intr(void); /* In locore.S */
-
void sysbeepstop(void *);
void sysbeep(int, int);
@@ -151,10 +148,12 @@
void
sysbeepstop(void *arg)
{
+ int s;
+
/* disable counter 2 */
- disable_intr();
+ s = splhigh(); /* FIXME */
isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) & ~PIT_SPKR);
- enable_intr();
+ splx(s);
beeping = 0;
}
@@ -164,6 +163,7 @@
static callout_t sysbeep_ch;
static int last_pitch;
static bool again;
+ int s;
if (!again) {
callout_init(&sysbeep_ch, 0);
@@ -178,13 +178,13 @@
return;
}
if (!beeping || last_pitch != pitch) {
- disable_intr();
+ s = splhigh(); /* FIXME */
isa_outb(IO_TIMER1 + TIMER_MODE,
TIMER_SEL2 | TIMER_16BIT | TIMER_SQWAVE);
isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) % 256);
isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) / 256);
isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) | PIT_SPKR); /* enable counter 2 */
- enable_intr();
+ splx(s);
}
last_pitch = pitch;
beeping = 1;
Home |
Main Index |
Thread Index |
Old Index