From ab545efddcdbf5d08ad3b1e8f4ea15a0faf168a7 Mon Sep 17 00:00:00 2001 From: Tamas Ban Date: Mon, 3 Oct 2022 15:34:02 +0200 Subject: [PATCH] fix(rss): fix build issues with comms protocol Signed-off-by: Tamas Ban Change-Id: I77d2d3c5ac39a840b768f84f859d76b3965749aa --- drivers/arm/rss/rss_comms.c | 8 ++++---- drivers/arm/rss/rss_comms_protocol.c | 1 + drivers/arm/rss/rss_comms_protocol_embed.c | 2 +- drivers/arm/rss/rss_comms_protocol_pointer_access.c | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/arm/rss/rss_comms.c b/drivers/arm/rss/rss_comms.c index 0633c61b1..a1f5daa5a 100644 --- a/drivers/arm/rss/rss_comms.c +++ b/drivers/arm/rss/rss_comms.c @@ -70,6 +70,10 @@ static uint8_t select_protocol_version(const psa_invec *in_vec, size_t in_len, psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec, size_t in_len, psa_outvec *out_vec, size_t out_len) { + /* Declared statically to avoid using huge amounts of stack space. Maybe revisit if + * functions not being reentrant becomes a problem. + */ + static union rss_comms_io_buffer_t io_buf; enum mhu_error_t err; psa_status_t status; static uint8_t seq_num = 1U; @@ -77,10 +81,6 @@ psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec size_t reply_size = sizeof(io_buf.reply); psa_status_t return_val; size_t idx; - /* Declared statically to avoid using huge amounts of stack space. Maybe revisit if - * functions not being reentrant becomes a problem. - */ - static union rss_comms_io_buffer_t io_buf; if (type > INT16_MAX || type < INT16_MIN || in_len > PSA_MAX_IOVEC || out_len > PSA_MAX_IOVEC) { diff --git a/drivers/arm/rss/rss_comms_protocol.c b/drivers/arm/rss/rss_comms_protocol.c index 4b3de54e8..a8d1dda1a 100644 --- a/drivers/arm/rss/rss_comms_protocol.c +++ b/drivers/arm/rss/rss_comms_protocol.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * */ +#include #include #include "rss_comms_protocol.h" diff --git a/drivers/arm/rss/rss_comms_protocol_embed.c b/drivers/arm/rss/rss_comms_protocol_embed.c index fc348d2b5..d21734013 100644 --- a/drivers/arm/rss/rss_comms_protocol_embed.c +++ b/drivers/arm/rss/rss_comms_protocol_embed.c @@ -5,7 +5,7 @@ * */ - +#include #include #include diff --git a/drivers/arm/rss/rss_comms_protocol_pointer_access.c b/drivers/arm/rss/rss_comms_protocol_pointer_access.c index 4eed960aa..55c2675a1 100644 --- a/drivers/arm/rss/rss_comms_protocol_pointer_access.c +++ b/drivers/arm/rss/rss_comms_protocol_pointer_access.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * */ +#include #include "rss_comms_protocol_pointer_access.h"