Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277490
b: refs/heads/master
c: 715a431
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Dec 15, 2011
1 parent ec81802 commit 8b7e20f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0937195715713b37ec843f28d99930dd7b1e8fbe
refs/heads/master: 715a43182a20a9e2bae59b4e0826a91ee30f355c
29 changes: 7 additions & 22 deletions trunk/arch/x86/kernel/cpu/mcheck/therm_throt.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,17 +323,6 @@ device_initcall(thermal_throttle_init_device);

#endif /* CONFIG_SYSFS */

/*
* Set up the most two significant bit to notify mce log that this thermal
* event type.
* This is a temp solution. May be changed in the future with mce log
* infrasture.
*/
#define CORE_THROTTLED (0)
#define CORE_POWER_LIMIT ((__u64)1 << 62)
#define PACKAGE_THROTTLED ((__u64)2 << 62)
#define PACKAGE_POWER_LIMIT ((__u64)3 << 62)

static void notify_thresholds(__u64 msr_val)
{
/* check whether the interrupt handler is defined;
Expand Down Expand Up @@ -363,27 +352,23 @@ static void intel_thermal_interrupt(void)
if (therm_throt_process(msr_val & THERM_STATUS_PROCHOT,
THERMAL_THROTTLING_EVENT,
CORE_LEVEL) != 0)
mce_log_therm_throt_event(CORE_THROTTLED | msr_val);
mce_log_therm_throt_event(msr_val);

if (this_cpu_has(X86_FEATURE_PLN))
if (therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT,
therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT,
POWER_LIMIT_EVENT,
CORE_LEVEL) != 0)
mce_log_therm_throt_event(CORE_POWER_LIMIT | msr_val);
CORE_LEVEL);

if (this_cpu_has(X86_FEATURE_PTS)) {
rdmsrl(MSR_IA32_PACKAGE_THERM_STATUS, msr_val);
if (therm_throt_process(msr_val & PACKAGE_THERM_STATUS_PROCHOT,
therm_throt_process(msr_val & PACKAGE_THERM_STATUS_PROCHOT,
THERMAL_THROTTLING_EVENT,
PACKAGE_LEVEL) != 0)
mce_log_therm_throt_event(PACKAGE_THROTTLED | msr_val);
PACKAGE_LEVEL);
if (this_cpu_has(X86_FEATURE_PLN))
if (therm_throt_process(msr_val &
therm_throt_process(msr_val &
PACKAGE_THERM_STATUS_POWER_LIMIT,
POWER_LIMIT_EVENT,
PACKAGE_LEVEL) != 0)
mce_log_therm_throt_event(PACKAGE_POWER_LIMIT
| msr_val);
PACKAGE_LEVEL);
}
}

Expand Down

0 comments on commit 8b7e20f

Please sign in to comment.