Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wiseconnect: Use static allocation for threads #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArunmaniAlagarsamy2710
Copy link
Contributor

@ArunmaniAlagarsamy2710 ArunmaniAlagarsamy2710 commented Mar 20, 2025

Allocate stack memory and control blocks statically for bus thread and event thread instead of dynamically. This change addresses a known issue in Zephyr related to dynamic allocation of stack and control blocks.

@jhedberg
Copy link
Member

Is this copied from upstream wiseconnect files, or it's a modification to them? If it's copied, then it'd be good to mention exactly which version. If it's a modification, then we might want something similar to what we do with additional patches to SiSDK:https://github.com/zephyrproject-rtos/hal_silabs/blob/main/scripts/patch_simplicity_sdk.sh

@jerome-pouiller
Copy link
Collaborator

Is this copied from upstream wiseconnect files, or it's a modification to them?

It is a modification. The upstream may be changed to avoid this patch, but it can't be applied as-is. That's said, maybe we could consider the adoption of the Upstream-Status: trailer.

[...] something similar to what we do with additional patches to SiSDK

For wiseconnect, we have a stack of patches to apply. So we cherry-pick all the patches each time we update wiseconnect. Automation of this task is on my TODO list.

@jerome-pouiller
Copy link
Collaborator

@ArunmaniAlagarsamy2710, if you want to write a great commit log, try to explain why you think this patch should be applied:

Zephyr CMSIS implementation has some limitations with dynamically allocated
resources[1].

This patch allocates the CMSIS resources statically. Thus:
  - this allows to workaround the limitation of the current CMSIS implementation
    until we fix them properly
  - it is possible to get rid of the dependencies to
    CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT and CMSIS_V2_THREAD_MAX_COUNT.

[1]: https://github.com/zephyrproject-rtos/zephyr/pull/85557

Zephyr CMSIS implementation has some limitations with dynamically allocated
resources[1].

This patch allocates the CMSIS resources statically. Thus:
  - this allows to workaround the limitation of the current CMSIS implementation
    until we fix them properly
  - it is possible to get rid of the dependencies to
    CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT and CMSIS_V2_THREAD_MAX_COUNT.

[1]: zephyrproject-rtos/zephyr#85557

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants