From nobody Thu Oct 27 05:19:22 2022 X-Original-To: dev-commits-src-main@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 4MyYrV5qFpz4gBdq; Thu, 27 Oct 2022 05:19:22 +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 4MyYrV54pdz3Yyq; Thu, 27 Oct 2022 05:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666847962; 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=ejhQI6TfXcD18YuFDr1mwJHHuzcinzHBTbWQ6sgC+pA=; b=A/GVxol8qMp97bKxPRght2NnM/PlAnug/N6zKS4NFS2qmzxiGq2YveJikKfw7JsJp96G4g T87u/BoN/HPjlcHxFNSaSIFFZu5+KpEUqAPmsHwfFvF0K6l7B3J8IxgfqmZiAAwcCfpI0P O6jVghnWZl1yIM8wix5Dir7BF51q84uwEwVc6R5V/A0UKBRNQXG7OGCzQkVpC5ANKMXyJ0 9cY/HIFu55HEGQnUktu7hV8HlpLxjuUvRp3MIqDRMp+YQpPvb+stoADTifH0Iuuw478jSG edGgKc5J1lXEdDdcNxE3/9zRLtCqY5Ciktjd7lsguoI0kF0eU1yAbN0NhF+rSA== 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 4MyYrV43wyzlgC; Thu, 27 Oct 2022 05:19:22 +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 29R5JMmd043871; Thu, 27 Oct 2022 05:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29R5JM7W043870; Thu, 27 Oct 2022 05:19:22 GMT (envelope-from git) Date: Thu, 27 Oct 2022 05:19:22 GMT Message-Id: <202210270519.29R5JM7W043870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 866beaa0aa95 - main - psci: set psci_present as early as possible List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 866beaa0aa95deeba467db3dcb605ba3a5048a5b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666847962; 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=ejhQI6TfXcD18YuFDr1mwJHHuzcinzHBTbWQ6sgC+pA=; b=gKDLcrefeUFQxq9+o5bYLENkMplV2228yHIurNZod5HuBeJVTbcebptBjcPi8dC0kVGb+D lcZVBXvO3cbtCbP0LDThZ7zLr7SJTrEx/Qbozvqi/cIL/EgBvADm++QmMdboLX7QeY9BOI HJQlcsClAk8SqFxopow4nkYDYNE/LPw9uev0ky3IEk7AflDnFG2VParxd0fRAY21xMG8ek BdPifPcWoO+CkMLRQdgdGfX+AUsrloD5nw0cyhufHkM1tE2iRBoyxiriphOiE8TzQzNOxj IwLxPcZ4zspfrictxg6O0cuH1Mrrm3HcMFQRJL+yLyg6wRLs8KmLvB/ljF7cmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666847962; a=rsa-sha256; cv=none; b=F1pISFs4pVpbIsak49BgID0Bht5c1LxeKkBDfCkb7WLgZppk3uH3fHY12t7NIcSOsMm/8l 06T1R/YWZE/FJefysZso/Kx42r8NfCv47WgeLHMSCZ5SiCcDEuW6/IG41LKynUmJHf10u0 l0YGLyhO47/scF61GbXmCrBb7F0EYVYDF0t1Eo44NIpjUMdJx6bODeJGE4tomF7Wpqv778 Bemwql+tHBuhWxHBR3eLFcgjQ/FdNz0GM1NrhWQg1j8piC8hpj2SK4PoGPvzS8H0Yvco6m fB1tyMLl7JPli7EhVNg47imZoPOz1sQ42PtVP66WfmeVSH7dDUoZuK6FGLcZzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=866beaa0aa95deeba467db3dcb605ba3a5048a5b commit 866beaa0aa95deeba467db3dcb605ba3a5048a5b Author: Kyle Evans AuthorDate: 2022-10-27 03:46:45 +0000 Commit: Kyle Evans CommitDate: 2022-10-27 04:22:23 +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 --- 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 db308a550d3a..d7c89bf058f8 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); @@ -344,7 +345,6 @@ psci_attach(device_t dev, psci_initfn_t psci_init, int default_version) return (ENXIO); psci_softc = sc; - psci_present = true; return (0); }