From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753346AbdKNQML (ORCPT ); Tue, 14 Nov 2017 11:12:11 -0500 Received: from terminus.zytor.com ([65.50.211.136]:40201 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbdKNQME (ORCPT ); Tue, 14 Nov 2017 11:12:04 -0500 Date: Tue, 14 Nov 2017 08:09:54 -0800 From: tip-bot for Kan Liang Message-ID: Cc: eranian@google.com, linux-kernel@vger.kernel.org, hpa@zytor.com, kan.liang@intel.com, tglx@linutronix.de, mingo@kernel.org Reply-To: tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, kan.liang@intel.com, eranian@google.com, linux-kernel@vger.kernel.org In-Reply-To: <1510668400-301000-1-git-send-email-kan.liang@intel.com> References: <1510668400-301000-1-git-send-email-kan.liang@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf/x86/intel/uncore: Add event constraint for BDX PCU Git-Commit-ID: bb9fbe1b57503f790dbbf9f06e72cb0fb9e60740 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 Commit-ID: bb9fbe1b57503f790dbbf9f06e72cb0fb9e60740 Gitweb: https://git.kernel.org/tip/bb9fbe1b57503f790dbbf9f06e72cb0fb9e60740 Author: Kan Liang AuthorDate: Tue, 14 Nov 2017 06:06:40 -0800 Committer: Thomas Gleixner CommitDate: Tue, 14 Nov 2017 17:07:49 +0100 perf/x86/intel/uncore: Add event constraint for BDX PCU Event select bit 7 'Use Occupancy' in PCU Box is not available for counter 0 on BDX Add a constraint to fix it. Reported-by: Stephane Eranian Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Tested-by: Stephane Eranian Cc: peterz@infradead.org Cc: ak@linux.intel.com Link: https://lkml.kernel.org/r/1510668400-301000-1-git-send-email-kan.liang@intel.com --- arch/x86/events/intel/uncore_snbep.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 95cb19f..f4e4168 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -3035,11 +3035,19 @@ static struct intel_uncore_type *bdx_msr_uncores[] = { NULL, }; +/* Bit 7 'Use Occupancy' is not available for counter 0 on BDX */ +static struct event_constraint bdx_uncore_pcu_constraints[] = { + EVENT_CONSTRAINT(0x80, 0xe, 0x80), + EVENT_CONSTRAINT_END +}; + void bdx_uncore_cpu_init(void) { if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; uncore_msr_uncores = bdx_msr_uncores; + + hswep_uncore_pcu.constraints = bdx_uncore_pcu_constraints; } static struct intel_uncore_type bdx_uncore_ha = {