Received: by 10.223.185.111 with SMTP id b44csp385742wrg; Fri, 9 Mar 2018 06:40:04 -0800 (PST) X-Google-Smtp-Source: AG47ELuHIpyjqbebAQeqnTwdrcb9/oICDJLzJ3zsbvQ4aAL7vOfVhsFwEX39fngZX4C2qSgA5FDj X-Received: by 10.99.117.10 with SMTP id q10mr24494400pgc.423.1520606404039; Fri, 09 Mar 2018 06:40:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520606403; cv=none; d=google.com; s=arc-20160816; b=MWeAsHxzdMEOxahCjO37gPvPX1Ll+slIK4wXsD4m/+yEU/JCz1PwpA1NLhoHVPvwjy FUJvA6usGvV8isXIIS4Hyv3SPTe58i5RnG6nwdAHafd9hEgyAPie9MqEpLW6GADEfoWD Pgm+8fRGB80g0sMVM7T5t+FnAr2gu4rUDwNAC7UXx8FXwZ4SRqU3spzbB/L2lUvC8Z7i iWjd7sU4/BNatyIQ1bE40S1GP0mVjfunvbyFBmb7NaCAG5OA97RNQ4aZ9QruCQh9acYD sc9hIXzG6lDQpON2v3p7rEbpBV6RJy1dQAaJFbVl4wp4DxapJ599DEKUpptVXMH7SPaB LwhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=HHKBWjJbsR+AaYhKrD+2Ox4e4lhCYJX94rW8lfOhxY0=; b=aHR3ie429ZjIIG8rBvc86kaJvHG08oBjkT7DxZHeK0tOURlxLHtzw2BgQvPK6HjW+N 2LC+84yCInPA+in/bEhjxtx3V+dGVR/B2oJf1cP2uIrOz3BV+9jyY1/1SC+cXVYGe9nL o0440FgKwINlmPveAK5v/eT8+2mZmGWHg/jVJ80vBydD06eUTcsrXzz4fJf0RLPX+yyM LYVt4RjD4a8nJ9olUx4wEGFap9Pn/X7Twe1OrciDXDNfWjnltzs1naXS+riif7E5SsiI 5QYiGmv18fOh65YfSEv1NqdYeNJCF0YQWKwGP360zV5MVvF/1R6Qhrs3Cywmne187jde /9Gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si963263pfa.103.2018.03.09.06.39.49; Fri, 09 Mar 2018 06:40:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932180AbeCIOhs (ORCPT + 99 others); Fri, 9 Mar 2018 09:37:48 -0500 Received: from 123-192-241-158.dynamic.kbronet.com.tw ([123.192.241.158]:45038 "EHLO E6440" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751147AbeCIOhr (ORCPT ); Fri, 9 Mar 2018 09:37:47 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by E6440 (Postfix) with ESMTP id 9E332C2212; Fri, 9 Mar 2018 20:15:56 +0800 (CST) From: Harry Pan To: LKML Cc: gs0622@gmail.com, Harry Pan , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, kan.liang@linux.intel.com, vincent.weaver@maine.edu, peterz@infradead.org, colin.king@canonical.com Subject: [PATCH 2/3] perf/x86/intel: Add Cannon Lake support of RAPL profiling Date: Fri, 9 Mar 2018 20:15:47 +0800 Message-Id: <20180309121549.630-2-harry.pan@intel.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20180309121549.630-1-harry.pan@intel.com> References: <20180309121549.630-1-harry.pan@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch enables RAPL counters (energy consumption counters) support for Cannon Lake processors. ESU and power domains refer to Intel Software Developers' Manual, Vol. 4, Order No. 335592. Usage example: $ perf list $ perf stat -a -e power/energy-cores/,power/energy-pkg/ sleep 10 Signed-off-by: Harry Pan --- arch/x86/events/intel/rapl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c index a2efb490f743..32f3e9423e99 100644 --- a/arch/x86/events/intel/rapl.c +++ b/arch/x86/events/intel/rapl.c @@ -774,6 +774,8 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = { X86_RAPL_MODEL_MATCH(INTEL_FAM6_KABYLAKE_MOBILE, skl_rapl_init), X86_RAPL_MODEL_MATCH(INTEL_FAM6_KABYLAKE_DESKTOP, skl_rapl_init), + X86_RAPL_MODEL_MATCH(INTEL_FAM6_CANNONLAKE_MOBILE, skl_rapl_init), + X86_RAPL_MODEL_MATCH(INTEL_FAM6_ATOM_GOLDMONT, hsw_rapl_init), X86_RAPL_MODEL_MATCH(INTEL_FAM6_ATOM_DENVERTON, hsw_rapl_init), -- 2.13.5