Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317242 > unrolled thread

[PATCH 3/8] x86/mce: Fix order of AMD MCE init function call

Started byBorislav Petkov <bp@alien8.de>
First post2016-01-25 20:50 +0100
Last post2016-01-25 20:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/8] x86/mce: Fix order of AMD MCE init function call Borislav Petkov <bp@alien8.de> - 2016-01-25 20:50 +0100

#1317242 — [PATCH 3/8] x86/mce: Fix order of AMD MCE init function call

FromBorislav Petkov <bp@alien8.de>
Date2016-01-25 20:50 +0100
Subject[PATCH 3/8] x86/mce: Fix order of AMD MCE init function call
Message-ID<qUVjb-pt-1@gated-at.bofh.it>
From: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>

In mce_amd_feature_init() we take decisions based on mce_flags being set
or not. So the feature detection using CPUID should naturally be ordered
before we call mce_amd_feature_init().

Fix that here.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1452901836-27632-2-git-send-email-Aravind.Gopalakrishnan@amd.com
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index a006f4cd792b..b7180801ea33 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1617,10 +1617,10 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
 	case X86_VENDOR_AMD: {
 		u32 ebx = cpuid_ebx(0x80000007);
 
-		mce_amd_feature_init(c);
 		mce_flags.overflow_recov = !!(ebx & BIT(0));
 		mce_flags.succor	 = !!(ebx & BIT(1));
 		mce_flags.smca		 = !!(ebx & BIT(3));
+		mce_amd_feature_init(c);
 
 		break;
 		}
-- 
2.3.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web