diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-29 18:10:44 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-29 18:10:44 +0000 |
commit | 2daba14db3ad27d7c4b423645a257e6ef8a252dd (patch) | |
tree | af0a29b6ad292100004cc51768fa2dcbbe4d122f /sys/arch/mvmeppc | |
parent | 77cec5547fcb2bb4116363eafb5c8e596af921e9 (diff) |
Use atomic operations to operate on netisr, instead of clearing it at splhigh.
This changes nothing on legacy architectures, but is a bit faster (and simpler)
on the interesting ones.
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/dev/openpic.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/mvmeppc/dev/openpic.c b/sys/arch/mvmeppc/dev/openpic.c index f2574be64a5..df7d85f3f83 100644 --- a/sys/arch/mvmeppc/dev/openpic.c +++ b/sys/arch/mvmeppc/dev/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.21 2006/03/12 02:49:49 brad Exp $ */ +/* $OpenBSD: openpic.c,v 1.22 2007/05/29 18:10:43 miod Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -47,6 +47,7 @@ #include <ddb/db_var.h> +#include <machine/atomic.h> #include <machine/autoconf.h> #include <machine/intr.h> #include <machine/psl.h> @@ -639,10 +640,13 @@ openpic_do_pending_int() } if ((ipending & SINT_NET) & ~pcpl) { extern int netisr; - int pisr = netisr; - netisr = 0; + int pisr; + ipending &= ~SINT_NET; - softnet(pisr); + while ((pisr = netisr) != 0) { + atomic_clearbits_int(&netisr, pisr); + softnet(pisr); + } } #if 0 if ((ipending & SINT_TTY) & ~pcpl) { |