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

Commit 284fe2e9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: hab: add HAB runtime profiling support"

parents b8731d09 eafdae80
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
CFLAGS_hab.o := -I$(src)

msm_hab-objs = \
	hab.o \
	hab_msg.o \
+13 −0
Original line number Diff line number Diff line
@@ -4,6 +4,9 @@
 */
#include "hab.h"

#define CREATE_TRACE_POINTS
#include "hab_trace_os.h"

#define HAB_DEVICE_CNSTR(__name__, __id__, __num__) { \
	.name = __name__,\
	.id = __id__,\
@@ -555,6 +558,9 @@ long hab_vchan_send(struct uhab_context *ctx,
		goto err;
	}

	/* log msg send timestamp: enter hab_vchan_send */
	trace_hab_vchan_send_start(vchan);

	HAB_HEADER_SET_SIZE(header, sizebytes);
	if (flags & HABMM_SOCKET_SEND_FLAGS_XING_VM_STAT) {
		HAB_HEADER_SET_TYPE(header, HAB_PAYLOAD_TYPE_PROFILE);
@@ -595,6 +601,10 @@ long hab_vchan_send(struct uhab_context *ctx,
	if (!ret)
		vchan->tx_cnt++;
err:

	/* log msg send timestamp: exit hab_vchan_send */
	trace_hab_vchan_send_done(vchan);

	if (vchan)
		hab_vchan_put(vchan);

@@ -638,6 +648,9 @@ int hab_vchan_recv(struct uhab_context *ctx,
		else if (ret == -ERESTARTSYS)
			ret = -EINTR;
	} else if (!ret) {
		/* log msg recv timestamp: exit hab_vchan_recv */
		trace_hab_vchan_recv_done(vchan, *message);

		/*
		 * Here, it is for sure that a message was received from the
		 * hab_vchan_recv()'s view w/ the ret as 0 and *message as
+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ struct hab_export_ack_recvd {
struct hab_message {
	struct list_head node;
	size_t sizebytes;
	uint32_t sequence_rx;
	uint32_t data[];
};

+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
 */
#include "hab.h"

@@ -34,6 +34,8 @@ hab_msg_alloc(struct physical_channel *pchan, size_t sizebytes)
	message->sizebytes =
		physical_channel_read(pchan, message->data, sizebytes);

	message->sequence_rx = pchan->sequence_rx;

	return message;
}

+2 −2
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
 */
#ifndef __HAB_OS_H
#define __HAB_OS_H
@@ -41,7 +41,7 @@
#include <linux/version.h>
#include <linux/devcoredump.h>

#ifdef CONFIG_MSM_BOOT_STATS
#if IS_ENABLED(CONFIG_MSM_BOOT_TIME_MARKER)
#include <soc/qcom/boot_stats.h>
#else
static inline unsigned long long msm_timer_get_sclk_ticks(void)
Loading