Commit f763c0c
committed
hwmon: (k10temp) Define a helper function to read CCD temperature
JIRA: https://issues.redhat.com/browse/RHEL-104300
commit cc66126
Author: Yazen Ghannam <yazen.ghannam@amd.com>
Date: Thu Jun 6 11:12:58 2024 -0500
hwmon: (k10temp) Define a helper function to read CCD temperature
The CCD temperature register is read in two places. These reads are done
using an AMD SMN access, and a number of parameters are needed for the
operation.
Move the SMN access and parameter gathering into a helper function in order to
simplify the code flow. This also has a benefit of centralizing the hardware
register access in a single place in case fixes or special decoding is required.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-5-ffde21931c3f@amd.com
Signed-off-by: David Arcari <darcari@redhat.com>1 parent 08ecf51 commit f763c0c
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
| |||
228 | 235 | | |
229 | 236 | | |
230 | 237 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 238 | + | |
234 | 239 | | |
235 | 240 | | |
236 | 241 | | |
| |||
402 | 407 | | |
403 | 408 | | |
404 | 409 | | |
405 | | - | |
406 | | - | |
| 410 | + | |
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
| |||
0 commit comments