Skip to contentSkip to conversation

mce3: two micro-improvements

PATCH New Borislav Petkov 1 participant 1 message Jun 19, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mce3: two micro-improvements

Hi,

this is against tip/x86/mce3.

--
From: Borislav Petkov <[email protected]>
Date: Fri, 19 Jun 2009 16:42:18 +0200
Subject: [PATCH] mce3: two micro-improvements

---
 arch/x86/include/asm/mce.h       |    2 +-
 arch/x86/kernel/cpu/mcheck/mce.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/mce.h +1 -1
index 5cdd8d1..b50b9e9 100644
@@ -9,7 +9,7 @@
  */
 
 #define MCG_BANKCNT_MASK	0xff         /* Number of Banks */
-#define MCG_CTL_P		(1ULL<<8)    /* MCG_CAP register available */
+#define MCG_CTL_P		(1ULL<<8)    /* MCG_CTL register available */
 #define MCG_EXT_P		(1ULL<<9)    /* Extended registers available */
 #define MCG_CMCI_P		(1ULL<<10)   /* CMCI supported */
 #define MCG_EXT_CNT_MASK	0xff0000     /* Number of Extended registers */
arch/x86/kernel/cpu/mcheck/mce.c +2 -2
index 284d1de..7da8fec 100644
@@ -242,7 +242,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
 	/*
 	 * Make sure only one CPU runs in machine check panic
 	 */
-	if (atomic_add_return(1, &mce_paniced) > 1)
+	if (atomic_inc_return(&mce_paniced) > 1)
 		wait_for_panic();
 	barrier();
 
@@ -705,7 +705,7 @@ static int mce_start(int *no_way_out)
 	 * global_nwo should be updated before mce_callin
 	 */
 	smp_wmb();
-	order = atomic_add_return(1, &mce_callin);
+	order = atomic_inc_return(&mce_callin);
 
 	/*
 	 * Wait for everyone.
Signature · 11 lines
1.6.3.1

-- 
Regards/Gruss,
Boris.

Operating | Advanced Micro Devices GmbH
  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
 Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
  (OSRC)  | Registergericht München, HRB Nr. 43632