From patchwork Wed Mar 3 00:06:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkip X-Patchwork-Id: 83200 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o230GfXv021242 for ; Wed, 3 Mar 2010 00:16:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755127Ab0CCAQk (ORCPT ); Tue, 2 Mar 2010 19:16:40 -0500 Received: from mga01.intel.com ([192.55.52.88]:1908 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753476Ab0CCAQj (ORCPT ); Tue, 2 Mar 2010 19:16:39 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 02 Mar 2010 16:13:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,570,1262592000"; d="scan'208";a="545465736" Received: from linux-os.sc.intel.com ([172.25.110.8]) by fmsmga002.fm.intel.com with ESMTP; 02 Mar 2010 16:15:44 -0800 Received: by linux-os.sc.intel.com (Postfix, from userid 47009) id 559A028007; Tue, 2 Mar 2010 16:16:38 -0800 (PST) Message-Id: <20100303000849.141285000@intel.com> References: <20100303000649.757684000@intel.com> User-Agent: quilt/0.46-1 Date: Tue, 02 Mar 2010 16:06:50 -0800 From: venkatesh.pallipadi@intel.com To: Ingo Molnar , H Peter Anvin , Thomas Gleixner , Len Brown , Dave Jones Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Venkatesh Pallipadi Subject: [patch 1/2] x86: Look for IA32_ENERGY_PERF_BIAS support Content-Disposition: inline; filename=0001-x86-Look-for-IA32_ENERGY_PERF_BIAS-support.patch Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 03 Mar 2010 00:16:41 +0000 (UTC) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 0cd82d0..0e1d52c 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -161,6 +161,7 @@ */ #define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */ #define X86_FEATURE_ARAT (7*32+ 1) /* Always Running APIC Timer */ +#define X86_FEATURE_EPB (7*32+ 2) /* IA32_ENERGY_PERF_BIAS support */ /* Virtualization flags: Linux defined */ #define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */ diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 1cd58cd..feeb918 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -230,6 +230,8 @@ #define MSR_IA32_MISC_ENABLE 0x000001a0 +#define MSR_IA32_ENERGY_PERF_BIAS 0x000001b0 + /* MISC_ENABLE bits: architectural */ #define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0) #define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1) diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index 97ad79c..3bc5eda 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c @@ -32,6 +32,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) static const struct cpuid_bit __cpuinitconst cpuid_bits[] = { { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 }, { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006 }, + { X86_FEATURE_EPB, CR_ECX, 3, 0x00000006 }, { X86_FEATURE_NPT, CR_EDX, 0, 0x8000000a }, { X86_FEATURE_LBRV, CR_EDX, 1, 0x8000000a }, { X86_FEATURE_SVML, CR_EDX, 2, 0x8000000a },