From nobody Wed Mar 23 19:48:24 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 128171A442F8; Wed, 23 Mar 2022 19:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KNzRs01M2z4T6r; Wed, 23 Mar 2022 19:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648064905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KBxjxm0LoNRMOSShJ5y1kxJqUy8rPoljVYqkiEP4xC4=; b=s9VC1bjJ7PuogdCAut6Y5Tfd49keAlNDyoHnG38EYwt9rTZIwv8JBaAvxjwoDtA6IU8G7N IZcFpsojJispAaV3Vx42AnbgPQORbtm3FvwGA1zM3niOIKU5Xfnoi+VmJsD0+uXWmIemuU 0Aeivi6s9ROwip2ql3B2GwpH3BzHlkgN3h2/gB1pmvJ2NfU3hwY9cVhDv9vFkD54tkQwb0 MavaDahg4wx8XPinixBtzmb+ZAMbBbGZvDK5F2Ae6CSI7VWZ1GYI99XQXBk/Naihgh+y0Z PP8uiBO0PHLf2d3LorfNi92wKOILBIGijNQeYsxvjM4GQNAczL+AvvhZ3uV/Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4E261A17; Wed, 23 Mar 2022 19:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22NJmOU5007977; Wed, 23 Mar 2022 19:48:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NJmOBh007976; Wed, 23 Mar 2022 19:48:24 GMT (envelope-from git) Date: Wed, 23 Mar 2022 19:48:24 GMT Message-Id: <202203231948.22NJmOBh007976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: f5f567c2264b - releng/13.1 - Make the arm64 get_pcpu a function again List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: f5f567c2264bf4960042a0a3751f6905d34bc3df Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648064905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KBxjxm0LoNRMOSShJ5y1kxJqUy8rPoljVYqkiEP4xC4=; b=tzy9QYw0uEDw4eSPxhRz+hNj6YoQgY3zj3PhKEBwm3H6glrFQCESfdDlfCPj806bnflizR hrF5CqJIxT67OeCZ2Sb1SsKyGqgoaGh0FaO3LsMvn5jxMs6GLIvy9nDlB/Jp6iBH1JwvOu DLXHWmPCB4UP6KWelgE9WyDAyK1k2LsW59q+66ftuJqTQC+9lzKOOmM//O2sdnj7M9NZWG tZZ5K2pi3RgwwY8b8gSPHz2yo5GvBVatjnoluybCmR8xGkc2+uTvK0E4PEP5g0D6GOTEaq bo3WX0UTUiO61bs3NJJj4qdB/aVMwLh2kvRlG/o99KLX715g3RXcyG563iIT+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648064905; a=rsa-sha256; cv=none; b=XhyWfMeuE+ncHPnePpUFmCtgz0UdrNra/zuOFKslrpQH5boCjluCiKIRfGBFH+rg9BiMT2 VhT162eFyhUkaCpdNAyMV1nxAefjqwcAsC7RI/Qfy5hQYtxWOXvnzehxOaCHjW1WpuFDyu j+VoVEK/sIbx7W+LgLaA0Ih1GiRJ0pvMgS4XgfxMZyWNJlOfaWD0w0+h14Csqz+VAoWIki RmVYB6IAo3gkn3hx+FA2OjiWVNYqeGOVCUm4+JNFepzO6GoJ75i1qBihCLMqTgni64W/vd 0GOK6CW8K1ckcpidKAdQa27GYGXRj0RmbpHJ9CwcL+VHOfM8PIP3tJVL6og4Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f567c2264bf4960042a0a3751f6905d34bc3df commit f5f567c2264bf4960042a0a3751f6905d34bc3df Author: Andrew Turner AuthorDate: 2022-03-08 11:38:51 +0000 Commit: Andrew Turner CommitDate: 2022-03-23 19:46:58 +0000 Make the arm64 get_pcpu a function again We assume the pointer returned from get_pcpu will be consistent even if the thread is moved to a new CPU. Fix this by partially reverting 63c858a04d565 to make get_pcpu a function again. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation (cherry picked from commit ed306634266002a05c88c3a4cd036c99d4cd139a) (cherry picked from commit 1169099f8fd981f2e085f451f0b4a62e18bfe507) --- sys/arm64/include/pcpu.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/arm64/include/pcpu.h b/sys/arm64/include/pcpu.h index ce4dc46e1609..d83c9a656634 100644 --- a/sys/arm64/include/pcpu.h +++ b/sys/arm64/include/pcpu.h @@ -58,7 +58,14 @@ struct pcpu; register struct pcpu *pcpup __asm ("x18"); -#define get_pcpu() pcpup +static inline struct pcpu * +get_pcpu(void) +{ + struct pcpu *pcpu; + + __asm __volatile("mov %0, x18" : "=&r"(pcpu)); + return (pcpu); +} static inline struct thread * get_curthread(void)