Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1084227ybl; Wed, 14 Aug 2019 10:26:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyILRVYDe76bRds3R3AFv/XjPjSWH1l4ycw/2rVjxv1bNBnMsyqs/C35ET/2Es6YW32pUxI X-Received: by 2002:a17:90a:eb08:: with SMTP id j8mr839829pjz.72.1565803579105; Wed, 14 Aug 2019 10:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803579; cv=none; d=google.com; s=arc-20160816; b=WyeA+yWKbrwmHzMjwvE/ECzhFxJd0c/914o0LjQt7qMf7BeFSekf97Ot2eEjDE/0Ue bD79yk3cgYYkB7T8XfklHtmO/b0howMJotzUYc/IYN1Rr2mUHHTJA36tnxXZxs5L3jlI NnTW1datuOWJJTWMccLnVDftmxc7yiMPWXyH4UhathNmb9tgwtVNFvrbjvV85GxVD4IS /MULDwrPuOfhmTyYiUSOEogsikVNy9cDQrwS0Bqor41L5NfQE1Dsy58Aitt+sMWaR3PY uNCI42gMpSNBe2LO6+t3kkimxMdl8fDRKTPja2qFCOS4iukPfDWBy1IJM1wAqf/Aj451 AywA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tCDbplWPfVInGLUkrbzRlt4kbf/NUspqop2a2Lkufyg=; b=orP+fhovL80h4oHPGvJY+JqX7BLW70eYcEKo3zFPfkmdx1O2NFdwmr/02NajcIvLFN eP4e+WKCpMhGyFU46hPtXLWc26Vh9LIbUpB6lSQ51XfOGPHg/qrE4X5XJYaKnDHIEZF0 Qm7YgLOdZPc0dix7aAq5H3qRXeIxiYaIZHxxGGKMRRZ5UGRQdLOue8DJQ06qZ+L+U3Gx Iq5bUK25Sn4hty10Wz3RSsmIoHBSDiksKNyd4GxqSlkXW6ZfhnS07TYDuApkP4lh/yoP 0mGQfiGzJ3kqVgkO+/fNu4JFGwtu6LS6aLe+QeEIxCdntK/67254l2XNWAgFQXAwfTlE nHTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wE1wnwah; 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 u185si157586pgd.561.2019.08.14.10.26.02; Wed, 14 Aug 2019 10:26:19 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=wE1wnwah; 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 S1729134AbfHNRGt (ORCPT + 99 others); Wed, 14 Aug 2019 13:06:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:55960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729136AbfHNRGo (ORCPT ); Wed, 14 Aug 2019 13:06:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E4C621721; Wed, 14 Aug 2019 17:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802404; bh=kMnTO3RgwWOH+yLy+5j3sBYEHdgm1LH/sb0y+RPW8pQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wE1wnwahl6IxlR+BQDvfVyd5W0wmt11FpnMDy3gIAyFnrrad0zj7g6pzKlz4Jdxmh KYtdQn7fBntZ3w7QuhmhzF3H71BZTDQcrd12Ms2DiEs3oh2i856XE9++TW0Ktu7p3Q 9ZpVl9+znQH6ywcprni6DfQSwv71AA0yA/FWlZbg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andi Kleen , Kan Liang , "Peter Zijlstra (Intel)" , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 5.2 112/144] perf/x86/intel: Fix SLOTS PEBS event constraint Date: Wed, 14 Aug 2019 19:01:08 +0200 Message-Id: <20190814165804.595706787@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 3d0c3953601d250175c7684ec0d9df612061dae5 ] Sampling SLOTS event and ref-cycles event in a group on Icelake gives EINVAL. SLOTS event is the event stands for the fixed counter 3, not fixed counter 2. Wrong mask was set to SLOTS event in intel_icl_pebs_event_constraints[]. Reported-by: Andi Kleen Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support") Link: https://lkml.kernel.org/r/20190723200429.8180-1-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index 505c73dc6a730..6601b8759c92f 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -851,7 +851,7 @@ struct event_constraint intel_skl_pebs_event_constraints[] = { struct event_constraint intel_icl_pebs_event_constraints[] = { INTEL_FLAGS_UEVENT_CONSTRAINT(0x1c0, 0x100000000ULL), /* INST_RETIRED.PREC_DIST */ - INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x400000000ULL), /* SLOTS */ + INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x800000000ULL), /* SLOTS */ INTEL_PLD_CONSTRAINT(0x1cd, 0xff), /* MEM_TRANS_RETIRED.LOAD_LATENCY */ INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x1d0, 0xf), /* MEM_INST_RETIRED.LOAD */ -- 2.20.1