lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251117.191555.1034668076458804931.rene@exactco.de>
Date: Mon, 17 Nov 2025 19:15:55 +0100 (CET)
From: René Rebe <rene@...ctco.de>
To: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Guenter Roeck <linux@...ck-us.net>, Thomas Gleixner
 <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov
 <bp@...en8.de>, x86@...nel.org, Dave Hansen <dave.hansen@...ux.intel.com>,
 "H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH V2] hwmon: (via-cputemp) Add Via CHA ID

Add Via CHA CPU device ID to via-cputemp to support reading that last
CPU temperature some of us have, too. While at it, use defines for all
CPU model checks.

Signed-off-by: René Rebe <rene@...ctco.de>

---
v2: use defines for CPU model checks

diff --git a/arch/x86/include/asm/cpu_device_id.h b/arch/x86/include/asm/cpu_device_id.h
index 6be777a06944..03b0c6d0760d 100644
--- a/arch/x86/include/asm/cpu_device_id.h
+++ b/arch/x86/include/asm/cpu_device_id.h
@@ -52,6 +52,7 @@
 #define X86_CENTAUR_FAM6_C7_A		0xa
 #define X86_CENTAUR_FAM6_C7_D		0xd
 #define X86_CENTAUR_FAM6_NANO		0xf
+#define X86_CENTAUR_FAM6_CHA		0x47
 
 /* x86_cpu_id::flags */
 #define X86_CPU_ID_FLAG_ENTRY_VALID	BIT(0)
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
index 823bff2871e1..81373f9e7b32 100644
--- a/drivers/hwmon/via-cputemp.c
+++ b/drivers/hwmon/via-cputemp.c
@@ -126,15 +126,13 @@ static int via_cputemp_probe(struct platform_device *pdev)
 		data->msr_temp = 0x1423;
 	} else {
 		switch (c->x86_model) {
-		case 0xA:
-			/* C7 A */
-		case 0xD:
-			/* C7 D */
+		case X86_CENTAUR_FAM6_C7_A:
+		case X86_CENTAUR_FAM6_C7_D:
 			data->msr_temp = 0x1169;
 			data->msr_vid = 0x198;
 			break;
-		case 0xF:
-			/* Nano */
+		case X86_CENTAUR_FAM6_NANO:
+		case X86_CENTAUR_FAM6_CHA:
 			data->msr_temp = 0x1423;
 			break;
 		default:
@@ -272,6 +270,7 @@ static const struct x86_cpu_id __initconst cputemp_ids[] = {
 	X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_C7_A,	NULL),
 	X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_C7_D,	NULL),
 	X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_NANO,	NULL),
+	X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 6, X86_CENTAUR_FAM6_CHA,	NULL),
 	X86_MATCH_VENDOR_FAM_MODEL(CENTAUR, 7, X86_MODEL_ANY,		NULL),
 	{}
 };

-- 
  René Rebe, ExactCODE GmbH, Berlin, Germany
  https://exactco.de | https://t2linux.com | https://rene.rebe.de

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ