From owner-svn-src-all@freebsd.org Mon Dec 12 15:35:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF2F7C733DC; Mon, 12 Dec 2016 15:35:58 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E6251B47; Mon, 12 Dec 2016 15:35:58 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCFZvw8092949; Mon, 12 Dec 2016 15:35:57 GMT (envelope-from jchandra@FreeBSD.org) Received: (from jchandra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCFZv8Y092948; Mon, 12 Dec 2016 15:35:57 GMT (envelope-from jchandra@FreeBSD.org) Message-Id: <201612121535.uBCFZv8Y092948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jchandra set sender to jchandra@FreeBSD.org using -f From: "Jayachandran C." Date: Mon, 12 Dec 2016 15:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309892 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 15:35:58 -0000 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; }