public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Clean up some x86/mce code
@ 2024-10-10 15:31 Qiuxu Zhuo
  2024-10-10 15:31 ` [PATCH 01/10] x86/mce/dev-mcelog: Use xchg() to get and clear the flags Qiuxu Zhuo
                   ` (11 more replies)
  0 siblings, 12 replies; 142+ messages in thread
From: Qiuxu Zhuo @ 2024-10-10 15:31 UTC (permalink / raw)
  To: tony.luck, bp
  Cc: tglx, dave.hansen, mingo, hpa, x86, linux-edac, linux-kernel,
	qiuxu.zhuo

1. Clean up some x86/mce code as below. No functional changes intended.

    - Simplify some code.

    - Remove some unnecessary code.

    - Improve readability for some code.

    - Fix some typos.

    [ Reduce the text segment size by ~116 bytes. ]

2. Pass the following basic tests:

   - Compile 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.

   [ Tested on an Intel Sapphire Rapids server. ]

3. This patch series is based on v6.12-rc2.

Qiuxu Zhuo (10):
  x86/mce/dev-mcelog: Use xchg() to get and clear the flags
  x86/mce/intel: Use MCG_BANKCNT_MASK instead of 0xff
  x86/mce: Make several functions return bool
  x86/mce/threshold: Remove the redundant this_cpu_dec_return()
  x86/mce/genpool: Make mce_gen_pool_create() return explicit error codes
  x86/mce: Convert multiple if () statements into a switch() statement
  x86/mce: Remove the unnecessary {}
  x86/mce: Remove the redundant zeroing assignments
  x86/mce/amd: Remove unnecessary NULL pointer initializations
  x86/mce: Fix typos in comments

 arch/x86/include/asm/mce.h           |  4 +--
 arch/x86/kernel/cpu/mce/amd.c        | 18 +++++------
 arch/x86/kernel/cpu/mce/core.c       | 47 ++++++++++++++--------------
 arch/x86/kernel/cpu/mce/dev-mcelog.c | 11 ++-----
 arch/x86/kernel/cpu/mce/genpool.c    |  8 ++---
 arch/x86/kernel/cpu/mce/intel.c      | 11 ++++---
 arch/x86/kernel/cpu/mce/threshold.c  |  2 +-
 7 files changed, 46 insertions(+), 55 deletions(-)


base-commit: 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
-- 
2.17.1


^ permalink raw reply	[flat|nested] 142+ messages in thread

end of thread, other threads:[~2025-01-03 18:11 UTC | newest]

Thread overview: 142+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 15:31 [PATCH 00/10] Clean up some x86/mce code Qiuxu Zhuo
2024-10-10 15:31 ` [PATCH 01/10] x86/mce/dev-mcelog: Use xchg() to get and clear the flags Qiuxu Zhuo
2024-10-10 15:31 ` [PATCH 02/10] x86/mce/intel: Use MCG_BANKCNT_MASK instead of 0xff Qiuxu Zhuo
2024-10-10 15:31 ` [PATCH 03/10] x86/mce: Make several functions return bool Qiuxu Zhuo
2024-10-10 15:31 ` [PATCH 04/10] x86/mce/threshold: Remove the redundant this_cpu_dec_return() Qiuxu Zhuo
2024-10-10 15:31 ` [PATCH 05/10] x86/mce/genpool: Make mce_gen_pool_create() return explicit error codes Qiuxu Zhuo
2024-11-02 14:31   ` Thomas Gleixner
2024-11-03  0:42     ` Zhuo, Qiuxu
2024-10-10 15:31 ` [PATCH 06/10] x86/mce: Convert multiple if () statements into a switch() statement Qiuxu Zhuo
2024-10-10 15:31 ` [PATCH 07/10] x86/mce: Remove the unnecessary {} Qiuxu Zhuo
2024-10-10 15:32 ` [PATCH 08/10] x86/mce: Remove the redundant zeroing assignments Qiuxu Zhuo
2024-10-10 15:32 ` [PATCH 09/10] x86/mce/amd: Remove unnecessary NULL pointer initializations Qiuxu Zhuo
2024-10-11 20:55   ` Luck, Tony
2024-10-10 15:32 ` [PATCH 10/10] x86/mce: Fix typos in comments Qiuxu Zhuo
2024-10-11 20:57 ` [PATCH 00/10] Clean up some x86/mce code Luck, Tony
2024-10-16 12:30 ` [PATCH v2 00/10] x86/mce: " Qiuxu Zhuo
2024-10-16 12:30   ` [PATCH v2 01/10] x86/mce/dev-mcelog: Use xchg() to get and clear the flags Qiuxu Zhuo
2024-10-16 12:30   ` [PATCH v2 02/10] x86/mce/intel: Use MCG_BANKCNT_MASK instead of 0xff Qiuxu Zhuo
2024-10-16 12:30   ` [PATCH v2 03/10] x86/mce: Make several functions return bool Qiuxu Zhuo
2024-10-18 19:02     ` Sohil Mehta
2024-10-19  3:00       ` Zhuo, Qiuxu
2024-10-16 12:30   ` [PATCH v2 04/10] x86/mce/threshold: Remove the redundant this_cpu_dec_return() Qiuxu Zhuo
2024-10-16 12:30   ` [PATCH v2 05/10] x86/mce/genpool: Make mce_gen_pool_create() return explicit error codes Qiuxu Zhuo
2024-10-18 19:20     ` Sohil Mehta
2024-10-19  3:29       ` Zhuo, Qiuxu
2024-10-16 12:30   ` [PATCH v2 06/10] x86/mce: Convert multiple if () statements into a switch() statement Qiuxu Zhuo
2024-10-18 19:44     ` Sohil Mehta
2024-10-18 20:14       ` Tony Luck
2024-10-19  0:04         ` Sohil Mehta
2024-10-19  5:46           ` Zhuo, Qiuxu
2024-10-21 16:06             ` Luck, Tony
2024-10-21 16:31               ` Dave Hansen
2024-10-23  8:20                 ` Zhuo, Qiuxu
2024-10-24 13:05                   ` Zhuo, Qiuxu
2024-10-24 16:42                     ` Luck, Tony
2024-10-24 21:31                       ` Sohil Mehta
2024-10-24 21:41                         ` Luck, Tony
2024-10-24 22:18                         ` Dave Hansen
2024-10-21 17:38               ` Sohil Mehta
2024-10-21 17:51                 ` Luck, Tony
2024-10-21 18:26                   ` Sohil Mehta
2024-10-21 18:40                     ` Luck, Tony
2024-10-21 22:57                       ` Sohil Mehta
2024-10-21 23:31                         ` Luck, Tony
2024-10-22  0:07                           ` Sohil Mehta
2024-10-22  0:17                         ` Dave Hansen
2024-10-22 18:12                           ` Sohil Mehta
2024-10-23  2:08                 ` Zhuo, Qiuxu
2024-10-23  6:48                   ` Sohil Mehta
2024-10-23  7:57                     ` Zhuo, Qiuxu
2024-10-23  6:47             ` Sohil Mehta
2024-10-23  7:43               ` Zhuo, Qiuxu
2024-10-19  4:39         ` Zhuo, Qiuxu
2024-10-16 12:30   ` [PATCH v2 07/10] x86/mce: Remove the unnecessary {} Qiuxu Zhuo
2024-10-16 12:30   ` [PATCH v2 08/10] x86/mce: Remove the redundant zeroing assignments Qiuxu Zhuo
2024-10-18 20:25     ` Sohil Mehta
2024-10-19  7:37       ` Zhuo, Qiuxu
2024-10-19  7:40         ` H. Peter Anvin
2024-10-19  8:30           ` Zhuo, Qiuxu
2024-10-20  0:25             ` H. Peter Anvin
2024-10-21  6:29               ` Zhuo, Qiuxu
2024-10-16 12:30   ` [PATCH v2 09/10] x86/mce/amd: Remove unnecessary NULL pointer initializations Qiuxu Zhuo
2024-10-18 20:34     ` Sohil Mehta
2024-10-19  7:40       ` Zhuo, Qiuxu
2024-10-16 12:30   ` [PATCH v2 10/10] x86/mce: Fix typos in comments Qiuxu Zhuo
2024-10-18 20:36     ` Sohil Mehta
2024-10-19  8:02       ` Zhuo, Qiuxu
2024-10-17 15:30   ` [PATCH v2 00/10] x86/mce: Clean up some x86/mce code Nikolay Borisov
2024-10-18 20:40   ` Sohil Mehta
2024-10-25  2:45   ` [PATCH v3 " Qiuxu Zhuo
2024-10-25  2:45     ` [PATCH v3 01/10] x86/mce/dev-mcelog: Use xchg() to get and clear the flags Qiuxu Zhuo
2024-10-28 14:03       ` [tip: ras/core] x86/mce/mcelog: " tip-bot2 for Qiuxu Zhuo
2024-10-25  2:45     ` [PATCH v3 02/10] x86/mce/intel: Use MCG_BANKCNT_MASK instead of 0xff Qiuxu Zhuo
2024-10-28 14:03       ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2024-10-25  2:45     ` [PATCH v3 03/10] x86/mce: Make several functions return bool and rename a function Qiuxu Zhuo
2024-10-28 13:06       ` Borislav Petkov
2024-10-29  3:32         ` Zhuo, Qiuxu
2024-10-30 10:24           ` Borislav Petkov
2024-10-31  3:23             ` Zhuo, Qiuxu
2024-10-25  2:45     ` [PATCH v3 04/10] x86/mce/threshold: Remove the redundant this_cpu_dec_return() Qiuxu Zhuo
2024-10-25  2:45     ` [PATCH v3 05/10] x86/mce/genpool: Make mce_gen_pool_create() return explicit error codes Qiuxu Zhuo
2024-11-02 13:13       ` Borislav Petkov
2024-10-25  2:45     ` [PATCH v3 06/10] x86/mce: Break up __mcheck_cpu_apply_quirks() Qiuxu Zhuo
2024-10-29 21:39       ` Yazen Ghannam
2024-10-30  1:39         ` Zhuo, Qiuxu
2024-10-30 14:16           ` Yazen Ghannam
2024-10-31  5:18             ` Zhuo, Qiuxu
2024-10-25  2:45     ` [PATCH v3 07/10] x86/mce: Convert family/model mixed checks to VFM-based checks Qiuxu Zhuo
2024-10-25  2:46     ` [PATCH v3 08/10] x86/mce: Remove the unnecessary {} Qiuxu Zhuo
2024-10-25  2:46     ` [PATCH v3 09/10] x86/mce/amd: Remove unnecessary NULL pointer initializations Qiuxu Zhuo
2024-10-25  2:46     ` [PATCH v3 10/10] x86/mce: Fix typos Qiuxu Zhuo
2024-11-11  6:04     ` [PATCH v4 0/8] x86/mce: Clean up some x86/mce code Qiuxu Zhuo
2024-11-11  6:04       ` [PATCH v4 1/8] x86/mce: Make several functions return bool Qiuxu Zhuo
2024-11-11  6:04       ` [PATCH v4 2/8] x86/mce/threshold: Remove the redundant this_cpu_dec_return() Qiuxu Zhuo
2024-11-11  6:04       ` [PATCH v4 3/8] x86/mce: Make four functions return bool Qiuxu Zhuo
2024-11-12  2:30         ` Sohil Mehta
2024-11-11  6:04       ` [PATCH v4 4/8] x86/mce: Break up __mcheck_cpu_apply_quirks() Qiuxu Zhuo
2024-11-12  2:31         ` Sohil Mehta
2024-11-11  6:04       ` [PATCH v4 5/8] x86/mce: Convert family/model mixed checks to VFM-based checks Qiuxu Zhuo
2024-11-12  2:31         ` Sohil Mehta
2024-11-12 15:27         ` Yazen Ghannam
2024-11-13 12:10           ` Zhuo, Qiuxu
2024-11-13 14:25             ` Yazen Ghannam
2024-11-14  1:11               ` Zhuo, Qiuxu
2024-11-11  6:04       ` [PATCH v4 6/8] x86/mce: Remove the unnecessary {} Qiuxu Zhuo
2024-11-12 15:43         ` Yazen Ghannam
2024-11-13 13:32           ` Zhuo, Qiuxu
2024-11-13 14:26             ` Yazen Ghannam
2024-11-13 16:11             ` Borislav Petkov
2024-11-14  1:23               ` Zhuo, Qiuxu
2024-11-11  6:04       ` [PATCH v4 7/8] x86/mce/amd: Remove unnecessary NULL pointer initializations Qiuxu Zhuo
2024-11-12 15:48         ` Yazen Ghannam
2024-11-11  6:04       ` [PATCH v4 8/8] x86/mce: Fix typos Qiuxu Zhuo
2024-11-12  2:36         ` Sohil Mehta
2024-11-12 15:38         ` Yazen Ghannam
2024-11-12 22:35           ` Sohil Mehta
2024-11-13 14:31             ` Yazen Ghannam
2024-11-14  1:20               ` Zhuo, Qiuxu
2024-11-13 14:48           ` Zhuo, Qiuxu
2024-12-12 14:00       ` [PATCH v5 0/7] Clean up some x86/mce code Qiuxu Zhuo
2024-12-12 14:00         ` [PATCH v5 1/7] x86/mce: Make several functions return bool Qiuxu Zhuo
2024-12-18 15:20           ` Yazen Ghannam
2024-12-19 15:19             ` Zhuo, Qiuxu
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2024-12-12 14:00         ` [PATCH v5 2/7] x86/mce/threshold: Remove the redundant this_cpu_dec_return() Qiuxu Zhuo
2024-12-18 15:36           ` Yazen Ghannam
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2024-12-12 14:00         ` [PATCH v5 3/7] x86/mce: Make four functions return bool Qiuxu Zhuo
2024-12-18 15:48           ` Yazen Ghannam
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2024-12-12 14:01         ` [PATCH v5 4/7] x86/mce: Break up __mcheck_cpu_apply_quirks() Qiuxu Zhuo
2024-12-18 15:54           ` Yazen Ghannam
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Tony Luck
2024-12-12 14:01         ` [PATCH v5 5/7] x86/mce: Convert family/model mixed checks to VFM-based checks Qiuxu Zhuo
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2024-12-12 14:01         ` [PATCH v5 6/7] x86/mce: Remove the redundant mce_hygon_feature_init() Qiuxu Zhuo
2024-12-12 18:08           ` Sohil Mehta
2024-12-18 16:02           ` Yazen Ghannam
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2024-12-12 14:01         ` [PATCH v5 7/7] x86/mce/amd: Remove unnecessary NULL pointer initializations Qiuxu Zhuo
2025-01-01 11:44           ` [tip: ras/core] " tip-bot2 for Qiuxu Zhuo
2025-01-03 18:10             ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox