Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2996696imm; Sun, 1 Jul 2018 09:59:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdODQomlWRSVc6AB+t3CVwkuE2aNPjpj+ROuVB0bBKRcK9vUgXxRUXWf8X1KGgYXj18ZKng X-Received: by 2002:a62:9fd1:: with SMTP id v78-v6mr22154477pfk.233.1530464371617; Sun, 01 Jul 2018 09:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530464371; cv=none; d=google.com; s=arc-20160816; b=FnlVKlFrKws8kTOhkNBA9jaT0YFRZx7GDEBYMdmSVXbV03xmKi2P7B7Dj+3JVE3Eyw k9JLNEnQ7ncRPs/HDCbDrAU4wMskBygkSmX2Va+3MtRvmCR9ahpqeSzdzjhaxfsHOroM 7Jg9ZDw7x2SwJtBpJzIGksIu/FIFz1knHA51O7Q42PlC/T97QAek5wSjUZfbYhhy5cin POH0G4i34bzRhmMpDWA5N3lefny4IUXd3MG4ACp6WgqC39Ad1+vZ6R8I+7/U83kfiwkg 0ll/YmAPZocpGpXAbbFOglGsY211RsP6CSgjvhayaLKAbfxApbEn7tN8RSSAxLRpCpm4 tsiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=nM6P/6Ew7sYQoe5VUjwGDqbkpLXzEV6xISyKs0lv92s=; b=PrXEt7rq5y09amx2K0tcEQv3d0Bc3WOESpfFc/aDddidRqQfUmYKa1EtgtpTInLvIx Swb/oxgaYa60jE2zDmNQDXY3TIPCsXm8q90oEcKZlh34/zoP+qoTj7v+9oTveAB855jv mwafW57GSMkKy5w3SbSBnAineLYh4mB/CrUOWWXa+Ope9piC2L1DCO16gWZwrk5vOStF hziuA9KxPO/B4aNsgHr4PzhwgIAAsgylXGnoLOD5UFa31lmil//4vl5I8WlyLc4WKyRe ToXYtibP9PiWcvZNzprdeDl8FebaN9oZYa/YKkfRJYo3uuxhIyvV5aDZXmAy2EpGNnq7 a6Qw== 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 n14-v6si1566503pgg.216.2018.07.01.09.59.17; Sun, 01 Jul 2018 09:59:31 -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; 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 S934055AbeGAQ6O (ORCPT + 99 others); Sun, 1 Jul 2018 12:58:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38024 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032472AbeGAQoW (ORCPT ); Sun, 1 Jul 2018 12:44:22 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8F18992B; Sun, 1 Jul 2018 16:44:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Arnaldo Carvalho de Melo Subject: [PATCH 4.17 170/220] perf intel-pt: Fix MTC timing after overflow Date: Sun, 1 Jul 2018 18:23:14 +0200 Message-Id: <20180701160915.353904348@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit dd27b87ab5fcf3ea1c060b5e3ab5d31cc78e9f4c upstream. On some platforms, overflows will clear before MTC wraparound, and there is no following TSC/TMA packet. In that case the previous TMA is valid. Since there will be a valid TMA either way, stop setting 'have_tma' to false upon overflow. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1527762225-26024-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 - 1 file changed, 1 deletion(-) --- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c @@ -1376,7 +1376,6 @@ static int intel_pt_overflow(struct inte { intel_pt_log("ERROR: Buffer overflow\n"); intel_pt_clear_tx_flags(decoder); - decoder->have_tma = false; decoder->cbr = 0; decoder->timestamp_insn_cnt = 0; decoder->pkt_state = INTEL_PT_STATE_ERR_RESYNC;