Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2022 00:06:41 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2f2eb7f1180f - stable/13 - psci: finish psci_present implementation
Message-ID:  <202204250006.23P06fDq073920@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=2f2eb7f1180f6c63163c8acf44a4322a7c2075bb

commit 2f2eb7f1180f6c63163c8acf44a4322a7c2075bb
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2022-03-19 03:03:44 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2022-04-25 00:06:23 +0000

    psci: finish psci_present implementation
    
    This was already declared in psci.h, but it was never defined/set.  Do
    this now, so we can use it to decide if enable-method in /cpus FDT nodes
    should be inspected later on.  While we're here, convert it to a
    boolean.
    
    Reviewed by:    andrew (slightly earlier version)
    
    (cherry picked from commit 2218070b2c3c32b1574f3f3b2d0579b2d4826554)
---
 sys/dev/psci/psci.c | 2 ++
 sys/dev/psci/psci.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c
index f2bd4c698e5a..dd760d8e221a 100644
--- a/sys/dev/psci/psci.c
+++ b/sys/dev/psci/psci.c
@@ -84,6 +84,7 @@ static int psci_v0_1_init(device_t dev, int default_version);
 static int psci_v0_2_init(device_t dev, int default_version);
 
 struct psci_softc *psci_softc = NULL;
+bool psci_present;
 
 #ifdef __arm__
 #define	USE_ACPI	0
@@ -347,6 +348,7 @@ psci_attach(device_t dev, psci_initfn_t psci_init, int default_version)
 		return (ENXIO);
 
 	psci_softc = sc;
+	psci_present = true;
 
 	return (0);
 }
diff --git a/sys/dev/psci/psci.h b/sys/dev/psci/psci.h
index f2c8a43c81ea..8004498426c5 100644
--- a/sys/dev/psci/psci.h
+++ b/sys/dev/psci/psci.h
@@ -37,7 +37,7 @@ typedef int (*psci_callfn_t)(register_t, register_t, register_t, register_t,
 	register_t, register_t, register_t, register_t,
 	struct arm_smccc_res *res);
 
-extern int psci_present;
+extern bool psci_present;
 
 int	psci_cpu_on(unsigned long, unsigned long, unsigned long);
 void	psci_reset(void);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204250006.23P06fDq073920>