Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170640368
D41917.id127572.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41917.id127572.diff
View Options
diff --git a/sys/dev/psci/smccc.c b/sys/dev/psci/smccc.c
--- a/sys/dev/psci/smccc.c
+++ b/sys/dev/psci/smccc.c
@@ -43,7 +43,7 @@
#define SMCCC_VERSION_1_0 0x10000
/* Assume 1.0 until we detect a later version */
-static uint32_t smccc_version = SMCCC_VERSION_1_0;
+static uint32_t smccc_version;
void
smccc_init(void)
@@ -51,6 +51,7 @@
int32_t features;
uint32_t ret;
+ smccc_version = SMCCC_VERSION_1_0;
features = psci_features(SMCCC_VERSION);
if (features != PSCI_RETVAL_NOT_SUPPORTED) {
ret = psci_call(SMCCC_VERSION, 0, 0, 0);
@@ -69,6 +70,7 @@
uint32_t
smccc_get_version(void)
{
+ MPASS(smccc_version != 0);
return (smccc_version);
}
@@ -76,6 +78,7 @@
smccc_arch_features(uint32_t smccc_func_id)
{
+ MPASS(smccc_version != 0);
if (smccc_version == SMCCC_VERSION_1_0)
return (PSCI_RETVAL_NOT_SUPPORTED);
@@ -90,6 +93,7 @@
smccc_arch_workaround_1(void)
{
+ MPASS(smccc_version != 0);
KASSERT(smccc_version != SMCCC_VERSION_1_0,
("SMCCC arch workaround 1 called with an invalid SMCCC interface"));
return (psci_call(SMCCC_ARCH_WORKAROUND_1, 0, 0, 0));
@@ -99,6 +103,7 @@
smccc_arch_workaround_2(int enable)
{
+ MPASS(smccc_version != 0);
KASSERT(smccc_version != SMCCC_VERSION_1_0,
("SMCCC arch workaround 2 called with an invalid SMCCC interface"));
return (psci_call(SMCCC_ARCH_WORKAROUND_2, enable, 0, 0));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 6, 6:35 PM (1 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38410836
Default Alt Text
D41917.id127572.diff (1 KB)
Attached To
Mode
D41917: Check SMCCC is ready before using
Attached
Detach File
Event Timeline
Log In to Comment