Merge: [RHEL 10.4] hwmon: (k10temp) Add per-CCD temperature monitoring for Zen5 Turin

MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/3358

JIRA: https://redhat.atlassian.net/browse/RHEL-247220

commit 8440d5aca227d623801b5f8a2b9e3d86b7daa8bf
Author: Gabriel Ford <gabriel@gford.dev>
Date:   Thu Aug 13 17:02:08 2026 +0000

    hwmon: (k10temp) Add per-CCD temperature monitoring for Zen5 Turin

    Add support for per-CCD temperature monitoring on Zen 5 Turin (EPYC 9005)
    CPUs, as they fall into a separate model range with a different offset
    and a higher maximum CCD count than their desktop counterparts. As such,
    this patch also updates the driver to support CPUs with up to 16 CCDs.
    Tested and working on an EPYC 9555P.

    Signed-off-by: Gabriel Ford <gabriel@gford.dev>
    Link: https://lore.kernel.org/r/20260813170232.3841-1-gabriel@gford.dev
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>

(cherry picked from commit 8440d5aca227d623801b5f8a2b9e3d86b7daa8bf)
Assisted-by: Patchpal
Signed-off-by: Dennis Chen <dechen@redhat.com>

Approved-by: Steve Best <sbest@redhat.com>
Approved-by: David Arcari <darcari@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
This commit is contained in:
CKI KWF Bot
2026-09-01 07:27:27 +00:00
+13 -1
View File
@@ -210,6 +210,10 @@ static const char *k10temp_temp_label[] = {
"Tccd10",
"Tccd11",
"Tccd12",
"Tccd13",
"Tccd14",
"Tccd15",
"Tccd16",
};
static int k10temp_read_labels(struct device *dev,
@@ -246,7 +250,7 @@ static int k10temp_read_temp(struct device *dev, u32 attr, int channel,
if (*val < 0 && !data->disp_negative)
*val = 0;
break;
case 2 ... 13: /* Tccd{1-12} */
case 2 ... 17: /* Tccd{1-16} */
ret = read_ccd_temp_reg(data, channel - 2, &regval);
if (ret)
@@ -387,6 +391,10 @@ static const struct hwmon_channel_info * const k10temp_info[] = {
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL),
NULL
};
@@ -518,6 +526,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
} else if (boot_cpu_data.x86 == 0x1a) {
switch (boot_cpu_data.x86_model) {
case 0x00 ... 0x2f: /* Zen5 Turin */
data->ccd_offset = 0x1F0;
k10temp_get_ccd_support(data, 16);
break;
case 0x40 ... 0x4f: /* Zen5 Ryzen Desktop */
data->ccd_offset = 0x308;
k10temp_get_ccd_support(data, 8);