Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1445155lqa; Mon, 29 Apr 2024 08:37:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1HfCtIOPovZZ8zhZ/gfcD7Qa0AUz+tooyi466hSLeY2nLU3DxsQLaAAqJLtRLfUXFU4q5fF9P3NSuEEYD+YHWfjVWwwSV+dZzNTsIjA== X-Google-Smtp-Source: AGHT+IF2eHozJHWs1KzpKNV30WP9COTUtvSSvHgiXKmZPrh8KsknjdtmY/O8krp6mgLvn22wTsN8 X-Received: by 2002:aa7:dcc8:0:b0:572:67d9:6c3b with SMTP id w8-20020aa7dcc8000000b0057267d96c3bmr6169500edu.26.1714405065312; Mon, 29 Apr 2024 08:37:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714405065; cv=pass; d=google.com; s=arc-20160816; b=Gq6U4+3P3iBxTczQaxGR/PB55u3iAXTQ1UsjcjaBVp5CGLN6gdzaylDQnKfB5+q+RW t/FmZt5Rqipxiqq2ZhaPV5NovXzsoIrr6ljMJcGbSWjZZNq4l5tIFH/vDFpHQe/4x80h d55V8ZyRgAEoZI6NLZ1dO+t+fbZ4nbp+JXORoSVRoJPRy/haRVMxVS0EZCH/MXveZ3cy VH4UXVuQ2gz4JxdqtKVly5SOHMgkDyN+wXLPQoB2+f/RAGqlALwCmjt7jUjOQSx+irpB n5T0sf0FJOA52CYB7gXUXKFFoHlbXUsm6fXpF6MvkLOGD8QgWXsP9FtbhbZLNrvbFnFs ErCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=mrCUHiABfXtiO/ntr34y1ys0+RNNuMDcw1m0WkiPrDA=; fh=eTkjUs/l3a9lPpUjmicKO4brnHa0D6Qg87n5LIjfzgo=; b=RM9cbvF6VgP4dNIgoaXDacrnDE2nDOMAr87iWtfVMEsyJ/9H0TCfqgu8HZ0AsgL4IM pta8QoXVmpnTNjJkcENU5QorYOQ4w/vp6pyQpVN2KfKmkqz9B7unzW4MRdNiEvce/D5b lOiiBxy0ku4XQgxkUdRIsSzVgKAG/lRnanIDw2HdGd7NT9og9f90GdNfcve1fnwBflBf hssfbCCV0coGu1s6W4ApQNMEJPm+d19cg2zxiV3SfWa7raZBItRDdCnVx4X91xiKy/aT yqb+cySeMgn2f8G1BAej0n/4aOzmGLAL2+acW69rpdwrKmnngJcPkfWgGyVDFy31SKv7 +WdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-162578-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162578-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f25-20020a50d559000000b005720da3ad63si9925759edj.111.2024.04.29.08.37.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162578-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-162578-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162578-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EF27C1F22A71 for ; Mon, 29 Apr 2024 15:27:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E552486130; Mon, 29 Apr 2024 15:25:00 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D82EE81724; Mon, 29 Apr 2024 15:24:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714404300; cv=none; b=Uw4XpmLnYCrZ/qF6e1XD8J4i/ccmYC+UwNHuppajMX0gT7EP5WIgSPh7t4jwwlAcjVNaF4bMV7/611hEnnWxy7DXUrIEyyVK8+yTVTN/GlTB6DFc+PMHmKCurZu67cZ4gJSgkrBDC5dqpc+wAy3PTL2tUSLhMpo2w2UCFApHsSk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714404300; c=relaxed/simple; bh=2/laGzvhrGTaJdQYfLZNNM255UZAAgXMGfXUPtR3Vos=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FwsxyqvvhdDB7AWq1CSr+DKlEOq3H23r4mpidhRcRCl9toP0rpDmRPfBtCFS2tJTYaufifvbcKv7sdW59kr2DgYVJqHVoTYwARkpBcA/jMZwjfzLr8I7fUppTaHNE5YaO17kPEHPJ2Ss2uA8X+YHvzxm93SRmq4zt81OBT360Cg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 217E22F4; Mon, 29 Apr 2024 08:25:25 -0700 (PDT) Received: from e127643.broadband (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 530C03F793; Mon, 29 Apr 2024 08:24:55 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, gankulkarni@os.amperecomputing.com, scclevenger@os.amperecomputing.com, coresight@lists.linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org Cc: James Clark , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 10/17] coresight: Move struct coresight_trace_id_map to common header Date: Mon, 29 Apr 2024 16:21:55 +0100 Message-Id: <20240429152207.479221-11-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240429152207.479221-1-james.clark@arm.com> References: <20240429152207.479221-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The trace ID maps will need to be created and stored by the core and Perf code so move the definition up to the common header. Signed-off-by: James Clark --- .../hwtracing/coresight/coresight-trace-id.c | 1 + .../hwtracing/coresight/coresight-trace-id.h | 19 ------------------- include/linux/coresight.h | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-trace-id.c b/drivers/hwtracing/coresight/coresight-trace-id.c index af5b4ef59cea..19005b5b4dc4 100644 --- a/drivers/hwtracing/coresight/coresight-trace-id.c +++ b/drivers/hwtracing/coresight/coresight-trace-id.c @@ -3,6 +3,7 @@ * Copyright (c) 2022, Linaro Limited, All rights reserved. * Author: Mike Leach */ +#include #include #include #include diff --git a/drivers/hwtracing/coresight/coresight-trace-id.h b/drivers/hwtracing/coresight/coresight-trace-id.h index 3797777d367e..49438a96fcc6 100644 --- a/drivers/hwtracing/coresight/coresight-trace-id.h +++ b/drivers/hwtracing/coresight/coresight-trace-id.h @@ -32,10 +32,6 @@ #include #include - -/* architecturally we have 128 IDs some of which are reserved */ -#define CORESIGHT_TRACE_IDS_MAX 128 - /* ID 0 is reserved */ #define CORESIGHT_TRACE_ID_RES_0 0 @@ -46,21 +42,6 @@ #define IS_VALID_CS_TRACE_ID(id) \ ((id > CORESIGHT_TRACE_ID_RES_0) && (id < CORESIGHT_TRACE_ID_RES_TOP)) -/** - * Trace ID map. - * - * @used_ids: Bitmap to register available (bit = 0) and in use (bit = 1) IDs. - * Initialised so that the reserved IDs are permanently marked as - * in use. - * @pend_rel_ids: CPU IDs that have been released by the trace source but not - * yet marked as available, to allow re-allocation to the same - * CPU during a perf session. - */ -struct coresight_trace_id_map { - DECLARE_BITMAP(used_ids, CORESIGHT_TRACE_IDS_MAX); - DECLARE_BITMAP(pend_rel_ids, CORESIGHT_TRACE_IDS_MAX); -}; - /* Allocate and release IDs for a single default trace ID map */ /** diff --git a/include/linux/coresight.h b/include/linux/coresight.h index f09ace92176e..c16c61a8411d 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -218,6 +218,24 @@ struct coresight_sysfs_link { const char *target_name; }; +/* architecturally we have 128 IDs some of which are reserved */ +#define CORESIGHT_TRACE_IDS_MAX 128 + +/** + * Trace ID map. + * + * @used_ids: Bitmap to register available (bit = 0) and in use (bit = 1) IDs. + * Initialised so that the reserved IDs are permanently marked as + * in use. + * @pend_rel_ids: CPU IDs that have been released by the trace source but not + * yet marked as available, to allow re-allocation to the same + * CPU during a perf session. + */ +struct coresight_trace_id_map { + DECLARE_BITMAP(used_ids, CORESIGHT_TRACE_IDS_MAX); + DECLARE_BITMAP(pend_rel_ids, CORESIGHT_TRACE_IDS_MAX); +}; + /** * struct coresight_device - representation of a device as used by the framework * @pdata: Platform data with device connections associated to this device. -- 2.34.1