Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6043748yba; Tue, 14 May 2019 00:14:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNl2G6m+ygOPrF26HMtSTAHdQmiRbJIJTu0kZfCzY4qj/lVhgL8KfhcBdAuvq3t2vKS67e X-Received: by 2002:aa7:93bb:: with SMTP id x27mr38369617pff.104.1557818067294; Tue, 14 May 2019 00:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557818067; cv=none; d=google.com; s=arc-20160816; b=pvjRhd2uXQyccyWWy4Y4V2HJxUwQzvpi7er8F1/R7WZU2Kuh251CpC04YmHM0Q7g3r hhKeh7D0+LXjOn/QEonrtbHiPFfVT6PglQszYdrB9v8PVmHSr826kNca+00bKR6ZWL3p tXJyF8Agkmo27tTGgdEzk0qBZLRubXhNMLbjUT3LxzIHav4N9Kp3XIhBYw0SvRSErzLj ttTt57LO2g3pKbfX1x8sfkH0hseI+SZybzcegdHUGOOjm+3ht2ZhaE8H8ucw4UR+U1H6 ndqsIY377mSBhuI9vVz0HzaXvzmU0A+X4exZxVgpz6bHKUme5gGBLMiijh4oHXMSfZOw 35UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=xQjJyNqXazPOXIYLNRb/BA2jAUGCULfn5jnQCl9oViA=; b=P+wP2Jxwzrj3Q3Iq24PYRB08T6b1ilPtj8J6BaStQFcQe1S3Ehegh82wYhrbcjb0Iw XnLVFQx9w1soNpn1qHNLokdIZjHKre15uy+vQvx6p4xvFajQJt+V9PfHcbegynOPIyZx eVYUXgJnbQDOeq1Jb7LSUEK6Q5ngJX7s8dGi0y8DyXpT9Qz6wJH8p1pI/u3grIVWJRjr P3KXEpTmQUm2VPkI1AXnkdpSWn2A3y1KjpsssPW3dnqixrCpEO2tHIkl2cbKAjXbJ7vz hkfKd+ifN3cM6wK2HhlL0Ni5CKkpiuDdvwZndjZBA8t4aFm5uA9pvhhb6BkhOp3ukzNx i1+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019041745 header.b=EnlwuG8C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si20466420pfn.287.2019.05.14.00.14.11; Tue, 14 May 2019 00:14:27 -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=@zytor.com header.s=2019041745 header.b=EnlwuG8C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726434AbfENHNX (ORCPT + 99 others); Tue, 14 May 2019 03:13:23 -0400 Received: from terminus.zytor.com ([198.137.202.136]:46801 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbfENHNX (ORCPT ); Tue, 14 May 2019 03:13:23 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x4E7D1nM3904743 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 14 May 2019 00:13:01 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x4E7D1nM3904743 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019041745; t=1557817982; bh=xQjJyNqXazPOXIYLNRb/BA2jAUGCULfn5jnQCl9oViA=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=EnlwuG8CUQcOn0wPoE1sdwn0kaBlNKhOWN6w8dmXsCqZyr+3osw7sK1Ah76t4EyVi QtKTHl9iu5vk3RfQNdiZl+ieceE0+FLGb4iIlXhecNTM6Ly2XOPbur01T05GpmczH9 vg0Yr+Y0wFg4Ldf1d/Tdqt/jIbf2IbrFrET0cimfITZ7WYjyF/VRPsQCZ1xtVAIMqa 6i1H3yCwLJ5XQ6ojZ5p2qPTIVsofnYJiq1nS3a/g8mwA77CUz5TIB/Dy5viBYmpFSh eys8UKnZ/UmEDSgl4BVVdBJiS+V3JltJ8az+APLHIAolvR/6rnifhdg1sFO0aTqYfK cDg28NF9nc52w== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x4E7D1Rr3904740; Tue, 14 May 2019 00:13:01 -0700 Date: Tue, 14 May 2019 00:13:01 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Stephane Eranian Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, eranian@google.com, torvalds@linux-foundation.org, peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de Reply-To: peterz@infradead.org, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, eranian@google.com In-Reply-To: <20190514003400.224340-1-eranian@google.com> References: <20190514003400.224340-1-eranian@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf/x86/intel: Allow PEBS multi-entry in watermark mode Git-Commit-ID: c7a286577d7592720c2f179aadfb325a1ff48c95 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 X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c7a286577d7592720c2f179aadfb325a1ff48c95 Gitweb: https://git.kernel.org/tip/c7a286577d7592720c2f179aadfb325a1ff48c95 Author: Stephane Eranian AuthorDate: Mon, 13 May 2019 17:34:00 -0700 Committer: Ingo Molnar CommitDate: Tue, 14 May 2019 09:07:58 +0200 perf/x86/intel: Allow PEBS multi-entry in watermark mode This patch fixes a restriction/bug introduced by: 583feb08e7f7 ("perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS") The original patch prevented using multi-entry PEBS when wakeup_events != 0. However given that wakeup_events is part of a union with wakeup_watermark, it means that in watermark mode, PEBS multi-entry is also disabled which is not the intent. This patch fixes this by checking is watermark mode is enabled. Signed-off-by: Stephane Eranian Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: jolsa@redhat.com Cc: kan.liang@intel.com Cc: vincent.weaver@maine.edu Fixes: 583feb08e7f7 ("perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS") Link: http://lkml.kernel.org/r/20190514003400.224340-1-eranian@google.com Signed-off-by: Ingo Molnar --- arch/x86/events/intel/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index ef763f535e3a..12ec402f4114 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3265,7 +3265,7 @@ static int intel_pmu_hw_config(struct perf_event *event) return ret; if (event->attr.precise_ip) { - if (!(event->attr.freq || event->attr.wakeup_events)) { + if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) { event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD; if (!(event->attr.sample_type & ~intel_pmu_large_pebs_flags(event)))