therm_throt.c (762f99f4f3cb41a775b5157dd761217beba65873) | therm_throt.c (1cb19cabeb0e187b6c244d0da73d27f7432c40dc) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Thermal throttle event support code (such as syslog messaging and rate 4 * limiting) that was factored out from x86_64 (mce_intel.c) and i386 (p4.c). 5 * 6 * This allows consistent reporting of CPU thermal throttle events. 7 * 8 * Maintains a counter in /sys that keeps track of the number of thermal --- 18 unchanged lines hidden (view full) --- 27 28#include <asm/processor.h> 29#include <asm/thermal.h> 30#include <asm/traps.h> 31#include <asm/apic.h> 32#include <asm/irq.h> 33#include <asm/msr.h> 34 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Thermal throttle event support code (such as syslog messaging and rate 4 * limiting) that was factored out from x86_64 (mce_intel.c) and i386 (p4.c). 5 * 6 * This allows consistent reporting of CPU thermal throttle events. 7 * 8 * Maintains a counter in /sys that keeps track of the number of thermal --- 18 unchanged lines hidden (view full) --- 27 28#include <asm/processor.h> 29#include <asm/thermal.h> 30#include <asm/traps.h> 31#include <asm/apic.h> 32#include <asm/irq.h> 33#include <asm/msr.h> 34 |
35#include "intel_hfi.h" |
|
35#include "thermal_interrupt.h" 36 37/* How long to wait between reporting thermal events */ 38#define CHECK_INTERVAL (300 * HZ) 39 40#define THERMAL_THROTTLING_EVENT 0 41#define POWER_LIMIT_EVENT 1 42 --- 461 unchanged lines hidden (view full) --- 504 505static __init int thermal_throttle_init_device(void) 506{ 507 int ret; 508 509 if (!atomic_read(&therm_throt_en)) 510 return 0; 511 | 36#include "thermal_interrupt.h" 37 38/* How long to wait between reporting thermal events */ 39#define CHECK_INTERVAL (300 * HZ) 40 41#define THERMAL_THROTTLING_EVENT 0 42#define POWER_LIMIT_EVENT 1 43 --- 461 unchanged lines hidden (view full) --- 505 506static __init int thermal_throttle_init_device(void) 507{ 508 int ret; 509 510 if (!atomic_read(&therm_throt_en)) 511 return 0; 512 |
513 intel_hfi_init(); 514 |
|
512 ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "x86/therm:online", 513 thermal_throttle_online, 514 thermal_throttle_offline); 515 return ret < 0 ? ret : 0; 516} 517device_initcall(thermal_throttle_init_device); 518 519#endif /* CONFIG_SYSFS */ --- 211 unchanged lines hidden --- | 515 ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "x86/therm:online", 516 thermal_throttle_online, 517 thermal_throttle_offline); 518 return ret < 0 ? ret : 0; 519} 520device_initcall(thermal_throttle_init_device); 521 522#endif /* CONFIG_SYSFS */ --- 211 unchanged lines hidden --- |