Skip to content

Commit 57b6b76

Browse files
coresight: moving struct cs_buffers to header file
That way we can re-use the structure in other drivers. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit a02e81f7a32b49f3cb70c5ebd2eab5608a088514)
1 parent 807aa8f commit 57b6b76

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

drivers/hwtracing/coresight/coresight-etb10.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,6 @@
7070
#define ETB_FFSR_BIT 1
7171
#define ETB_FRAME_SIZE_WORDS 4
7272

73-
/**
74-
* struct cs_buffer - keep track of a recording session' specifics
75-
* @cur: index of the current buffer
76-
* @nr_pages: max number of pages granted to us
77-
* @offset: offset within the current buffer
78-
* @data_size: how much we collected in this run
79-
* @lost: other than zero if we had a HW buffer wrap around
80-
* @snapshot: is this run in snapshot mode
81-
* @data_pages: a handle the ring buffer
82-
*/
83-
struct cs_buffers {
84-
unsigned int cur;
85-
unsigned int nr_pages;
86-
unsigned long offset;
87-
local_t data_size;
88-
local_t lost;
89-
bool snapshot;
90-
void **data_pages;
91-
};
92-
9373
/**
9474
* struct etb_drvdata - specifics associated to an ETB component
9575
* @base: memory mapped base address for this component.

drivers/hwtracing/coresight/coresight-priv.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@ enum cs_mode {
5353
CS_MODE_PERF,
5454
};
5555

56+
/**
57+
* struct cs_buffer - keep track of a recording session' specifics
58+
* @cur: index of the current buffer
59+
* @nr_pages: max number of pages granted to us
60+
* @offset: offset within the current buffer
61+
* @data_size: how much we collected in this run
62+
* @lost: other than zero if we had a HW buffer wrap around
63+
* @snapshot: is this run in snapshot mode
64+
* @data_pages: a handle the ring buffer
65+
*/
66+
struct cs_buffers {
67+
unsigned int cur;
68+
unsigned int nr_pages;
69+
unsigned long offset;
70+
local_t data_size;
71+
local_t lost;
72+
bool snapshot;
73+
void **data_pages;
74+
};
75+
5676
static inline void CS_LOCK(void __iomem *addr)
5777
{
5878
do {

0 commit comments

Comments
 (0)