Module Name: src
Committed By: jmcneill
Date: Mon Sep 10 19:43:58 UTC 2018
Modified Files:
src/sys/arch/arm/cortex: gic.c
Log Message:
armgic_ipi_send: use GIC interface number, not CPU index, when setting
the target(s) for an IPI.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/cortex/gic.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/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.36 src/sys/arch/arm/cortex/gic.c:1.37
--- src/sys/arch/arm/cortex/gic.c:1.36 Mon Sep 10 09:48:57 2018
+++ src/sys/arch/arm/cortex/gic.c Mon Sep 10 19:43:58 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: gic.c,v 1.36 2018/09/10 09:48:57 jmcneill Exp $ */
+/* $NetBSD: gic.c,v 1.37 2018/09/10 19:43:58 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.36 2018/09/10 09:48:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.37 2018/09/10 19:43:58 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -547,9 +547,12 @@ armgic_ipi_send(struct pic_softc *pic, c
uint32_t sgir = __SHIFTIN(ARMGIC_SGI_IPIBASE + ipi, GICD_SGIR_SGIINTID);
if (kcp != NULL) {
- uint32_t targets;
- kcpuset_export_u32(kcp, &targets, sizeof(targets));
- sgir |= __SHIFTIN(targets, GICD_SGIR_TargetList);
+ uint32_t targets_val = 0;
+ for (int n = 0; n < MAXCPUS; n++) {
+ if (kcpuset_isset(kcp, n))
+ targets_val |= sc->sc_target[n];
+ }
+ sgir |= __SHIFTIN(targets_val, GICD_SGIR_TargetList);
sgir |= GICD_SGIR_TargetListFilter_List;
} else {
if (ncpu == 1)