From nobody Tue Mar 08 11:59:43 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 83C7E1A08D85; Tue, 8 Mar 2022 11:59:43 +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 4KCYlz2t7Hz3MXc; Tue, 8 Mar 2022 11:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646740783; 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=+2/4OeHqEEwCGdMG3wXpWvMaE+WxTDh2sL9KiewWu4s=; b=m8oX0v4jRL3AZIN5YEww003fQfEf9HdcwPvFEOtwW0E+fYstyLkFvpTttzrFY5fG+DApZw rNtnVR7wjWuoVT5Fl2plCwOqwTEF7zsnbfX1c13Pc3m0igBdaiE7uJXprQ77uetFzWWJvE CYvd6AXWl87IqAyQKRLLDddhHmHk2EHm3NhMtFZzTaaeCRNNElFEODJ+yVLoevgPb9XKa6 FdMph+8Gu5FpJxu3QK9iFDCtYFQuPvIkyrCjzpHEChwhvTTNBR7Lm8YRAx5Kg99FAVpXzC GjhkaLdIHEfavGs/nIAl9ZLba/yt8mw6jdFXg/5HcIzFr/FbXXbg1KclZrX7/w== 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 37FC81BDC5; Tue, 8 Mar 2022 11:59:43 +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 228BxhNJ004205; Tue, 8 Mar 2022 11:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 228BxhSD004204; Tue, 8 Mar 2022 11:59:43 GMT (envelope-from git) Date: Tue, 8 Mar 2022 11:59:43 GMT Message-Id: <202203081159.228BxhSD004204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ed3066342660 - main - 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/main X-Git-Reftype: branch X-Git-Commit: ed306634266002a05c88c3a4cd036c99d4cd139a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646740783; 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=+2/4OeHqEEwCGdMG3wXpWvMaE+WxTDh2sL9KiewWu4s=; b=walov300iAvgCvv2vHUAIBIlLfHKrrNahwW946p18+n/w4gXjNYGpR7woU7bYI1fLUthvS LBdcQqHKC5hYb+PrD+wzAxmaQVhumVyA8d4KlHuZiGbAOMZQL2BT3bHYXVwEcqoPglBWcl ZyFj2iZ12FIZAJgYUBvoerWxpzZKc30NSZ4vlJnl6F1TFPlsktj6nin3cVD9DqtGMnSPkW CxhZhu6EQgrPFFWODsehNp1mnPUQm8QArJBz2iIpp3utMxIvPB73UGvzIAu7t1wrV6bLPC OXDCJaOIaRMTTNrI6JNQsqnKLrm6OGe+oWuzQ12QpPReI4zqiVrNoim+myS5VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646740783; a=rsa-sha256; cv=none; b=FSh6JhNhlRl7dWoHx7mApQIX0n+iwtgrhETsFjgaztjUo3FyH8s6EpandRehXH9Qb5667F 5BKFePpjogBq41X8lYIpDqRLztj7ei7PAvZ+vP7PbJzyPTEsTnKOqob7lES9kR2mnp8dV+ CkuSqlJV/4Y1uNT5GsFPOAE+eWpnqoSOVV+sV9657cManmuq6vv40uYs0vuHGC9LshZXEE +Lf8Fz5YLqFYZ5UX87/U+j3R0mNQg1aFchnrTrOxVfqF1gH8XOwmpfqhw7iwgNymQ65SFT JbkZDEvBAl2tcE+Gqf3L4FglkgzUjX0AUZqqH8IGzxCyzST4Meio08fBsmYxKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ed306634266002a05c88c3a4cd036c99d4cd139a commit ed306634266002a05c88c3a4cd036c99d4cd139a Author: Andrew Turner AuthorDate: 2022-03-08 11:38:51 +0000 Commit: Andrew Turner CommitDate: 2022-03-08 11:54: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. Sponsored by: The FreeBSD Foundation --- 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 09f6361c651c..b93f3b2e4816 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)