Module Name:    src
Committed By:   jmcneill
Date:           Sun Nov  1 14:42:05 UTC 2020

Modified Files:
        src/sys/arch/arm/pic: pic.c

Log Message:
intr_ipi_send: assert that kcp is either NULL or contains exactly one CPU


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/arm/pic/pic.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/arm/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.60 src/sys/arch/arm/pic/pic.c:1.61
--- src/sys/arch/arm/pic/pic.c:1.60	Mon Oct 26 07:16:41 2020
+++ src/sys/arch/arm/pic/pic.c	Sun Nov  1 14:42:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.60 2020/10/26 07:16:41 skrll Exp $	*/
+/*	$NetBSD: pic.c,v 1.61 2020/11/01 14:42:05 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.60 2020/10/26 07:16:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.61 2020/11/01 14:42:05 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -197,6 +197,7 @@ intr_ipi_send(const kcpuset_t *kcp, u_lo
 {
 	struct cpu_info * const ci = curcpu();
 	KASSERT(ipi < NIPI);
+	KASSERT(kcp == NULL || kcpuset_countset(kcp) == 1);
 	bool __diagused sent_p = false;
 	for (size_t slot = 0; slot < PIC_MAXPICS; slot++) {
 		struct pic_softc * const pic = pic_list[slot];

Reply via email to