forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/lin…
…ux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "The main changes in this cycle were: - Assign notifier chain priorities for all RAS related handlers to make the ordering explicit (Borislav Petkov) - Improve the AMD MCA banks sysfs output (Yazen Ghannam) - Various cleanups and restructuring of the x86 RAS code (Borislav Petkov)" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ras, EDAC, acpi: Assign MCE notifier handlers a priority x86/ras: Get rid of mce_process_work() EDAC/mce/amd: Dump TSC value EDAC/mce/amd: Unexport amd_decode_mce() x86/ras/amd/inj: Change dependency x86/ras: Flip the TSC-adding logic x86/ras/amd: Make sysfs names of banks more user-friendly x86/ras/therm_throt: Do not log a fake MCE for thermal events x86/ras/inject: Make it depend on X86_LOCAL_APIC=y
- Loading branch information
Showing
17 changed files
with
59 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* | ||
* Maintains a counter in /sys that keeps track of the number of thermal | ||
* events, such that the user knows how bad the thermal problem might be | ||
* (since the logging to syslog and mcelog is rate limited). | ||
* (since the logging to syslog is rate limited). | ||
* | ||
* Author: Dmitriy Zavin ([email protected]) | ||
* | ||
|
@@ -141,13 +141,8 @@ static struct attribute_group thermal_attr_group = { | |
* IRQ has been acknowledged. | ||
* | ||
* It will take care of rate limiting and printing messages to the syslog. | ||
* | ||
* Returns: 0 : Event should NOT be further logged, i.e. still in | ||
* "timeout" from previous log message. | ||
* 1 : Event should be logged further, and a message has been | ||
* printed to the syslog. | ||
*/ | ||
static int therm_throt_process(bool new_event, int event, int level) | ||
static void therm_throt_process(bool new_event, int event, int level) | ||
{ | ||
struct _thermal_state *state; | ||
unsigned int this_cpu = smp_processor_id(); | ||
|
@@ -162,16 +157,16 @@ static int therm_throt_process(bool new_event, int event, int level) | |
else if (event == POWER_LIMIT_EVENT) | ||
state = &pstate->core_power_limit; | ||
else | ||
return 0; | ||
return; | ||
} else if (level == PACKAGE_LEVEL) { | ||
if (event == THERMAL_THROTTLING_EVENT) | ||
state = &pstate->package_throttle; | ||
else if (event == POWER_LIMIT_EVENT) | ||
state = &pstate->package_power_limit; | ||
else | ||
return 0; | ||
return; | ||
} else | ||
return 0; | ||
return; | ||
|
||
old_event = state->new_event; | ||
state->new_event = new_event; | ||
|
@@ -181,7 +176,7 @@ static int therm_throt_process(bool new_event, int event, int level) | |
|
||
if (time_before64(now, state->next_check) && | ||
state->count != state->last_count) | ||
return 0; | ||
return; | ||
|
||
state->next_check = now + CHECK_INTERVAL; | ||
state->last_count = state->count; | ||
|
@@ -193,16 +188,14 @@ static int therm_throt_process(bool new_event, int event, int level) | |
this_cpu, | ||
level == CORE_LEVEL ? "Core" : "Package", | ||
state->count); | ||
return 1; | ||
return; | ||
} | ||
if (old_event) { | ||
if (event == THERMAL_THROTTLING_EVENT) | ||
pr_info("CPU%d: %s temperature/speed normal\n", this_cpu, | ||
level == CORE_LEVEL ? "Core" : "Package"); | ||
return 1; | ||
return; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
static int thresh_event_valid(int level, int event) | ||
|
@@ -365,10 +358,9 @@ static void intel_thermal_interrupt(void) | |
/* Check for violation of core thermal thresholds*/ | ||
notify_thresholds(msr_val); | ||
|
||
if (therm_throt_process(msr_val & THERM_STATUS_PROCHOT, | ||
THERMAL_THROTTLING_EVENT, | ||
CORE_LEVEL) != 0) | ||
mce_log_therm_throt_event(msr_val); | ||
therm_throt_process(msr_val & THERM_STATUS_PROCHOT, | ||
THERMAL_THROTTLING_EVENT, | ||
CORE_LEVEL); | ||
|
||
if (this_cpu_has(X86_FEATURE_PLN) && int_pln_enable) | ||
therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.