Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp482701pxv; Thu, 1 Jul 2021 02:37:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAnaJMshfaRj4Wjw6eNGbkbOUWwlhKJ5YhEEhHssSTgwc6UoKFhp7/+60BoqPCZ+AaNsK9 X-Received: by 2002:a50:ec08:: with SMTP id g8mr27381296edr.98.1625132234285; Thu, 01 Jul 2021 02:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625132234; cv=none; d=google.com; s=arc-20160816; b=kefucIDlE3KBJrCGrEb/olBJNVqnikDgj0QGpGel/Duqhpe4AIlf4MNV7xuMBPVfJn MNasn3b1CSQ/zu1b09g8Cod8flKp32IM5/2VyUSTk5zllfJZ51ElL1ih9tU6HShnNQSB sRe0ZIxX/6YaF+tXZnZkjCZNLAlpFIoDSzvLU558IlnUi71+6rpMw0CCc3oLJpLkLElU mDq0mZUB3ESy8HelvKyJ3179YQn0YjOcxCzR5pdQMdvWpPtabLgYtbw0AhouLRC16r+y EeXUHM2QTkHUwhZY6PPRB3jxMw4T+g1KzRArzhIbW/mOYuSyPAJQtzYsUe7GS+SgDyl9 mr/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RO+W36IfmCoOF5xjf8ZackNVFoRy6NygyQXZ/WJRofM=; b=wraJhN6zpm2WUlNxx6tJAsIjcYGZv9C9gzBQwj0+H5XN2B2cHfB7zGhm/6du9+kf17 J2J9NdyNpW9IMsZp1c/sWSd71ncXz55hLiFVUi0PGgFwWYCYndyqVBouxjXyHRw6mcTy LuizLeq1cf2iw25XXtevY6IxIk+aftB5NwgA4CS7ori8iiGj7qG6uTMsLtCOlzzQiNSs Ffyz4pR8TYB/05/dOp84laq1MNnKzP566TIuh9CKxO7XrEY3kig2Oc5jVTdyhZwx/ezu Tgv6qu8bkqkK2LUsO+ABh/3itVjMw/evzlvX1sABKMDofVX/GRJqPAB0/dtg3cSZE+9o ryjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=amvEoN9e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga33si5233573ejc.237.2021.07.01.02.36.48; Thu, 01 Jul 2021 02:37:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=amvEoN9e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235344AbhGAJiR (ORCPT + 99 others); Thu, 1 Jul 2021 05:38:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235161AbhGAJiR (ORCPT ); Thu, 1 Jul 2021 05:38:17 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42B09C0617A8 for ; Thu, 1 Jul 2021 02:35:47 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id a14so3114636pls.4 for ; Thu, 01 Jul 2021 02:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RO+W36IfmCoOF5xjf8ZackNVFoRy6NygyQXZ/WJRofM=; b=amvEoN9eeC+VEBTD1Zaf1gJDs8BfXOLUFzr2bPmh3NDlpAr7wa6izhXSlUg6ufPnPw xpVRznI1jPWm2KBvbsXd7Q7OCmjgO2kQMEDYydzfgeaqkgAtuj7wrZX6yYvE1C2+9Rmh 9RuBcA30NcqbRWxeMrLMNgbsyj0U0du6rXT/GeMiiaSKmQpIk/c2/67CV5a227JD6bvp GNYEUUVNDqWr0b+d2E+FkjIjugfw9nDMeSay++s5zJw1Jr//gl/LBJxWfxQqyhaN0Aff GE/aMQfkKNuP1jEmO7fjQBdU2nmgjp2yOMxRwvsfClV6zH1EwrHpsdLbZTeC4m/xXMT1 RQng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RO+W36IfmCoOF5xjf8ZackNVFoRy6NygyQXZ/WJRofM=; b=kDGtTrvlJUkQusODyFXmfAm+7sIweXxBBSu5RvtUSjqGwnp4yc8BDVQLUDZW+Gyw8/ St4mbr/iLMlmjcxWgKkEM73Ch5MYUQHLKkh++s7z9714pSxqs612XHlWO1XnEF4TBiXG GWPr8wnmiC9bDgCtscwRCCy791O5C5gJFLKJo6L1B0yKC5P/5LzICrp4STpZMFsyTSpf XD9tKnB7NQ4vW19UiqbwPdl9Lfj7JnL1ctErYtqLMmh8RE4B6jiadT1L+SlgwXpwa+NS A3JzxeQ5MjtYuiVw7keJphMohY8NnPQDIAs2lJKeaUsVv0nsI2GJKq9uxGgInGXJltY0 dOUw== X-Gm-Message-State: AOAM531I6gET1hrxAgTMUxEMmiD2kh/ngTkoM/cfcNPYhra4P9lL3giq I3EINLx4iPoWJ9YP57CFZxFpXA== X-Received: by 2002:a17:902:7446:b029:128:ec77:b41e with SMTP id e6-20020a1709027446b0290128ec77b41emr14929267plt.80.1625132146445; Thu, 01 Jul 2021 02:35:46 -0700 (PDT) Received: from localhost ([202.131.71.237]) by smtp.gmail.com with ESMTPSA id q21sm9005717pjg.43.2021.07.01.02.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 02:35:45 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Daniel Kiss , Denis Nikitin Cc: Leo Yan Subject: [PATCH v2 0/3] coresight: Fix for snapshot mode Date: Thu, 1 Jul 2021 17:35:34 +0800 Message-Id: <20210701093537.90759-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series is to correct the pointer usages for the snapshot mode. Patch 01 is to polish code, it removes the redundant header maintained in tmc-etr driver and directly uses pointer perf_output_handle::head. Patch 02 removes the callback cs_etm_find_snapshot() which wrongly calculates the buffer headers; we can simply use the perf's common function __auxtrace_mmap__read() for headers calculation. Patch 03 is to update comments in CoreSight drivers to reflect the changes introduced by patch 02. This patch can be cleanly applied on the mainline kernel with: commit dbe69e433722 ("Merge tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") And it has been tested on Arm64 Juno board. Changes from v1: - Dropped the patch "coresight: etm-perf: Correct buffer syncing for snapshot", after a long discussion, the patch doesn't really resolve any issues for snapshot mode. And another reason for unlike this patch is now the CoreSight and Intel-PT have the consistent behaviour (Suzuki/James/Mathieu); - Added the patch 03 to updates drivers' comments (James); - Added Suzuki's review tag for patch 01; - Added James' review and testing tags for patch 02. Leo Yan (3): coresight: tmc-etr: Use perf_output_handle::head for AUX ring buffer perf cs-etm: Remove callback cs_etm_find_snapshot() coresight: Update comments for removing cs_etm_find_snapshot() drivers/hwtracing/coresight/coresight-etb10.c | 2 +- .../hwtracing/coresight/coresight-tmc-etf.c | 2 +- .../hwtracing/coresight/coresight-tmc-etr.c | 12 +- tools/perf/arch/arm/util/cs-etm.c | 133 ------------------ 4 files changed, 6 insertions(+), 143 deletions(-) -- 2.25.1