Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) ===============================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) Configurable sysfs parameters for the x86-64 machine check code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) ===============================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) Machine checks report internal hardware error conditions detected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) by the CPU. Uncorrected errors typically cause a machine check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) (often with panic), corrected ones cause a machine check log entry.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) Machine checks are organized in banks (normally associated with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) a hardware subsystem) and subevents in a bank. The exact meaning
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) of the banks and subevent is CPU specific.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) mcelog knows how to decode them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) When you see the "Machine check errors logged" message in the system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) log then mcelog should run to collect and decode machine check entries
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) from /dev/mcelog. Normally mcelog should be run regularly from a cronjob.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) Each CPU has a directory in /sys/devices/system/machinecheck/machinecheckN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) (N = CPU number).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) The directory contains some configurable entries:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) bankNctl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	(N bank number)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	64bit Hex bitmask enabling/disabling specific subevents for bank N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	When a bit in the bitmask is zero then the respective
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	subevent will not be reported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	By default all events are enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	Note that BIOS maintain another mask to disable specific events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	per bank.  This is not visible here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) The following entries appear for each CPU, but they are truly shared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) between all CPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) check_interval
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	How often to poll for corrected machine check errors, in seconds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 	(Note output is hexadecimal). Default 5 minutes.  When the poller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 	finds MCEs it triggers an exponential speedup (poll more often) on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 	the polling interval.  When the poller stops finding MCEs, it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 	triggers an exponential backoff (poll less often) on the polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 	interval. The check_interval variable is both the initial and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 	maximum polling interval. 0 means no polling for corrected machine
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 	check errors (but some corrected errors might be still reported
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	in other ways)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) tolerant
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 	Tolerance level. When a machine check exception occurs for a non
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 	corrected machine check the kernel can take different actions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 	Since machine check exceptions can happen any time it is sometimes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 	risky for the kernel to kill a process because it defies
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 	normal kernel locking rules. The tolerance level configures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 	how hard the kernel tries to recover even at some risk of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 	deadlock.  Higher tolerant values trade potentially better uptime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 	with the risk of a crash or even corruption (for tolerant >= 3).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 	0: always panic on uncorrected errors, log corrected errors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 	1: panic or SIGBUS on uncorrected errors, log corrected errors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	2: SIGBUS or log uncorrected errors, log corrected errors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 	3: never panic or SIGBUS, log all errors (for testing only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) 	Default: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) 	Note this only makes a difference if the CPU allows recovery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) 	from a machine check exception. Current x86 CPUs generally do not.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) trigger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) 	Program to run when a machine check event is detected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) 	This is an alternative to running mcelog regularly from cron
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) 	and allows to detect events faster.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) monarch_timeout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) 	How long to wait for the other CPUs to machine check too on a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) 	exception. 0 to disable waiting for other CPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) 	Unit: us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) TBD document entries for AMD threshold interrupt configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) For more details about the x86 machine check architecture
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) see the Intel and AMD architecture manuals from their developer websites.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) For more details about the architecture
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) see http://one.firstfloor.org/~andi/mce.pdf