Clean up some x86/mce code as below. No functional changes intended.
- Simplify some code.
- Remove some unnecessary code.
- Improve readability for some code.
- Convert some family/model mixed checks to VFM-based checks.
- Fix some typos.
Pass the following basic tests:
- Tested on an Intel Sapphire Rapids server.
- Compile test.
- System boot test.
- Correctable/uncorrectable memory errors can be notified via CMCI/MCE interrupts.
- Correctable/uncorrectable memory errors can be dispatched to the mcelog daemon and the EDAC driver.
Changes in v4:
- Drop the first two patches as they've landed in the TIP ras/core branch.
- Drop "Make mce_gen_pool_create() return explicit error codes" patch.
- 0001: Don't rename mce_notify_irq().
- 0003: New patch. Make four functions return bool.
- 0004: Add necessary blank lines and directly use 'mca_cfg'.
Changes in v3:
- Collect "Reviewed-by:" from Nikolay & Sohil.
- Drop the "x86/mce: Remove the redundant zeroing assignments" patch.
- 0003: Rename mce_notify_irq() to mce_notify_user().
- 0005: Move the 'int ret' variable along with the other int variables.
- 0006: New patch. Break up __mcheck_cpu_apply_quirks().
- 0007: New patch. Convert family/model mixed checks to VFM-based checks.
- 0009: Remove the variables' names from the commit message.
- 0010: Remove the detail typos from the commit message.
Changes in v2:
- Collect "Reviewed-by:" from Tony.
- Update the commit message of patch 9 to include the names of all
variables that don't need NULL pointer initializations.
This series is based on the TIP branch ras/core with top commit 612c2addff36.
Thanks Thomas, Boris, Tony, Dave, Sohil and Nikolay for your review and discussion on this series.
Qiuxu Zhuo (7):
x86/mce: Make several functions return bool
x86/mce/threshold: Remove the redundant this_cpu_dec_return()
x86/mce: Make four functions return bool
x86/mce: Convert family/model mixed checks to VFM-based checks
x86/mce: Remove the unnecessary {}
x86/mce/amd: Remove unnecessary NULL pointer initializations
x86/mce: Fix typos
Tony Luck (1):
x86/mce: Break up __mcheck_cpu_apply_quirks()
arch/x86/include/asm/mce.h | 4 +-
arch/x86/kernel/cpu/mce/amd.c | 18 +--
arch/x86/kernel/cpu/mce/core.c | 234 +++++++++++++++-------------
arch/x86/kernel/cpu/mce/genpool.c | 29 ++--
arch/x86/kernel/cpu/mce/intel.c | 9 +-
arch/x86/kernel/cpu/mce/internal.h | 4 +-
arch/x86/kernel/cpu/mce/threshold.c | 2 +-
7 files changed, 158 insertions(+), 142 deletions(-)
base-commit: 612c2addff367ee461dc99ffca2bc786f105d2ec
--
2.17.1