Received: by 10.223.164.202 with SMTP id h10csp564748wrb; Tue, 14 Nov 2017 06:11:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMb1c6rifgzcDHOBzEJcofK2OPcgKePpqYzkPS3trVPTcxvK1kpXwXajsLNHCIRtizev+qI4 X-Received: by 10.99.146.18 with SMTP id o18mr12140139pgd.17.1510668682268; Tue, 14 Nov 2017 06:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510668682; cv=none; d=google.com; s=arc-20160816; b=Gj3Zj76zljdxxLjnDMJBHitDdCRe3Gdq7p0bCqB2VxgQAfp+EPD0sn/VwmUvyfUo7v nvedOJfhrzJEhFB0LLSggde3iZb7x3u71SP7CgYmvjqDoKqFWt82+YT2GDAAdkYN2E2r z/4Y3SAQqahSId+aFpwZscIuO+qteiwsMLkLytcjuJl8Sdd1G1rkSi96HB4b1u6MHspD bbCq4GxD7Fpga8xtSDe6jO7CmPvgsMHk4NAbgNpTsNQi6WSfeB37YcocBCFiCRRRduZW lnjr99dLM1Z9A+eZoD3gUaCZxLka1WXHa2OGqh4EdbZrF7geTMX9UjvKcZjJ8cz6KP/I Z08w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sFL2BRnUVYjk3y/pPdaJeGKRC/WbWnMGrRN+sZbC1/4=; b=SEhWtu2Zrof4Y2QlS9rcflZLBUuyTLNonOdcX5wPIZCOT87pBWfXNbSj6zf4u0C9gl 0CJSIeLUe7ct3K8AS/JQVnI2SdXYUGHWo8OaJJ14dtwyjI3OZgP5NtZZavtHV1TMhZ3L GXO7DPshNg/Daqa0PDVQKOZUHSKihQwIXCqq2lD2koZfIljpA72h3M1wE6uGlrHW2T+4 SG7ZVZLnlhdz0xZmel1SPovequh+ZbrHkNBzXeaQ/qwreF2IztiG83FnUwFxqfcqiqhR 8lBJtvCWlGrZVhAcmtdCwG0fGJxoyfEgqPM9DCd5vLRrlCkVrfISFiUXEDwT72JTm7+N dlgA== 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 a33si16136322pld.92.2017.11.14.06.11.07; Tue, 14 Nov 2017 06:11:22 -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 S1755489AbdKNOHN (ORCPT + 88 others); Tue, 14 Nov 2017 09:07:13 -0500 Received: from mga05.intel.com ([192.55.52.43]:17253 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753507AbdKNOHJ (ORCPT ); Tue, 14 Nov 2017 09:07:09 -0500 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2017 06:07:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,395,1505804400"; d="scan'208";a="149382696" Received: from otc-lr-04.jf.intel.com ([10.54.39.29]) by orsmga004.jf.intel.com with ESMTP; 14 Nov 2017 06:07:08 -0800 From: kan.liang@intel.com To: tglx@linutronix.de, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: eranian@google.com, ak@linux.intel.com, Kan Liang Subject: [PATCH] perf/x86/intel/uncore: add event constraint for BDX PCU Date: Tue, 14 Nov 2017 06:06:40 -0800 Message-Id: <1510668400-301000-1-git-send-email-kan.liang@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kan Liang 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 Tested-by: Stephane Eranian --- 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 d5b4398..3991032 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -3034,11 +3034,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 = { -- 2.4.3 From 1583918195942243249@xxx Mon Nov 13 03:01:42 +0000 2017 X-GM-THRID: 1583918195942243249 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread