Module Name: src
Committed By: skrll
Date: Mon Oct 26 07:16:41 UTC 2020
Modified Files:
src/sys/arch/arm/pic: pic.c
Log Message:
Improve a comment
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 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.59 src/sys/arch/arm/pic/pic.c:1.60
--- src/sys/arch/arm/pic/pic.c:1.59 Mon Oct 26 07:14:42 2020
+++ src/sys/arch/arm/pic/pic.c Mon Oct 26 07:16:41 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pic.c,v 1.59 2020/10/26 07:14:42 skrll Exp $ */
+/* $NetBSD: pic.c,v 1.60 2020/10/26 07:16:41 skrll 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.59 2020/10/26 07:14:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.60 2020/10/26 07:16:41 skrll Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -203,11 +203,19 @@ intr_ipi_send(const kcpuset_t *kcp, u_lo
if (pic == NULL || pic->pic_cpus == NULL)
continue;
if (kcp == NULL || kcpuset_intersecting_p(kcp, pic->pic_cpus)) {
- // never send to ourself
+ /*
+ * Never send to ourself.
+ *
+ * This test uses pointer comparison for systems
+ * that have a pic per cpu, e.g. RPI[23]. GIC sets
+ * pic_cpus to kcpuset_running and handles "not for
+ * self" internally.
+ */
if (pic->pic_cpus == ci->ci_kcpuset)
continue;
(*pic->pic_ops->pic_ipi_send)(pic, kcp, ipi);
+
/*
* If we were targeting a single CPU or this pic
* handles all cpus, we're done.