Module Name:    src
Committed By:   jmcneill
Date:           Mon Mar  2 11:37:25 UTC 2015

Modified Files:
        src/sys/arch/arm/cortex: gic.c

Log Message:
sc_gic_lines is the total number of valid lines but pic_sources[] is sparse; 
when initializing mpsafe targets make sure to go all the way to the end 
(sc_pic.pic_maxsources) instead


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 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.12 src/sys/arch/arm/cortex/gic.c:1.13
--- src/sys/arch/arm/cortex/gic.c:1.12	Wed Oct 29 19:27:36 2014
+++ src/sys/arch/arm/cortex/gic.c	Mon Mar  2 11:37:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.12 2014/10/29 19:27:36 skrll Exp $	*/
+/*	$NetBSD: gic.c,v 1.13 2015/03/02 11:37:25 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.12 2014/10/29 19:27:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.13 2015/03/02 11:37:25 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -441,7 +441,7 @@ armgic_cpu_init_targets(struct armgic_so
 	/*
 	 * Update the mpsafe targets 
 	 */
-	for (size_t irq = 32; irq < sc->sc_gic_lines; irq++) {
+	for (size_t irq = 32; irq < sc->sc_pic.pic_maxsources; irq++) {
 		struct intrsource * const is = sc->sc_pic.pic_sources[irq];
 		const bus_size_t targets_reg = GICD_ITARGETSRn(irq / 4);
 		if (is != NULL && is->is_mpsafe) {

Reply via email to