Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mce\amd.c Create Date:2022-07-28 08:03:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:prepare_threshold_block

Proto:static int prepare_threshold_block(unsigned int bank, unsigned int block, unsigned int addr, int offset, unsigned int misc_high)

Type:int

Parameter:

TypeParameterName
unsigned intbank
unsigned intblock
unsigned intaddr
intoffset
unsigned intmisc_high
522  cpu = smp_processor_id()
527  If Not block Then per_cpu(bank_map, cpu) |= 1 << bank
530  memset( & b, 0, size of 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  If Not Bank can generate an interrupt. Then Go to done
540  Enable/Disable APIC interrupt = 1
542  If Not * Indicates that overflow conditions are not fatal, when set. Then
543  new = (misc_high & MASK_LVTOFF_HI) >> 20
544  Go to set_offset
548  If dmsr with exception handling (Deferred error settings , & smca_low, & smca_high) Then Go to 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  If offset == new Then thresholding_irq_en = true
558  done :
559  mce_threshold_block_init( & b, offset)
561  out :
562  Return offset
Caller
NameDescribe
mce_amd_feature_initpu init entry point, called from mce.c with preempt off