Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3052821imm; Sun, 1 Jul 2018 11:08:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ/O9PZFp4pA2PKE1phvnuqLBvbjrJp52s8jCx5UlfMwHYA30xuhthGKVtQqys9iXJcYpfN X-Received: by 2002:a65:49c7:: with SMTP id t7-v6mr19355743pgs.23.1530468494795; Sun, 01 Jul 2018 11:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530468494; cv=none; d=google.com; s=arc-20160816; b=AwVpdrNEQLIJLWkk6VEmGzo/Zg77naz9bYY7gUqTBRchoVPu3LZu0+NKjzs3buSf5c 9xMfDuJSSygUztVPbFQA4if89TejmfQOwmYwtBeOaZGaXp1ueKustiiRygi3pxEptD8f S2qUdxG++4Ze70ynKQsr3LpxyomrFfs/Anz6h8r6Z9+qqJY8tVyCypufMjRdnNWgzNCx oRy9MTSfZV8nkZK7KCy30bDRH6jKmNh79WHMzG9+A1m4aVJpGA0KpFD2ftR2jjWEXc8U p3O2WpmCA45YMa1bX27kMCULTzw36V9PaWOMLc3YImwvD8hnOKL4KUISrrJrxIzuWlu6 XgAA== 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=A/mhGUF9z3i/GQBD9UFfnqOZdZTMipqBiUGWVKy3lkY=; b=alj6LZfgbcz8tP3WfOo2Og74Ms/lBC7vOeRQfhJgau/aBCwcIv6KEmDAFmDroY9m1J JBG3fk9fh1/C9r5gX1RKQp5HmiWKJweNfADu5wzjMZLzEWWj18nCQ3CgDflF4sLFxCNN 6YFVrli++mfHi57lHAQxZDLl0UC0yQuLUDDOiwfULy0bDa/3kirBuzv5xQvTVhDoA+vz KJLz98THbpY+YiRPprhCpyfjevZ1qiGC7CvIHWtlByqODHBKG9LG7JIkN/XDQvkgfI0F JXRvwp8PE4Mq/OrtluVLzqz6cznAmO2mW+xavOn0e+5mVCVes0T4vWUf9mMOnYrDnTps DOpw== 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 124-v6si12285059pgi.425.2018.07.01.11.08.00; Sun, 01 Jul 2018 11:08:14 -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 S965742AbeGAQ2r (ORCPT + 99 others); Sun, 1 Jul 2018 12:28:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34350 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965680AbeGAQ2g (ORCPT ); Sun, 1 Jul 2018 12:28:36 -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 5B19792B; Sun, 1 Jul 2018 16:28:35 +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.9 078/101] perf intel-pt: Fix MTC timing after overflow Date: Sun, 1 Jul 2018 18:22:04 +0200 Message-Id: <20180701160800.290908659@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@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.9-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 @@ -1298,7 +1298,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;