函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mce\therm_throt.c Create Date:2022-07-27 09:04:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:intel_init_thermal

函数原型:void intel_init_thermal(struct cpuinfo_x86 *c)

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
645  cpu等于当前cpu ID()
646  tm2等于0
649  如果非Thermal monitoring depends on APIC, ACPI and clock modulation 则返回
657  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(MSR_IA32_MISC_ENABLE, l, h)
659  h等于lvtthmr_init
670  如果h按位与APIC_DM_FIXED_MASK的值不等于APIC_DM_FIXEDapic_write(APIC_LVTTHMR, lvtthmr_init)
674  如果l按位与MSR_IA32_MISC_ENABLE_TM1h按位与APIC_DM_SMI
675  如果Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE.恒等于SYSTEM_BOOTINGpr_debug("CPU%d: Thermal monitoring handled by SMI\n", cpu)
677  返回
681  如果cpu_has(c, Thermal Monitor 2 )则
682  如果CPU family 恒等于6且x86_model恒等于9或x86_model恒等于13的值则
684  如果l按位与MSR_THERM2_CTL_TM_SELECTtm2等于1
686  否则如果l按位与MSR_IA32_MISC_ENABLE_TM2tm2等于1
691  h等于THERMAL_APIC_VECTOR按位或APIC_DM_FIXED按位或APIC_LVT_MASKED
692  apic_write(APIC_LVTTHMR, h)
694  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(MSR_IA32_THERM_INTERRUPT, l, h)
695  如果cpu_has(c, Intel Power Limit Notification )且非int_pln_enablewrmsr(MSR_IA32_THERM_INTERRUPT, (l | (THERM_INT_LOW_ENABLE | THERM_INT_HIGH_ENABLE)) & ~THERM_INT_PLN_ENABLE, h)
699  否则如果cpu_has(c, Intel Power Limit Notification )且int_pln_enablewrmsr(MSR_IA32_THERM_INTERRUPT, l | (THERM_INT_LOW_ENABLE | THERM_INT_HIGH_ENABLE | THERM_INT_PLN_ENABLE), h)
703  否则wrmsr(MSR_IA32_THERM_INTERRUPT, l | (THERM_INT_LOW_ENABLE | THERM_INT_HIGH_ENABLE), h)
707  如果cpu_has(c, Intel Package Thermal Status )则
708  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(MSR_IA32_PACKAGE_THERM_INTERRUPT, l, h)
709  如果cpu_has(c, Intel Power Limit Notification )且非int_pln_enablewrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, (l | (PACKAGE_THERM_INT_LOW_ENABLE | PACKAGE_THERM_INT_HIGH_ENABLE)) & ~PACKAGE_THERM_INT_PLN_ENABLE, h)
714  否则如果cpu_has(c, Intel Power Limit Notification )且int_pln_enablewrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, l | (PACKAGE_THERM_INT_LOW_ENABLE | PACKAGE_THERM_INT_HIGH_ENABLE | PACKAGE_THERM_INT_PLN_ENABLE), h)
719  否则wrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, l | (PACKAGE_THERM_INT_LOW_ENABLE | PACKAGE_THERM_INT_HIGH_ENABLE), h)
725  smp_thermal_vector等于Thermal transition interrupt handler
727  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(MSR_IA32_MISC_ENABLE, l, h)
728  wrmsr(MSR_IA32_MISC_ENABLE, l | MSR_IA32_MISC_ENABLE_TM1, h)
730  pr_info_once("CPU0: Thermal monitoring enabled (%s)\n", tm2 ? "TM2" : "TM1")
734  atomic_set( & therm_throt_en, 1)
调用者
名称描述
mce_intel_feature_init