Skip to content

Commit acb0184

Browse files
James-A-ClarkSuzuki K Poulose
authored andcommitted
coresight: Move struct coresight_trace_id_map to common header
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. Reviewed-by: Anshuman Khandual <[email protected]> Reviewed-by: Mike Leach <[email protected]> Signed-off-by: James Clark <[email protected]> Tested-by: Leo Yan <[email protected]> Tested-by: Ganapatrao Kulkarni <[email protected]> Signed-off-by: James Clark <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent eda1d11 commit acb0184

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

drivers/hwtracing/coresight/coresight-trace-id.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (c) 2022, Linaro Limited, All rights reserved.
44
* Author: Mike Leach <[email protected]>
55
*/
6+
#include <linux/coresight.h>
67
#include <linux/coresight-pmu.h>
78
#include <linux/cpumask.h>
89
#include <linux/kernel.h>

drivers/hwtracing/coresight/coresight-trace-id.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
#include <linux/bitops.h>
3333
#include <linux/types.h>
3434

35-
36-
/* architecturally we have 128 IDs some of which are reserved */
37-
#define CORESIGHT_TRACE_IDS_MAX 128
38-
3935
/* ID 0 is reserved */
4036
#define CORESIGHT_TRACE_ID_RES_0 0
4137

@@ -46,21 +42,6 @@
4642
#define IS_VALID_CS_TRACE_ID(id) \
4743
((id > CORESIGHT_TRACE_ID_RES_0) && (id < CORESIGHT_TRACE_ID_RES_TOP))
4844

49-
/**
50-
* Trace ID map.
51-
*
52-
* @used_ids: Bitmap to register available (bit = 0) and in use (bit = 1) IDs.
53-
* Initialised so that the reserved IDs are permanently marked as
54-
* in use.
55-
* @pend_rel_ids: CPU IDs that have been released by the trace source but not
56-
* yet marked as available, to allow re-allocation to the same
57-
* CPU during a perf session.
58-
*/
59-
struct coresight_trace_id_map {
60-
DECLARE_BITMAP(used_ids, CORESIGHT_TRACE_IDS_MAX);
61-
DECLARE_BITMAP(pend_rel_ids, CORESIGHT_TRACE_IDS_MAX);
62-
};
63-
6445
/* Allocate and release IDs for a single default trace ID map */
6546

6647
/**

include/linux/coresight.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,24 @@ struct coresight_sysfs_link {
218218
const char *target_name;
219219
};
220220

221+
/* architecturally we have 128 IDs some of which are reserved */
222+
#define CORESIGHT_TRACE_IDS_MAX 128
223+
224+
/**
225+
* Trace ID map.
226+
*
227+
* @used_ids: Bitmap to register available (bit = 0) and in use (bit = 1) IDs.
228+
* Initialised so that the reserved IDs are permanently marked as
229+
* in use.
230+
* @pend_rel_ids: CPU IDs that have been released by the trace source but not
231+
* yet marked as available, to allow re-allocation to the same
232+
* CPU during a perf session.
233+
*/
234+
struct coresight_trace_id_map {
235+
DECLARE_BITMAP(used_ids, CORESIGHT_TRACE_IDS_MAX);
236+
DECLARE_BITMAP(pend_rel_ids, CORESIGHT_TRACE_IDS_MAX);
237+
};
238+
221239
/**
222240
* struct coresight_device - representation of a device as used by the framework
223241
* @pdata: Platform data with device connections associated to this device.

0 commit comments

Comments
 (0)