summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-09-13 11:48:18 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-09-13 11:48:18 +0000
commit816df510e28b5ea4d75c8a8e484c3385fea90eec (patch)
tree047e3713a22d59a3f975feecd32d406eea6b0da0 /sys/arch
parent537161d161c1740f06b69cec4817b3285a050999 (diff)
Introduce intr_barrier(4), an interface that guarantees that an interrupt
handler that was running has finished. ok miod@, guenther@ (both for the equivalent sparc64 diff)
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/intr.c8
-rw-r--r--sys/arch/amd64/include/intr.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c
index 5ff654c0b6d..022ae1f15cb 100644
--- a/sys/arch/amd64/amd64/intr.c
+++ b/sys/arch/amd64/amd64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.45 2015/08/28 16:16:44 tedu Exp $ */
+/* $OpenBSD: intr.c,v 1.46 2015/09/13 11:48:17 kettenis Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
@@ -653,6 +653,12 @@ intr_printconfig(void)
#endif
}
+void
+intr_barrier(void *ih)
+{
+ sched_barrier(NULL);
+}
+
/*
* Add a mask to cpl, and return the old value of cpl.
*/
diff --git a/sys/arch/amd64/include/intr.h b/sys/arch/amd64/include/intr.h
index d7d80134f73..5cf93934e3e 100644
--- a/sys/arch/amd64/include/intr.h
+++ b/sys/arch/amd64/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.28 2015/07/19 18:44:15 sf Exp $ */
+/* $OpenBSD: intr.h,v 1.29 2015/09/13 11:48:17 kettenis Exp $ */
/* $NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
/*-
@@ -209,6 +209,7 @@ int intr_handler(struct intrframe *, struct intrhand *);
void cpu_intr_init(struct cpu_info *);
int intr_find_mpmapping(int bus, int pin, int *handle);
void intr_printconfig(void);
+void intr_barrier(void *);
#ifdef MULTIPROCESSOR
void x86_send_ipi(struct cpu_info *, int);