Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ab51689 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Coresight: stm: Non-add data header based on diag entity ID"

parents fa1e4986 237363b7
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/io.h>
#include <linux/io.h>
#include "coresight-ost.h"
#include "coresight-ost.h"
#include <linux/sched/clock.h>
#include <linux/sched/clock.h>
#include <linux/coresight-stm.h>


#define STM_USERSPACE_HEADER_SIZE	(8)
#define STM_USERSPACE_HEADER_SIZE	(8)
#define STM_USERSPACE_MAGIC1_VAL	(0xf0)
#define STM_USERSPACE_MAGIC1_VAL	(0xf0)
@@ -140,7 +141,7 @@ static int stm_trace_data_header(void __iomem *addr)
}
}


static int stm_trace_data(void __iomem *ch_addr, uint32_t flags,
static int stm_trace_data(void __iomem *ch_addr, uint32_t flags,
			  const void *data, uint32_t size)
			uint32_t entity_id, const void *data, uint32_t size)
{
{
	void __iomem *addr;
	void __iomem *addr;
	int len = 0;
	int len = 0;
@@ -149,8 +150,10 @@ static int stm_trace_data(void __iomem *ch_addr, uint32_t flags,
	addr = (void __iomem *)(ch_addr +
	addr = (void __iomem *)(ch_addr +
		stm_channel_off(STM_PKT_TYPE_DATA, flags));
		stm_channel_off(STM_PKT_TYPE_DATA, flags));


	/* send the data header */
	/* OST_ENTITY_DIAG no need to send the data header */
	if (entity_id != OST_ENTITY_DIAG)
		len += stm_trace_data_header(addr);
		len += stm_trace_data_header(addr);

	/* send the actual data */
	/* send the actual data */
	len += stm_ost_send(addr, data, size);
	len += stm_ost_send(addr, data, size);


@@ -196,7 +199,7 @@ static inline int __stm_trace(uint32_t flags, uint8_t entity_id,
				    proto_id);
				    proto_id);


	/* send the payload data */
	/* send the payload data */
	len += stm_trace_data(ch_addr, flags, data, size);
	len += stm_trace_data(ch_addr, flags, entity_id, data, size);


	/* send the ost tail */
	/* send the ost tail */
	len += stm_trace_ost_tail(ch_addr, flags);
	len += stm_trace_ost_tail(ch_addr, flags);