函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Turn off thresholding banks for the following conditions:* - MC4_MISC thresholding is not supported on Family 0x15.* - Prevent possible spurious interrupts from the IF bank on Family 0x17* Models 0x10-0x2F due to Erratum #1114.

函数原型:static void disable_err_thresholding(struct cpuinfo_x86 *c, unsigned int bank)

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
unsigned intbank
593  如果CPU family 恒等于0x15且bank恒等于4则
594  msrs[0]等于0x00000413
595  msrs[1]等于0xc0000408
596  num_msrs等于2
597  否则如果CPU family 恒等于0x17且x86_model大于等于0x10且x86_model小于等于0x2F则
600  如果smca_get_bank_type(bank)不等于SMCA_IF则返回
603  msrs[0]等于MSR_AMD64_SMCA_MCx_MISC(bank)
604  num_msrs等于1
605  否则
606  返回
609  rdmsrl(MSR_K7_HWCR, hwcr)
612  need_toggle等于非hwcr按位与BIT(18)的值
613  如果need_togglewrmsrl(MSR_K7_HWCR, hwcr | BIT(18))
617 i小于num_msrs循环Clear @bit in a MSR @msr.* Retval:* < 0: An error was encountered.* = 0: Bit was already cleared.* > 0: Hardware accepted the MSR write.
621  如果need_togglewrmsrl(MSR_K7_HWCR, hwcr)
调用者
名称描述
mce_amd_feature_initpu init entry point, called from mce.c with preempt off