Loading drivers/soc/qcom/hab/Makefile +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 \ Loading drivers/soc/qcom/hab/hab.c +13 −0 Original line number Diff line number Diff line Loading @@ -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__,\ Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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 Loading drivers/soc/qcom/hab/hab.h +1 −0 Original line number Diff line number Diff line Loading @@ -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[]; }; Loading drivers/soc/qcom/hab/hab_msg.c +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" Loading Loading @@ -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; } Loading drivers/soc/qcom/hab/hab_os.h +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 Loading Loading @@ -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 Loading
drivers/soc/qcom/hab/Makefile +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 \ Loading
drivers/soc/qcom/hab/hab.c +13 −0 Original line number Diff line number Diff line Loading @@ -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__,\ Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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 Loading
drivers/soc/qcom/hab/hab.h +1 −0 Original line number Diff line number Diff line Loading @@ -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[]; }; Loading
drivers/soc/qcom/hab/hab_msg.c +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" Loading Loading @@ -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; } Loading
drivers/soc/qcom/hab/hab_os.h +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 Loading Loading @@ -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