From owner-freebsd-bugs@freebsd.org Sun Sep 17 03:53:51 2017 Return-Path: Delivered-To: freebsd-bugs@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 DB466E20812 for ; Sun, 17 Sep 2017 03:53:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 C2790707DF for ; Sun, 17 Sep 2017 03:53:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8H3rpHF008688 for ; Sun, 17 Sep 2017 03:53:51 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 222234] head -r323246 aarch64 (Pine64+ 2GB) boot time context, sometimes: acquiring blockable sleep lock with spinlock or critical section held Date: Sun, 17 Sep 2017 03:53:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:53:52 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222234 --- Comment #5 from Mark Millard --- (In reply to Mark Millard from comment #4) I found ARMv7 material indicating the same sort of issue for sev use: The Event signal is seen to be a non-memory communication, and as such the update to memory releasing the lock must actually be observable by all observers when the SEV instruction is executed and the event is sent. This = then requires the use of DSB rather than DMB. There is: /usr/src/sys/arm/include/cpu-v6.h:#define sev() __asm __volatile("sev" : := : "memory") # grep -r 'sev()' /usr/src/sys/ | more /usr/src/sys/arm/altera/socfpga/socfpga_mp.c: sev(); /usr/src/sys/arm/allwinner/aw_mp.c: sev(); /usr/src/sys/arm/allwinner/aw_mp.c: sev(); /usr/src/sys/arm/mv/armada38x/pmsu.c: sev(); /usr/src/sys/arm/broadcom/bcm2835/bcm2836_mp.c: sev(); /usr/src/sys/arm/broadcom/bcm2835/bcm2836_mp.c: sev(); /usr/src/sys/arm/xilinx/zy7_mp.c: sev(); /usr/src/sys/arm/amlogic/aml8726/aml8726_mp.c: sev(); /usr/src/sys/arm/include/cpu-v6.h:#define sev() __asm __volatile("sev" : := : "memory") /usr/src/sys/arm/arm/mp_machdep.c: sev(); /usr/src/sys/arm/ti/omap4/omap4_mp.c: sev(); /usr/src/sys/arm/freescale/imx/imx6_mp.c: sev(); /usr/src/sys/arm/rockchip/rk30xx_mp.c: sev(); /usr/src/sys/arm/nvidia/tegra124/tegra124_mp.c: sev(); /usr/src/sys/arm/samsung/exynos/exynos5_mp.c: sev(); These all seem to have dsb use, for example /usr/src/sys/arm/arm/mp_machdep.c has: atomic_store_rel_int(&aps_ready, 1); /* Wake the other threads up */ dsb(); sev(); printf("Release APs\n"); in its release_aps . --=20 You are receiving this mail because: You are the assignee for the bug.=