svn commit: r309892 - head/sys/arm/arm

Jayachandran C. jchandra at FreeBSD.org
Mon Dec 12 15:35:58 UTC 2016


Author: jchandra
Date: Mon Dec 12 15:35:57 2016
New Revision: 309892
URL: https://svnweb.freebsd.org/changeset/base/309892

Log:
  Fix gic_cpu_mask() calculation in ARM GIC
  
  r309616 changed the definition of GICD_ITARGETSR(n) to take the irq
  id as argument, but the usage of the macro in gic_cpu_mask() was not
  updated to reflect this. This causes the cpu mask to be computed
  incorrectly.
  
  Update the GICD_ITARGETSR() call to fix this, this fixes a hang seen
  while booting freebsd on qemu-system-aarch64 with SMP enabled.

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c	Mon Dec 12 15:22:21 2016	(r309891)
+++ head/sys/arm/arm/gic.c	Mon Dec 12 15:35:57 2016	(r309892)
@@ -190,7 +190,7 @@ gic_cpu_mask(struct arm_gic_softc *sc)
 
 	/* Read the current cpuid mask by reading ITARGETSR{0..7} */
 	for (i = 0; i < 8; i++) {
-		mask = gic_d_read_4(sc, GICD_ITARGETSR(i));
+		mask = gic_d_read_4(sc, GICD_ITARGETSR(4 * i));
 		if (mask != 0)
 			break;
 	}


More information about the svn-src-head mailing list