函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Poll for corrected events or events that happened before reset.* Those are just logged through /dev/mcelog.* This is executed in standard interrupt context.* Note: spec recommends to panic for fatal unsignalled* errors here

函数原型:bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)

返回类型:bool

参数:

类型参数名称
enum mcp_flagsflags
mce_banks_t *b
699  mce_banks等于this_cpu_ptr(mce_banks_array)
700  bool error_seen = false
704  this_cpu_inc(mce_poll_count)
706  Collect all global (w.r.t. this processor) status about this machine* check into our "mce" struct so that we can use it later to assess* the severity of the problem as we read per-bank specific details.
708  如果flags按位与 log time stamp CPU time stamp counter 等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
711 i小于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(mce_num_banks)循环
712  如果非 subevents to enable 或非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则继续下一循环
715  Bank's MCi_MISC MSR 等于0
716  Bank's MCi_ADDR MSR 等于0
717  Machine check bank reporting the error 等于i
719  The "volatile" is due to gcc bugs ()
720  Bank's MCi_STATUS MSR 等于MSR access wrappers used for error injection
723  如果非Bank's MCi_STATUS MSR 按位与valid error 的值则继续下一循环
730  如果flags按位与MCP_UC或非Bank's MCi_STATUS MSR 按位与uncorrected error 的值则转到:log_it
739  如果非ser
740  如果Bank's MCi_STATUS MSR 按位与uncorrected error 则继续下一循环
742  转到:log_it
746  如果非Bank's MCi_STATUS MSR 按位与r enabled 的值则转到:log_it
753  如果非Bank's MCi_STATUS MSR 按位与processor context corrupt 的值且非Bank's MCi_STATUS MSR 按位与Signaled machine check 的值则转到:log_it
761  继续下一循环
763  log_it :
764  error_seen = true
766  Read ADDR and MISC registers.
768  Error severity 等于mce_severity( & m, tolerant, NULL, false)
774  如果非flags按位与MCP_DONTLOG的值且非dont_log_cemce_log( & m)
782  如果非mce_gen_pool_add( & m)则mce_schedule_work()
789  mce_wrmsrl(status(i), 0)
797  This function forces the icache and prefetched instruction stream to* catch up with reality in two very specific cases:* a) Text was modified using one virtual address and is about to be executed* from the same physical page at a different virtual address
799  返回:error_seen
调用者
名称描述
mce_timer_fn
__mcheck_cpu_init_generic
mce_intel_cmci_poll
intel_threshold_interruptThe interrupt handler. This is called on every event.* Just call the poller directly to log any events.* This could in theory increase the threshold under high load,* but doesn't for now.
cmci_recheckJust in case we missed an event during initialization check* all the CMCI owned banks.