[Differential] D8751: Fix gic_cpu_mask calculation

jchandra (Jayachandran C) phabric-noreply at FreeBSD.org
Sun Dec 11 19:53:46 UTC 2016


jchandra created this revision.
jchandra added reviewers: arm64, freebsd-arm-list, andrew.
jchandra set the repository for this revision to rS FreeBSD src repository.
Herald added a subscriber: imp.

REVISION SUMMARY
  r309616 changed the definition of GICD_ITARGETSR(n) right shift n
  by 2, 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.
  
        
  
  Fix this by updating gic_cpu_mask(). This fixes a hang seen when
  booting on ARM64 with SMP enabled.

REPOSITORY
  rS FreeBSD src repository

REVISION DETAIL
  https://reviews.freebsd.org/D8751

AFFECTED FILES
  sys/arm/arm/gic.c

CHANGE DETAILS

diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c
--- a/sys/arm/arm/gic.c
+++ b/sys/arm/arm/gic.c
@@ -190,7 +190,7 @@
 
 	/* 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;
 	}



EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: jchandra, #arm64, freebsd-arm-list, andrew
Cc: imp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8751.22814.patch
Type: text/x-patch
Size: 344 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20161211/92b97ad1/attachment.bin>


More information about the freebsd-arm mailing list