hwmon, via-cputemp: support new centaur CPUs
PATCH 1/1 hwmon, via-cputemp: support new centaur CPUs
--- drivers/hwmon/via-cputemp.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/hwmon/via-cputemp.c +7 -0
@@ -136,6 +136,11 @@ static int via_cputemp_probe(struct platform_device *pdev) data->id = pdev->id; data->name ="via_cputemp" ; +if (c->x86_model ==7 ) { + data->msr_temp =0x1423 ; + goto test_access; + } +switch (c->x86_model) {case 0xA :/* C7 A */
@@ -152,6 +157,7 @@ static int via_cputemp_probe(struct platform_device *pdev)return -ENODEV ; } +test_access:/* test if we can access the TEMPERATURE MSR */ err =rdmsr_safe_on_cpu (data->id, data->msr_temp, &eax, &edx);if (err) {
@@ -283,6 +289,7 @@ static int via_cputemp_down_prep(unsigned int cpu) { X86_VENDOR_CENTAUR, 6, 0xa, }, /* C7 A */ { X86_VENDOR_CENTAUR, 6, 0xd, }, /* C7 D */ { X86_VENDOR_CENTAUR, 6, 0xf, }, /* Nano */ + { X86_VENDOR_CENTAUR, 7, X86_MODEL_ANY, }, {} };MODULE_DEVICE_TABLE (x86cpu, cputemp_ids);
Signature · 1 line
1.9.1
+if (c->x86_model == 7) {
Should be:
+if(c->x86 == 7)
-----邮件原件-----
发件人: David Wang
发送时间: 2018年3月29日 14:18
收件人: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
抄送: Bruce Chang (VAS) <[email protected]>; Cooper Yan(BJ-RD) <[email protected]>; Qiyuan Wang(BJ-RD) <[email protected]>; Benjamin Pan <[email protected]>; Luke Lin <[email protected]>; Tim Guo(BJ-RD) <[email protected]>; David Wang <[email protected]> 主题: [PATCH] hwmon, via-cputemp: support new centaur CPUs
--- drivers/hwmon/via-cputemp.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/hwmon/via-cputemp.c +7 -0
@@ -136,6 +136,11 @@ static int via_cputemp_probe(struct platform_device *pdev) data->id = pdev->id; data->name ="via_cputemp" ; +if (c->x86_model ==7 ) { +data->msr_temp =0x1423 ; +goto test_access; +} +switch (c->x86_model) {case 0xA :/* C7 A */
@@ -152,6 +157,7 @@ static int via_cputemp_probe(struct platform_device *pdev)return -ENODEV ; } +test_access:/* test if we can access the TEMPERATURE MSR */ err =rdmsr_safe_on_cpu (data->id, data->msr_temp, &eax, &edx);if (err) {
@@ -283,6 +289,7 @@ static int via_cputemp_down_prep(unsigned int cpu) { X86_VENDOR_CENTAUR, 6, 0xa, }, /* C7 A */ { X86_VENDOR_CENTAUR, 6, 0xd, }, /* C7 D */ { X86_VENDOR_CENTAUR, 6, 0xf, }, /* Nano */ +{ X86_VENDOR_CENTAUR, 7, X86_MODEL_ANY, }, {} };MODULE_DEVICE_TABLE (x86cpu, cputemp_ids);
--
1.9.1
保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.