From e27d5abd701a11118fc42a9b4fb719c0a3b928f4 Mon Sep 17 00:00:00 2001 From: leoliu-oc Date: Sat, 11 Oct 2025 17:44:23 +0800 Subject: [PATCH] hwmon: zhaoxin-cputemp: Update for KH-50000 zhaoxin inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ID2U0P CVE: NA -------------------- Adds support for KH-50000 CPU with model 0x7b in the zhaoxin-cputemp driver. It extends the existing `x86_cpu_id` array to include this new CPU model. Reviewed-by: Tony W. Wang Tested-by: Lyle Li Signed-off-by: leoliu-oc --- drivers/hwmon/zhaoxin-cputemp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/zhaoxin-cputemp.c b/drivers/hwmon/zhaoxin-cputemp.c index 751d2c5a868a..3c4eeda7b40f 100644 --- a/drivers/hwmon/zhaoxin-cputemp.c +++ b/drivers/hwmon/zhaoxin-cputemp.c @@ -122,7 +122,7 @@ static int zhaoxin_cputemp_probe(struct platform_device *pdev) data->id = pdev->id; data->name = "zhaoxin_cputemp"; data->msr_temp = 0x1423; - if (c->x86_model == 0x6b) { + if (c->x86_model == 0x6b || c->x86_model == 0x7b) { data->msr_crit = 0x175b; data->msr_max = 0x175a; } else { @@ -249,6 +249,8 @@ static const struct x86_cpu_id cputemp_ids[] __initconst = { X86_MATCH_VENDOR_FAM_MODEL(ZHAOXIN, 7, 0x5b, NULL), X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 7, 0x6b, NULL), X86_MATCH_VENDOR_FAM_MODEL(ZHAOXIN, 7, 0x6b, NULL), + X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 7, 0x7b, NULL), + X86_MATCH_VENDOR_FAM_MODEL(ZHAOXIN, 7, 0x7b, NULL), {} }; MODULE_DEVICE_TABLE(x86cpu, cputemp_ids); -- Gitee