Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932250AbbFVREg (ORCPT ); Mon, 22 Jun 2015 13:04:36 -0400 Received: from mga14.intel.com ([192.55.52.115]:59274 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbbFVRE2 (ORCPT ); Mon, 22 Jun 2015 13:04:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,660,1427785200"; d="scan'208";a="732376132" Subject: Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL) From: Dasaratharaman Chandramouli To: Jacob Pan Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Nikhil Rao , Stephane Eranian In-Reply-To: <20150529100631.763eaef5@icelake> References: <20150529100631.763eaef5@icelake> Content-Type: text/plain; charset="UTF-8" Date: Mon, 22 Jun 2015 10:17:47 -0700 Message-ID: <1434993467.13217.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-30.el6) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2301 Lines: 69 Ping. On Fri, 2015-05-29 at 10:06 -0700, Jacob Pan wrote: > On Tue, 26 May 2015 11:47:39 -0700 > Dasaratharaman Chandramouli > wrote: > > > 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. > > > Acked-by: Jacob Pan > > Signed-off-by: Dasaratharaman Chandramouli > > --- > > 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 999289b9..96633fb > > 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< > > > +/* Knights Landing has PKG, RAM */ > > +#define RAPL_IDX_KNL (1< > + 1< > + > > /* > > * event code: LSB 8 bits, passed in attr->config > > * any other bit is reserved > > @@ -487,6 +491,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 */ > > [Jacob Pan] -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/