From nobody Wed Nov 02 04:11:48 2022 X-Original-To: dev-commits-src-branches@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 4N2D3m5bCtz4h0bj; Wed, 2 Nov 2022 04:11:48 +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 4N2D3m55R1z3M8M; Wed, 2 Nov 2022 04:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667362308; 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=3X5UcsM9SFwW8kFip+fbl0oxCaAXgs42mqxVSMOTKb4=; b=u1oatRsA3wJIYIQzNvTiWiL5+4omxPci6bNZLGbXwYTBJZC85N5MDXTCxsnpGmtuaGwcmW Ly//CUSm/Zhxdrtnf+PBDRMcyym/78sRecuxalufJgzmq8pgIoDNDLWUIrPmIlL9cDvp9Y CIXRIqHxi+Hs2EEueaU3e7FPiDQpCfnDZunVrw+XJY+5Woo5Pup2QBSVOSyY92R/zwehnC BTurg4cVQH3mpax4oPvG8XR+Y2awjiKTICNJbaSWBv/v/2QVoGS/myptHFRlFnZ96BepXf HduiDV+K13EZ7Z+m2ntDJwsGSiBo0NFJ3GbqXW4XRwe/JBKhWxCLPHDFC+24YA== 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 4N2D3m4829zhrx; Wed, 2 Nov 2022 04:11:48 +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 2A24BmJR074998; Wed, 2 Nov 2022 04:11:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A24Bmth074997; Wed, 2 Nov 2022 04:11:48 GMT (envelope-from git) Date: Wed, 2 Nov 2022 04:11:48 GMT Message-Id: <202211020411.2A24Bmth074997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4a7fe8305e77 - stable/13 - psci: set psci_present as early as possible List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4a7fe8305e7729d8dd77de8517bf31f8f2fcb9a5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667362308; 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=3X5UcsM9SFwW8kFip+fbl0oxCaAXgs42mqxVSMOTKb4=; b=BGT8oUxG6mLR6t/LLcotnPy6U8tH1w8kI1KCHvS7x04M4R3tFajmk0kygvF2C51vYAc6+A vvoOoUUFuA4OFtsRg6MSO7V0coDMrUJ3f0GAZ0zcH0sWtIjXULGkflAUzMgGKKhD5+agvT 3etaHDKHvttc3TqdLkNMIQtEByEYK34kW7mgPEMTI14Iwkx2WPNGeukyEDui1lYv6fbVaN WUJqeXLIC+8tEz6czfVAO5ss54fH8EKeAyS6ni/F9FmvEaJPy5sUfTE61OHmjtVCcERicf 7sgDOnaMt8AAhzo2z2tkpuPkaPkDOVraXbs6a+bO512O0u+ihjUxzsvRaPQsFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667362308; a=rsa-sha256; cv=none; b=xnYdXgEov9FqilM+jwmoxODPJ2WXLsHFGS0h0/uBm0Yq25S+KWgU2Vp5UDlz+HQctpJhdv kZmC1rd3valivXUqciLUdqE03+T04o3J1/rWO9W45z+yjpdi/Ify9wc/EMqRxzncvpWSTR 68f5cVTYNHG9EzfOzEQJQqkURMQKIhIEJGkXBQcPS3c66tnHC6AZx+ovtw9mzcSi+VoORO dD8H8SfkEk0HhcCJCUEiMz/bRDV3lHaYawXda97voqH91awau1ZcVR+OQU3zkjYM0THoge KJi4A0foUBAFDseVv8FbgJqsTDxnb/VlFjKFquO4xME2b15ejndDvV5fPVmuMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4a7fe8305e7729d8dd77de8517bf31f8f2fcb9a5 commit 4a7fe8305e7729d8dd77de8517bf31f8f2fcb9a5 Author: Kyle Evans AuthorDate: 2022-10-27 03:46:45 +0000 Commit: Kyle Evans CommitDate: 2022-11-02 04:11:09 +0000 psci: set psci_present as early as possible psci_attach is way too late to provide the intended semantics for psci_present. psci calls can be made immediately after psci_init(), called way earlier at SI_SUB_CPU + SI_ORDER_FIRST, and we need it to be valid as early as we can possibly call a psci function. This fixes booting RPi3+4 with the in-review spintable patch; rpi3-psci-monitor patches the FDT to add a PSCI node, but it doesn't patch each cpus' enable-method. Because of this, we would stall the boot while enabling CPU 1 as we saw a valid looking enable-method and "no" functional PSCI and attempted to use the spintable rather than simply not starting secondary APs. Fixes: 2218070b2c3c32 ("psci: finish psci_present implementation") Reported by: karels (cherry picked from commit 866beaa0aa95deeba467db3dcb605ba3a5048a5b) --- sys/dev/psci/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c index dd760d8e221a..d54ee62fb328 100644 --- a/sys/dev/psci/psci.c +++ b/sys/dev/psci/psci.c @@ -146,6 +146,7 @@ psci_init(void *dummy) } psci_callfn = new_callfn; + psci_present = true; } /* This needs to be before cpu_mp at SI_SUB_CPU, SI_ORDER_THIRD */ SYSINIT(psci_start, SI_SUB_CPU, SI_ORDER_FIRST, psci_init, NULL); @@ -348,7 +349,6 @@ psci_attach(device_t dev, psci_initfn_t psci_init, int default_version) return (ENXIO); psci_softc = sc; - psci_present = true; return (0); }