Module Name: src Committed By: phx Date: Fri Feb 7 09:22:02 UTC 2014
Modified Files: src/sys/arch/sandpoint/isa: isaclock.c Log Message: Replaced enable/disable_intr by splhigh/splx. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sandpoint/isa/isaclock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sandpoint/isa/isaclock.c diff -u src/sys/arch/sandpoint/isa/isaclock.c:1.13 src/sys/arch/sandpoint/isa/isaclock.c:1.14 --- src/sys/arch/sandpoint/isa/isaclock.c:1.13 Sat Mar 14 21:04:15 2009 +++ src/sys/arch/sandpoint/isa/isaclock.c Fri Feb 7 09:22:02 2014 @@ -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 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT */ #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 @@ __KERNEL_RCSID(0, "$NetBSD: isaclock.c,v #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 @@ static int beeping; 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 @@ sysbeep(int pitch, int period) 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 @@ sysbeep(int pitch, int period) 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;