aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 14:16:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 14:16:09 -0400
commita9f4a7005fb1a0f6142cbb689e734621c61574d5 (patch)
tree151f02b324a0976ffd71f700ce97f8e39443a094
parent37577505ec6e67d550aa5fb452c7b45a093cc7f3 (diff)
parent6bb2ff846f24fa6efee756e5e2a2b8433d65671e (diff)
Merge tag 'please-pull-mce-therm' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Pull thermal power-limit update from Tony Luck: "Thermal limit warnings are too scary and cause unnecessary concern" * tag 'please-pull-mce-therm' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: x86 thermal: Disable power limit notification interrupt by default x86 thermal: Delete power-limit-notification console messages
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c43
2 files changed, 28 insertions, 17 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 81732b8abd3a..7310b08bee5e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1158,6 +1158,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1158 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver 1158 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver
1159 Format: <irq> 1159 Format: <irq>
1160 1160
1161 int_pln_enable [x86] Enable power limit notification interrupt
1162
1161 intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option 1163 intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option
1162 on 1164 on
1163 Enable intel iommu driver. 1165 Enable intel iommu driver.
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 2f3a7995e56a..98f2083832eb 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -182,11 +182,6 @@ static int therm_throt_process(bool new_event, int event, int level)
182 this_cpu, 182 this_cpu,
183 level == CORE_LEVEL ? "Core" : "Package", 183 level == CORE_LEVEL ? "Core" : "Package",
184 state->count); 184 state->count);
185 else
186 printk(KERN_CRIT "CPU%d: %s power limit notification (total events = %lu)\n",
187 this_cpu,
188 level == CORE_LEVEL ? "Core" : "Package",
189 state->count);
190 return 1; 185 return 1;
191 } 186 }
192 if (old_event) { 187 if (old_event) {
@@ -194,10 +189,6 @@ static int therm_throt_process(bool new_event, int event, int level)
194 printk(KERN_INFO "CPU%d: %s temperature/speed normal\n", 189 printk(KERN_INFO "CPU%d: %s temperature/speed normal\n",
195 this_cpu, 190 this_cpu,
196 level == CORE_LEVEL ? "Core" : "Package"); 191 level == CORE_LEVEL ? "Core" : "Package");
197 else
198 printk(KERN_INFO "CPU%d: %s power limit normal\n",
199 this_cpu,
200 level == CORE_LEVEL ? "Core" : "Package");
201 return 1; 192 return 1;
202 } 193 }
203 194
@@ -220,6 +211,15 @@ static int thresh_event_valid(int event)
220 return 1; 211 return 1;
221} 212}
222 213
214static bool int_pln_enable;
215static int __init int_pln_enable_setup(char *s)
216{
217 int_pln_enable = true;
218
219 return 1;
220}
221__setup("int_pln_enable", int_pln_enable_setup);
222
223#ifdef CONFIG_SYSFS 223#ifdef CONFIG_SYSFS
224/* Add/Remove thermal_throttle interface for CPU device: */ 224/* Add/Remove thermal_throttle interface for CPU device: */
225static __cpuinit int thermal_throttle_add_dev(struct device *dev, 225static __cpuinit int thermal_throttle_add_dev(struct device *dev,
@@ -232,7 +232,7 @@ static __cpuinit int thermal_throttle_add_dev(struct device *dev,
232 if (err) 232 if (err)
233 return err; 233 return err;
234 234
235 if (cpu_has(c, X86_FEATURE_PLN)) 235 if (cpu_has(c, X86_FEATURE_PLN) && int_pln_enable)
236 err = sysfs_add_file_to_group(&dev->kobj, 236 err = sysfs_add_file_to_group(&dev->kobj,
237 &dev_attr_core_power_limit_count.attr, 237 &dev_attr_core_power_limit_count.attr,
238 thermal_attr_group.name); 238 thermal_attr_group.name);
@@ -240,7 +240,7 @@ static __cpuinit int thermal_throttle_add_dev(struct device *dev,
240 err = sysfs_add_file_to_group(&dev->kobj, 240 err = sysfs_add_file_to_group(&dev->kobj,
241 &dev_attr_package_throttle_count.attr, 241 &dev_attr_package_throttle_count.attr,
242 thermal_attr_group.name); 242 thermal_attr_group.name);
243 if (cpu_has(c, X86_FEATURE_PLN)) 243 if (cpu_has(c, X86_FEATURE_PLN) && int_pln_enable)
244 err = sysfs_add_file_to_group(&dev->kobj, 244 err = sysfs_add_file_to_group(&dev->kobj,
245 &dev_attr_package_power_limit_count.attr, 245 &dev_attr_package_power_limit_count.attr,
246 thermal_attr_group.name); 246 thermal_attr_group.name);
@@ -353,7 +353,7 @@ static void intel_thermal_interrupt(void)
353 CORE_LEVEL) != 0) 353 CORE_LEVEL) != 0)
354 mce_log_therm_throt_event(msr_val); 354 mce_log_therm_throt_event(msr_val);
355 355
356 if (this_cpu_has(X86_FEATURE_PLN)) 356 if (this_cpu_has(X86_FEATURE_PLN) && int_pln_enable)
357 therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT, 357 therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT,
358 POWER_LIMIT_EVENT, 358 POWER_LIMIT_EVENT,
359 CORE_LEVEL); 359 CORE_LEVEL);
@@ -363,7 +363,7 @@ static void intel_thermal_interrupt(void)
363 therm_throt_process(msr_val & PACKAGE_THERM_STATUS_PROCHOT, 363 therm_throt_process(msr_val & PACKAGE_THERM_STATUS_PROCHOT,
364 THERMAL_THROTTLING_EVENT, 364 THERMAL_THROTTLING_EVENT,
365 PACKAGE_LEVEL); 365 PACKAGE_LEVEL);
366 if (this_cpu_has(X86_FEATURE_PLN)) 366 if (this_cpu_has(X86_FEATURE_PLN) && int_pln_enable)
367 therm_throt_process(msr_val & 367 therm_throt_process(msr_val &
368 PACKAGE_THERM_STATUS_POWER_LIMIT, 368 PACKAGE_THERM_STATUS_POWER_LIMIT,
369 POWER_LIMIT_EVENT, 369 POWER_LIMIT_EVENT,
@@ -482,9 +482,13 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
482 apic_write(APIC_LVTTHMR, h); 482 apic_write(APIC_LVTTHMR, h);
483 483
484 rdmsr(MSR_IA32_THERM_INTERRUPT, l, h); 484 rdmsr(MSR_IA32_THERM_INTERRUPT, l, h);
485 if (cpu_has(c, X86_FEATURE_PLN)) 485 if (cpu_has(c, X86_FEATURE_PLN) && !int_pln_enable)
486 wrmsr(MSR_IA32_THERM_INTERRUPT, 486 wrmsr(MSR_IA32_THERM_INTERRUPT,
487 l | (THERM_INT_LOW_ENABLE 487 (l | (THERM_INT_LOW_ENABLE
488 | THERM_INT_HIGH_ENABLE)) & ~THERM_INT_PLN_ENABLE, h);
489 else if (cpu_has(c, X86_FEATURE_PLN) && int_pln_enable)
490 wrmsr(MSR_IA32_THERM_INTERRUPT,
491 l | (THERM_INT_LOW_ENABLE
488 | THERM_INT_HIGH_ENABLE | THERM_INT_PLN_ENABLE), h); 492 | THERM_INT_HIGH_ENABLE | THERM_INT_PLN_ENABLE), h);
489 else 493 else
490 wrmsr(MSR_IA32_THERM_INTERRUPT, 494 wrmsr(MSR_IA32_THERM_INTERRUPT,
@@ -492,9 +496,14 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
492 496
493 if (cpu_has(c, X86_FEATURE_PTS)) { 497 if (cpu_has(c, X86_FEATURE_PTS)) {
494 rdmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, l, h); 498 rdmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, l, h);
495 if (cpu_has(c, X86_FEATURE_PLN)) 499 if (cpu_has(c, X86_FEATURE_PLN) && !int_pln_enable)
496 wrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, 500 wrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT,
497 l | (PACKAGE_THERM_INT_LOW_ENABLE 501 (l | (PACKAGE_THERM_INT_LOW_ENABLE
502 | PACKAGE_THERM_INT_HIGH_ENABLE))
503 & ~PACKAGE_THERM_INT_PLN_ENABLE, h);
504 else if (cpu_has(c, X86_FEATURE_PLN) && int_pln_enable)
505 wrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT,
506 l | (PACKAGE_THERM_INT_LOW_ENABLE
498 | PACKAGE_THERM_INT_HIGH_ENABLE 507 | PACKAGE_THERM_INT_HIGH_ENABLE
499 | PACKAGE_THERM_INT_PLN_ENABLE), h); 508 | PACKAGE_THERM_INT_PLN_ENABLE), h);
500 else 509 else