From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751249AbdAQUnN (ORCPT ); Tue, 17 Jan 2017 15:43:13 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:46366 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbdAQUnM (ORCPT ); Tue, 17 Jan 2017 15:43:12 -0500 Date: Tue, 17 Jan 2017 21:43:02 +0100 (CET) From: Thomas Gleixner To: Borislav Petkov cc: X86 ML , LKML Subject: Re: [PATCH 10/13] x86/microcode/AMD: Check patch level only on the BSP In-Reply-To: <20170117173734.14251-11-bp@alien8.de> Message-ID: References: <20170117173734.14251-1-bp@alien8.de> <20170117173734.14251-11-bp@alien8.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Jan 2017, Borislav Petkov wrote: > From: Borislav Petkov > > Check final patch levels for AMD only on the BSP. This way, we decide > early and only once whether to continue loading or to leave the loader > disabled on such systems. > > Simplify a lot. > > Signed-off-by: Borislav Petkov > void __init load_ucode_bsp(void) > { > - unsigned int vendor, cpuid_1_eax; > + unsigned int cpuid_1_eax; > > if (check_loader_disabled_bsp()) > return; > > - vendor = x86_cpuid_vendor(); > cpuid_1_eax = native_cpuid_eax(1); > > - switch (vendor) { > + switch (x86_cpuid_vendor()) { > case X86_VENDOR_INTEL: > if (x86_family(cpuid_1_eax) >= 6) > load_ucode_intel_bsp(); > @@ -155,15 +195,14 @@ static bool check_loader_disabled_ap(void) > > void load_ucode_ap(void) > { > - unsigned int vendor, cpuid_1_eax; > + unsigned int cpuid_1_eax; > > if (check_loader_disabled_ap()) > return; > > - vendor = x86_cpuid_vendor(); > cpuid_1_eax = native_cpuid_eax(1); > > - switch (vendor) { > + switch (x86_cpuid_vendor()) { > case X86_VENDOR_INTEL: > if (x86_family(cpuid_1_eax) >= 6) > load_ucode_intel_ap(); These two hunks look unrelated to $subject. Please seperate them out. Thanks, tglx