X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=drivers%2Fhwmon%2Fcoretemp.c;h=d73d0ba4785e3b103a7434b7ccd23b6db12d0fc7;hb=dccb2a9a147dbb973bca41ed67bdddf3676c77f6;hp=93c17223b527018271b0febf9b96b4af4d030670;hpb=e77295dc9e6b52281ae85af4068f13752524e9f4;p=karo-tx-linux.git diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 93c17223b527..d73d0ba4785e 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -52,6 +52,7 @@ struct coretemp_data { struct mutex update_lock; const char *name; u32 id; + u16 core_id; char valid; /* zero until following fields are valid */ unsigned long last_updated; /* in jiffies */ int temp; @@ -74,7 +75,7 @@ static ssize_t show_name(struct device *dev, struct device_attribute if (attr->index == SHOW_NAME) ret = sprintf(buf, "%s\n", data->name); else /* show label */ - ret = sprintf(buf, "Core %d\n", data->id); + ret = sprintf(buf, "Core %d\n", data->core_id); return ret; } @@ -191,7 +192,7 @@ static int __devinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device * if (err) { dev_warn(dev, "Unable to access MSR 0xEE, for Tjmax, left" - " at default"); + " at default\n"); } else if (eax & 0x40000000) { tjmax = 85000; } @@ -216,6 +217,9 @@ static int __devinit coretemp_probe(struct platform_device *pdev) } data->id = pdev->id; +#ifdef CONFIG_SMP + data->core_id = c->cpu_core_id; +#endif data->name = "coretemp"; mutex_init(&data->update_lock);