Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761959AbcLSK5E (ORCPT ); Mon, 19 Dec 2016 05:57:04 -0500 Received: from terminus.zytor.com ([198.137.202.10]:58198 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761873AbcLSK5A (ORCPT ); Mon, 19 Dec 2016 05:57:00 -0500 Date: Mon, 19 Dec 2016 02:56:35 -0800 From: tip-bot for Andy Lutomirski Message-ID: Cc: hpa@zytor.com, bp@alien8.de, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, brgerst@gmail.com, luto@kernel.org Reply-To: brgerst@gmail.com, luto@kernel.org, hpa@zytor.com, bp@alien8.de, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <6ea30c0e9daec21e488b54761881a6dfcf3e04d0.1481825597.git.luto@kernel.org> References: <6ea30c0e9daec21e488b54761881a6dfcf3e04d0.1481825597.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 Git-Commit-ID: 3df8d9208569ef0b2313e516566222d745f3b94b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1678 Lines: 45 Commit-ID: 3df8d9208569ef0b2313e516566222d745f3b94b Gitweb: http://git.kernel.org/tip/3df8d9208569ef0b2313e516566222d745f3b94b Author: Andy Lutomirski AuthorDate: Thu, 15 Dec 2016 10:14:42 -0800 Committer: Thomas Gleixner CommitDate: Mon, 19 Dec 2016 11:50:24 +0100 x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 A typo (or mis-merge?) resulted in leaf 6 only being probed if cpuid_level >= 7. Fixes: 2ccd71f1b278 ("x86/cpufeature: Move some of the scattered feature bits to x86_capability") Signed-off-by: Andy Lutomirski Acked-by: Borislav Petkov Cc: Brian Gerst Link: http://lkml.kernel.org/r/6ea30c0e9daec21e488b54761881a6dfcf3e04d0.1481825597.git.luto@kernel.org Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 1f6b50a..dc1697c 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -667,13 +667,14 @@ void get_cpu_cap(struct cpuinfo_x86 *c) c->x86_capability[CPUID_1_EDX] = edx; } + /* Thermal and Power Management Leaf: level 0x00000006 (eax) */ + if (c->cpuid_level >= 0x00000006) + c->x86_capability[CPUID_6_EAX] = cpuid_eax(0x00000006); + /* Additional Intel-defined flags: level 0x00000007 */ if (c->cpuid_level >= 0x00000007) { cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx); - c->x86_capability[CPUID_7_0_EBX] = ebx; - - c->x86_capability[CPUID_6_EAX] = cpuid_eax(0x00000006); c->x86_capability[CPUID_7_ECX] = ecx; }