summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-09-28 09:15:12 +0200
committerArnd Bergmann <arnd@arndb.de>2023-09-28 09:15:12 +0200
commit5106e65f23ce81d48d135cb77f3ab4faf59ffad8 (patch)
treea0861f9e7336ebc3dceaa02af76f306d947c95f4 /drivers
parent79684f2ea3759592d3738c9240beb302fbcf0482 (diff)
parentc3638b851bc1ca0022dca9d6ca4beaa6ef03a216 (diff)
Merge tag 'scmi-fix-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes
Arm SCMI fix for v6.6 A single fix to address scmi_perf_attributes_get() using the protocol version even before it was populated and ending up with unexpected bogowatts power scale. * tag 'scmi-fix-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fixup perf power-cost/microwatt support Link: https://lore.kernel.org/r/20230927121604.158645-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firmware/arm_scmi/perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index c0cd556fbaae..30dedd6ebfde 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
if (!pinfo)
return -ENOMEM;
+ pinfo->version = version;
+
ret = scmi_perf_attributes_get(ph, pinfo);
if (ret)
return ret;
@@ -1104,8 +1106,6 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
if (ret)
return ret;
- pinfo->version = version;
-
return ph->set_priv(ph, pinfo);
}