Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932687AbbHDIwv (ORCPT ); Tue, 4 Aug 2015 04:52:51 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49967 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932344AbbHDIwp (ORCPT ); Tue, 4 Aug 2015 04:52:45 -0400 Date: Tue, 4 Aug 2015 01:51:47 -0700 From: tip-bot for Dasaratharaman Chandramouli Message-ID: Cc: nikhil.rao@intel.com, peterz@infradead.org, hpa@zytor.com, paulus@samba.org, torvalds@linux-foundation.org, dasaratharaman.chandramouli@intel.com, jacob.jun.pan@linux.intel.com, acme@kernel.org, eranian@google.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Reply-To: nikhil.rao@intel.com, hpa@zytor.com, peterz@infradead.org, paulus@samba.org, torvalds@linux-foundation.org, eranian@google.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, dasaratharaman.chandramouli@intel.com, jacob.jun.pan@linux.intel.com, acme@kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf/x86/intel/rapl: Add support for Knights Landing (KNL) Git-Commit-ID: 3a2a7797326a4bc59b7ff0cc92c8b274abf21892 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: 3039 Lines: 81 Commit-ID: 3a2a7797326a4bc59b7ff0cc92c8b274abf21892 Gitweb: http://git.kernel.org/tip/3a2a7797326a4bc59b7ff0cc92c8b274abf21892 Author: Dasaratharaman Chandramouli AuthorDate: Tue, 26 May 2015 11:47:39 -0700 Committer: Ingo Molnar CommitDate: Tue, 4 Aug 2015 10:16:52 +0200 perf/x86/intel/rapl: Add support for Knights Landing (KNL) Knights Landing DRAM RAPL supports PKG and DRAM RAPL domains. DRAM RAPL has a different fixed energy unit (2^-16J) similar to that of HSW. Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Peter Zijlstra (Intel) Acked-by: Stephane Eranian Acked-by: Jacob Pan Cc: Arnaldo Carvalho de Melo Cc: H. Peter Anvin Cc: Jacob Pan Jun Cc: Linus Torvalds Cc: Nikhil Rao Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/aa63b4a3af3160152fea1a10c807f4200527280c.1432665809.git.dasaratharaman.chandramouli@intel.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/perf_event_intel_rapl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c index 5cbd4e6..81431c0 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c @@ -86,6 +86,10 @@ static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = { 1<config * any other bit is reserved @@ -486,6 +490,18 @@ static struct attribute *rapl_events_hsw_attr[] = { NULL, }; +static struct attribute *rapl_events_knl_attr[] = { + EVENT_PTR(rapl_pkg), + EVENT_PTR(rapl_ram), + + EVENT_PTR(rapl_pkg_unit), + EVENT_PTR(rapl_ram_unit), + + EVENT_PTR(rapl_pkg_scale), + EVENT_PTR(rapl_ram_scale), + NULL, +}; + static struct attribute_group rapl_pmu_events_group = { .name = "events", .attrs = NULL, /* patched at runtime */ @@ -730,6 +746,10 @@ static int __init rapl_pmu_init(void) rapl_cntr_mask = RAPL_IDX_SRV; rapl_pmu_events_group.attrs = rapl_events_srv_attr; break; + case 87: /* Knights Landing */ + rapl_add_quirk(rapl_hsw_server_quirk); + rapl_cntr_mask = RAPL_IDX_KNL; + rapl_pmu_events_group.attrs = rapl_events_knl_attr; default: /* unsupported */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/