函数逻辑报告

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:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:prepare_threshold_block

函数原型:static int prepare_threshold_block(unsigned int bank, unsigned int block, unsigned int addr, int offset, unsigned int misc_high)

返回类型:int

参数:

类型参数名称
unsigned intbank
unsigned intblock
unsigned intaddr
intoffset
unsigned intmisc_high
522  cpu等于当前cpu ID()
527  如果非blockper_cpu(bank_map, cpu)或等于1左移bank
530  memset( & b, 0, b的长度)
531  CPU which controls MCA bank 等于cpu
532  MCA bank the block belongs to 等于bank
533  Number within bank 等于block
534  MSR address for the block 等于addr
535  Bank can generate an interrupt. 等于MSR4_MISC0
537  如果非 Bank can generate an interrupt. 则转到:done
540  Enable/Disable APIC interrupt 等于1
542  如果非* Indicates that overflow conditions are not fatal, when set.
543  new等于misc_high按位与MASK_LVTOFF_HI的值右移20位
544  转到:set_offset
548  如果dmsr with exception handling (Deferred error settings , & smca_low, & smca_high)则转到:out
551  new等于smca_low按位与Threshold LVT offset is at MSR0xC0000410[15:12] 的值右移12位
553  set_offset :
554  offset等于setup_APIC_mce_threshold(offset, new)
555  如果offset恒等于newthresholding_irq_en = true
558  done :
559  mce_threshold_block_init( & b, offset)
561  out :
562  返回:offset
调用者
名称描述
mce_amd_feature_initpu init entry point, called from mce.c with preempt off