From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B0792C10F1A for ; Tue, 7 May 2024 05:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1Vu+HgJ7JdSzZIWp3Qhp5Bp3l4r9JE5s7NX8XLXhCbY=; b=VY1eJrKQiJNilo k7eeMLq13XSskWKhLcrWW+ZCih3kWZNNAlG96aDcv2/EonGt+ZUwR6vdZNHnBH3DBBVfP+EZtPj5E /flj70nva1XKEliOtNkmVEAB0EcZcX2u92BLRuMGvD6VcAbqnk1u+/O1bIP0eqiKlwXDqqq084Gl4 L9mFJ8qlWYm5h97F8q1rNoywAe7dp3qQVq9jeCDX2ptKiRQxaq763Sg3wYnlQGaMLrfgigH8sL4xy /gn4CZLiuAHmi09BmiIfdNU+3ZrHWy5GWEuOXxcIjR1eXiTst8ChneKUFF95CB0/hwMemsdalnW4F WFKIS7bPLAN647DSj1gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Dil-00000009jZy-3Ej3; Tue, 07 May 2024 05:50:35 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Dii-00000009jYv-3LTq for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 05:50:34 +0000 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 32A7F1042; Mon, 6 May 2024 22:50:56 -0700 (PDT) Received: from [10.163.37.41] (unknown [10.163.37.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 06D393F587; Mon, 6 May 2024 22:50:21 -0700 (PDT) Message-ID: Date: Tue, 7 May 2024 11:20:23 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/17] coresight: Move struct coresight_trace_id_map to common header Content-Language: en-US To: James Clark , 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: 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 References: <20240429152207.479221-1-james.clark@arm.com> <20240429152207.479221-11-james.clark@arm.com> From: Anshuman Khandual In-Reply-To: <20240429152207.479221-11-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_225033_120972_C3017D8E X-CRM114-Status: GOOD ( 21.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/29/24 20:51, James Clark wrote: > 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 Reviewed-by: Anshuman Khandual > --- > .../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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel