]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwmon/coretemp.c
Merge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm into...
[karo-tx-linux.git] / drivers / hwmon / coretemp.c
index 9323837866422c181df7bee75b48cd7693db7bc2..104b3767516cb91b95d310a52c0968adf0d2c639 100644 (file)
@@ -60,14 +60,13 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
 #ifdef CONFIG_SMP
 #define TO_PHYS_ID(cpu)                cpu_data(cpu).phys_proc_id
 #define TO_CORE_ID(cpu)                cpu_data(cpu).cpu_core_id
-#define TO_ATTR_NO(cpu)                (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO)
 #define for_each_sibling(i, cpu)       for_each_cpu(i, cpu_sibling_mask(cpu))
 #else
 #define TO_PHYS_ID(cpu)                (cpu)
 #define TO_CORE_ID(cpu)                (cpu)
-#define TO_ATTR_NO(cpu)                (cpu)
 #define for_each_sibling(i, cpu)       for (i = 0; false; )
 #endif
+#define TO_ATTR_NO(cpu)                (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO)
 
 /*
  * Per-Core Temperature Data
@@ -325,15 +324,6 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
        return adjust_tjmax(c, id, dev);
 }
 
-static void __devinit get_ucode_rev_on_cpu(void *edx)
-{
-       u32 eax;
-
-       wrmsr(MSR_IA32_UCODE_REV, 0, 0);
-       sync_core();
-       rdmsr(MSR_IA32_UCODE_REV, eax, *(u32 *)edx);
-}
-
 static int create_name_attr(struct platform_data *pdata, struct device *dev)
 {
        sysfs_attr_init(&pdata->name_attr.attr);
@@ -380,27 +370,16 @@ exit_free:
 static int __cpuinit chk_ucode_version(unsigned int cpu)
 {
        struct cpuinfo_x86 *c = &cpu_data(cpu);
-       int err;
-       u32 edx;
 
        /*
         * Check if we have problem with errata AE18 of Core processors:
         * Readings might stop update when processor visited too deep sleep,
         * fixed for stepping D0 (6EC).
         */
-       if (c->x86_model == 0xe && c->x86_mask < 0xc) {
-               /* check for microcode update */
-               err = smp_call_function_single(cpu, get_ucode_rev_on_cpu,
-                                              &edx, 1);
-               if (err) {
-                       pr_err("Cannot determine microcode revision of "
-                              "CPU#%u (%d)!\n", cpu, err);
-                       return -ENODEV;
-               } else if (edx < 0x39) {
-                       pr_err("Errata AE18 not fixed, update BIOS or "
-                              "microcode of the CPU!\n");
-                       return -ENODEV;
-               }
+       if (c->x86_model == 0xe && c->x86_mask < 0xc && c->microcode < 0x39) {
+               pr_err("Errata AE18 not fixed, update BIOS or "
+                      "microcode of the CPU!\n");
+               return -ENODEV;
        }
        return 0;
 }