Module Name: src
Committed By: ryo
Date: Thu Sep 5 09:20:05 UTC 2019
Modified Files:
src/sys/kern: subr_ipi.c
Log Message:
requires memory barrier before IPI ack.
Problem was seen on the aarch64 cpus.
Fixes PR/54009
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_ipi.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/kern/subr_ipi.c
diff -u src/sys/kern/subr_ipi.c:1.4 src/sys/kern/subr_ipi.c:1.5
--- src/sys/kern/subr_ipi.c:1.4 Sat Apr 6 02:59:05 2019
+++ src/sys/kern/subr_ipi.c Thu Sep 5 09:20:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_ipi.c,v 1.4 2019/04/06 02:59:05 thorpej Exp $ */
+/* $NetBSD: subr_ipi.c,v 1.5 2019/09/05 09:20:05 ryo Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_ipi.c,v 1.4 2019/04/06 02:59:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ipi.c,v 1.5 2019/09/05 09:20:05 ryo Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -331,6 +331,9 @@ ipi_msg_cpu_handler(void *arg __unused)
msg->func(msg->arg);
/* Ack the request. */
+#ifndef __HAVE_ATOMIC_AS_MEMBAR
+ membar_producer();
+#endif
atomic_dec_uint(&msg->_pending);
}
}