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


Groups > linux.kernel > #1317242

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

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject [PATCH 3/8] x86/mce: Fix order of AMD MCE init function call
Date 2016-01-25 20:50 +0100
Message-ID <qUVjb-pt-1@gated-at.bofh.it> (permalink)
References <qUVjb-pt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web