Skip to content

Commit 5edb97c

Browse files
serhiy-katsyuba-intelabonislawski
authored andcommitted
idc: Make IDC timeout value configurable
It may be beneficial to have different timeout values for fast platforms (manufactured silicon) and at least 10 times slower FPGA platforms. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
1 parent 2cdf3e8 commit 5edb97c

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

posix/include/rtos/idc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
/** \brief IDC send core power down flag. */
3535
#define IDC_POWER_DOWN 3
3636

37-
/** \brief IDC send timeout in microseconds. */
38-
#define IDC_TIMEOUT 10000
39-
4037
/** \brief IDC task deadline. */
4138
#define IDC_DEADLINE 100
4239

src/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ rsource "samples/Kconfig"
1717
rsource "schedule/Kconfig"
1818
rsource "schedule/Kconfig.threads_prio"
1919

20+
rsource "idc/Kconfig"
21+
2022
rsource "ipc/Kconfig"
2123

2224
rsource "math/Kconfig"

src/idc/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
config IDC_TIMEOUT_US
4+
int "Timeout for blocking IDC call, microseconds"
5+
default 10000
6+
help
7+
It may be beneficial to have different timeout values
8+
for fast platforms (manufactured silicon) and at least
9+
10 times slower FPGA platforms.

src/idc/zephyr_idc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
165165

166166
switch (mode) {
167167
case IDC_BLOCKING:
168-
ret = k_p4wq_wait(work, K_USEC(IDC_TIMEOUT));
168+
ret = k_p4wq_wait(work, K_USEC(CONFIG_IDC_TIMEOUT_US));
169169
if (!ret)
170170
/* message was sent and executed successfully, get status code */
171171
ret = idc_msg_status_get(msg->core);

zephyr/include/rtos/idc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
/** \brief IDC send core power down flag. */
3535
#define IDC_POWER_DOWN 3
3636

37-
/** \brief IDC send timeout in microseconds. */
38-
#define IDC_TIMEOUT 10000
39-
4037
/** \brief IDC task deadline. */
4138
#define IDC_DEADLINE 100
4239

0 commit comments

Comments
 (0)