From patchwork Tue Aug 20 19:41:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 11104559 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9F7E1395 for ; Tue, 20 Aug 2019 19:42:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B76E7214DA for ; Tue, 20 Aug 2019 19:42:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I1mPRh2e"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uUqgHilO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B76E7214DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xsnp23UK5wxX+XgODq+9r5T62eJRDWTaVjCzdO2FqAk=; b=I1mPRh2ePYwVz1VrcbiL68k6JK DocRZqRWYRAn6+CsDPVcsy66lip4imHhnDa8E1YsbxcnNc2w9zqkFFK7xyw6GvPmOMjUthx8Bb3FG Oj9Jb6VdK+GSP506MPtzeyKLQffQA0RZ38If6Sh/EJB5oLoI6bkH3VQj9rINIgsj3aYGNXaNP8vzP vGAwfELj8ROBQ2Q/3udgtNrJuai9fnk2wnDtMHKAFpaw0AdDuqXR8J30YhKo7xldiFw66ffIRBl5q pJj5AAHjEAfbEJgVAL6DNObwL/M/ThA7Zy7JtcobRETgpvLYMG4sr7jXfmQ2q9jiFyPiG9YmjadbW vLhoXbYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0A1B-0001fg-7p; Tue, 20 Aug 2019 19:42:09 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0A10-0001WL-8r for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 19:42:01 +0000 Received: by mail-pg1-x543.google.com with SMTP id n190so3815390pgn.0 for ; Tue, 20 Aug 2019 12:41:57 -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:in-reply-to:references; bh=cFBvkKuuWi+HbO9KOXgKTQ8unSsFnD1762JFz5no288=; b=uUqgHilOys4BTdd9LsMBIxX9/2ItVA4ZjN4bVuQf7z5nZM9afZb6SDXcohY/R8FZMr PTh7w21Hn2UCvCsrQhexORxx4cy9+qz5oVzZRR/wPk4AKZaomRxiAcafU7iFY+0LCocT oyyjqsWrZ+1kA4v9k2YY2ZOabL58sEZtTj45ePwm+rLVaNPRpSWaucdxAxkzrasvIUzZ JlMG6MoHqaY0A46w/6uuPOH2GQIcwU/W/n7BFMoyKoGZT87RU4FySlMplbC/IbOETUnR XII1Ht8tDY1XwO5R68HKilj26zpbLDedZcdmM7aoa3xieRp7u5YT5Afe/yBsMP3iNS8S XGDg== 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:in-reply-to :references; bh=cFBvkKuuWi+HbO9KOXgKTQ8unSsFnD1762JFz5no288=; b=lw0BhkB8Kz1frixViTFd4if5DYS9thqi/OrLYYqKpOE4tNaL5Lcrr0TPI6pPHsNj2U ODkIC3TkvDjAzM7s1NEzpLFuOlZN1ueGxYb5dT1ofUI42r7rZdh9oAI846xwHleBljJk 1bkt6r1iv28lrnHB7t1vH/ov/pTzPwqMyabv8MDDqYLO4NYT6M05n9fERkStY+trG5JA TaPkWbtyBbo2bGADjmXobfPrkn4fijTghXU7eaYF0fqP3JtnHaICSxPjpfYJQ4b0v+wv Pt/WCujGDR2WYPHVVa9H/3kTA+mKO+whIJ/Qmv62IaQt6Tug+gHXGXpdKXD6QnVVdqF9 00ew== X-Gm-Message-State: APjAAAUiEnl7jT6n76gygA3ITFnKucVZlffw7QDVRLP74ykDudlwt050 7/C4cvh0aobHQgr/iXiAw/k4dA== X-Google-Smtp-Source: APXvYqwPsX6r1Oz1U56tUe+kiFPrLJw/Tqp1XtWTkhMiKnFW8epZQZmJct4uTfgPF3ZTiq34uueJEA== X-Received: by 2002:aa7:8a92:: with SMTP id a18mr32234207pfc.216.1566330117377; Tue, 20 Aug 2019 12:41:57 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id a15sm24220671pfg.102.2019.08.20.12.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 12:41:56 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 1/2] coresight: tmc-etr: Fix updating buffer in not-snapshot mode Date: Tue, 20 Aug 2019 13:41:54 -0600 Message-Id: <20190820194155.28992-2-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820194155.28992-1-mathieu.poirier@linaro.org> References: <20190820194155.28992-1-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_124158_308099_5AA10D87 X-CRM114-Status: GOOD ( 14.23 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:543 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Yabin Cui TMC etr always copies all available data to perf aux buffer, which may exceed the available space in perf aux buffer. It isn't suitable for not-snapshot mode, because: 1) It may overwrite previously written data. 2) It may make the perf_event_mmap_page->aux_head report having more or less data than the reality. So change to only copy the latest data fitting the available space in perf aux buffer. Signed-off-by: Yabin Cui Signed-off-by: Mathieu Poirier --- .../hwtracing/coresight/coresight-tmc-etr.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 17006705287a..676dcb4cf0e2 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -1410,9 +1410,10 @@ static void tmc_free_etr_buffer(void *config) * tmc_etr_sync_perf_buffer: Copy the actual trace data from the hardware * buffer to the perf ring buffer. */ -static void tmc_etr_sync_perf_buffer(struct etr_perf_buffer *etr_perf) +static void tmc_etr_sync_perf_buffer(struct etr_perf_buffer *etr_perf, + unsigned long to_copy) { - long bytes, to_copy; + long bytes; long pg_idx, pg_offset, src_offset; unsigned long head = etr_perf->head; char **dst_pages, *src_buf; @@ -1422,8 +1423,7 @@ static void tmc_etr_sync_perf_buffer(struct etr_perf_buffer *etr_perf) pg_idx = head >> PAGE_SHIFT; pg_offset = head & (PAGE_SIZE - 1); dst_pages = (char **)etr_perf->pages; - src_offset = etr_buf->offset; - to_copy = etr_buf->len; + src_offset = etr_buf->offset + etr_buf->len - to_copy; while (to_copy > 0) { /* @@ -1434,6 +1434,8 @@ static void tmc_etr_sync_perf_buffer(struct etr_perf_buffer *etr_perf) * 3) what is available in the destination page. * in one iteration. */ + if (src_offset >= etr_buf->size) + src_offset -= etr_buf->size; bytes = tmc_etr_buf_get_data(etr_buf, src_offset, to_copy, &src_buf); if (WARN_ON_ONCE(bytes <= 0)) @@ -1454,8 +1456,6 @@ static void tmc_etr_sync_perf_buffer(struct etr_perf_buffer *etr_perf) /* Move source pointers */ src_offset += bytes; - if (src_offset >= etr_buf->size) - src_offset -= etr_buf->size; } } @@ -1501,7 +1501,11 @@ tmc_update_etr_buffer(struct coresight_device *csdev, spin_unlock_irqrestore(&drvdata->spinlock, flags); size = etr_buf->len; - tmc_etr_sync_perf_buffer(etr_perf); + if (!etr_perf->snapshot && size > handle->size) { + size = handle->size; + lost = true; + } + tmc_etr_sync_perf_buffer(etr_perf, size); /* * In snapshot mode we simply increment the head by the number of byte From patchwork Tue Aug 20 19:41:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 11104561 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4058C1395 for ; Tue, 20 Aug 2019 19:42:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C921214DA for ; Tue, 20 Aug 2019 19:42:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LvG0fwcA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kEtWLlqT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C921214DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9mUUehZuNsBhgHtn7rXHPGVjsj1klNrzchdxU7yhz3Q=; b=LvG0fwcAj7PJYcwyUB2WxUCoB5 SGweMH8Ew31zubaUECXGbjozh4YP/ZpfzBkb+cqe5IQ+Sf5IxikuvhQZAmsHrwFtYnKSj6vk4u7nq SeQ271aFW5WIhRTPlnZOC1qst/tpD6IkqN00ww5HsTjqAf40DYrcEWquXIbzz31dSkF2J+wXpnGLi Uz4SUPUyTjU9T8dt6QjWNCjoXSTMcEWEDi7GA9idRfew4fFZRMxTfZQv2z+6sFvQ349famKlMF0e+ Vijk+YWWUzkOMpItWgz4NVTb2w8JBPpLApVn5bscJxdK+6JantdjzSxmVf15Yd7GjOHqpnI/CiUEi 7d0GPzAw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0A1P-0001vq-Mp; Tue, 20 Aug 2019 19:42:23 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0A10-0001Wm-V0 for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 19:42:01 +0000 Received: by mail-pl1-x642.google.com with SMTP id m12so3267157plt.5 for ; Tue, 20 Aug 2019 12:41:58 -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:in-reply-to:references; bh=0zWt+atQCn2xJd+kBaCM7Pjw308MWDB+oM6Ofw8NC18=; b=kEtWLlqTplXU+oSwZ9A8IjXR6BZnLMwvb5ceUgGsLkJ7LUWVxu/FVB2W319CdSNoEH xsiWo0IaeZ2uXyfns4MAtrzSQZEUnR3xmQBCPe0hg0uyj15MGqwbR9VtfnKfM3MSjOT0 8FQnY6ZLxLhlXYhXCaX/gJhrUTPdvuBnhdJL2FyOPn6iBMbKZYUYnbJLJqKDdu8ONcxF slXqnPQ7iPkTbOlTaEDsvUChFR8hN0tnBwEh7WrAcsI6CbXZdwQ+bLsdY942NlbnszOl dfXkTZmYjoFWKw+Faj+i9jPoFTaRIlaCTCRdp+FOcD4wqmI9zDz41v4gyZ9Ph+qXoTXx ACfQ== 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:in-reply-to :references; bh=0zWt+atQCn2xJd+kBaCM7Pjw308MWDB+oM6Ofw8NC18=; b=AauKCDDJ+I88R38gH6L1D0SUGlJA8vwW1KvgepxLrRFJ7VW11r8pS3NnT2xsn2P9/V 7hL3HJvDpqeISTrPZYuyZDO0Awlz/Ysvv74RFQ+kkJ9mkyyIDfhZLBZrAKvDrozsMW0D iOk1uChfWWZhLib+dJgPjaPVx32QLfXcrvISGKuP3R7uprhtzyMGFPdwXMG4NJVUMZ9d D9wjtKbh/HD7MVOGEItbPRNk/c6Y/Al/PL+pCjNYqDzzivTgj7tKe9Cf0gHNRldrw5r/ 4yDkujymdAe76MRgUn9aE/f3GkgncVgVqUhhyUou+GYya2km7s77dVA/KtlwkEsrDV4P NMjw== X-Gm-Message-State: APjAAAXR3XCFERfpTYAxDFYgUXvbw+EjyqS5wNGW7qeUFTErXu5NPuCM DXFeUyoEyQyf2iGU06i1MAj9OA== X-Google-Smtp-Source: APXvYqwtAl64imwqNAOppXm5k/9V2gGFxCP9Mhcpmy/r5h0/8+dqV6aex+/CQoU32i2S83BAoIM4wg== X-Received: by 2002:a17:902:be12:: with SMTP id r18mr28653758pls.341.1566330118320; Tue, 20 Aug 2019 12:41:58 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id a15sm24220671pfg.102.2019.08.20.12.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 12:41:57 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 2/2] coresight: tmc-etr: Fix perf_data check Date: Tue, 20 Aug 2019 13:41:55 -0600 Message-Id: <20190820194155.28992-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820194155.28992-1-mathieu.poirier@linaro.org> References: <20190820194155.28992-1-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_124158_992524_E77EBF28 X-CRM114-Status: GOOD ( 13.84 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Yabin Cui When tracing etm data of multiple threads on multiple cpus through perf interface, each cpu has a unique etr_perf_buffer while sharing the same etr device. There is no guarantee that the last cpu starts etm tracing also stops last. This makes perf_data check fail. Fix it by checking etr_buf instead of etr_perf_buffer. Also move the code setting and clearing perf_buf to more suitable places. Fixes: 3147da92a8a8 ("coresight: tmc-etr: Allocate and free ETR memory buffers for CPU-wide scenarios") Signed-off-by: Yabin Cui Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc-etr.c | 8 ++++---- drivers/hwtracing/coresight/coresight-tmc.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 676dcb4cf0e2..ba644f444d4c 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -1484,7 +1484,7 @@ tmc_update_etr_buffer(struct coresight_device *csdev, goto out; } - if (WARN_ON(drvdata->perf_data != etr_perf)) { + if (WARN_ON(drvdata->perf_buf != etr_buf)) { lost = true; spin_unlock_irqrestore(&drvdata->spinlock, flags); goto out; @@ -1496,8 +1496,6 @@ tmc_update_etr_buffer(struct coresight_device *csdev, tmc_sync_etr_buf(drvdata); CS_LOCK(drvdata->base); - /* Reset perf specific data */ - drvdata->perf_data = NULL; spin_unlock_irqrestore(&drvdata->spinlock, flags); size = etr_buf->len; @@ -1560,7 +1558,6 @@ static int tmc_enable_etr_sink_perf(struct coresight_device *csdev, void *data) } etr_perf->head = PERF_IDX2OFF(handle->head, etr_perf); - drvdata->perf_data = etr_perf; /* * No HW configuration is needed if the sink is already in @@ -1576,6 +1573,7 @@ static int tmc_enable_etr_sink_perf(struct coresight_device *csdev, void *data) /* Associate with monitored process. */ drvdata->pid = pid; drvdata->mode = CS_MODE_PERF; + drvdata->perf_buf = etr_perf->etr_buf; atomic_inc(csdev->refcnt); } @@ -1621,6 +1619,8 @@ static int tmc_disable_etr_sink(struct coresight_device *csdev) /* Dissociate from monitored process. */ drvdata->pid = -1; drvdata->mode = CS_MODE_DISABLED; + /* Reset perf specific data */ + drvdata->perf_buf = NULL; spin_unlock_irqrestore(&drvdata->spinlock, flags); diff --git a/drivers/hwtracing/coresight/coresight-tmc.h b/drivers/hwtracing/coresight/coresight-tmc.h index 1ed50411cc3c..f9a0c95e9ba2 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.h +++ b/drivers/hwtracing/coresight/coresight-tmc.h @@ -178,8 +178,8 @@ struct etr_buf { * device configuration register (DEVID) * @idr: Holds etr_bufs allocated for this ETR. * @idr_mutex: Access serialisation for idr. - * @perf_data: PERF buffer for ETR. - * @sysfs_data: SYSFS buffer for ETR. + * @sysfs_buf: SYSFS buffer for ETR. + * @perf_buf: PERF buffer for ETR. */ struct tmc_drvdata { void __iomem *base; @@ -202,7 +202,7 @@ struct tmc_drvdata { struct idr idr; struct mutex idr_mutex; struct etr_buf *sysfs_buf; - void *perf_data; + struct etr_buf *perf_buf; }; struct etr_buf_operations {