From patchwork Thu Mar 4 23:14:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkip X-Patchwork-Id: 83687 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 o24NKjIv015863 for ; Thu, 4 Mar 2010 23:20:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756655Ab0CDXUK (ORCPT ); Thu, 4 Mar 2010 18:20:10 -0500 Received: from mga11.intel.com ([192.55.52.93]:54014 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756558Ab0CDXUI (ORCPT ); Thu, 4 Mar 2010 18:20:08 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 04 Mar 2010 15:17:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,583,1262592000"; d="scan'208";a="778075476" Received: from linux-os.sc.intel.com ([172.25.110.8]) by fmsmga001.fm.intel.com with ESMTP; 04 Mar 2010 15:19:55 -0800 Received: by linux-os.sc.intel.com (Postfix, from userid 47009) id 3294A28007; Thu, 4 Mar 2010 15:20:07 -0800 (PST) Message-Id: <20100304231547.654246000@intel.com> References: <20100304231454.247805000@intel.com> User-Agent: quilt/0.46-1 Date: Thu, 04 Mar 2010 15:14:55 -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 - v2 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]); Thu, 04 Mar 2010 23:20:46 +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 },