]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/mce/mcelog: Use xchg() to get and clear the flags
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Fri, 25 Oct 2024 02:45:53 +0000 (10:45 +0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 28 Oct 2024 13:07:47 +0000 (14:07 +0100)
commit325c3376afad838eec8b9342e9e5eef270c5b184
tree72ac2e07736ea1081d070b2f00d517a6c1e7d534
parent81983758430957d9a5cb3333fe324fd70cf63e7e
x86/mce/mcelog: Use xchg() to get and clear the flags

Using xchg() to atomically get and clear the MCE log buffer flags,
streamlines the code and reduces the text size by 20 bytes.

  $ size dev-mcelog.o.*

       text    data     bss     dec     hex filename
       3013     360     160    3533     dcd dev-mcelog.o.old
       2993     360     160    3513     db9 dev-mcelog.o.new

No functional changes intended.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/r/20241025024602.24318-2-qiuxu.zhuo@intel.com
arch/x86/kernel/cpu/mce/dev-mcelog.c