rt-thread/components
Shell 2f6d98bfcb feat: smp_call: added signaling call_req
This patch introduces `rt_smp_call_request` API to handle queued
requests across cores with user provided data buffer, which provides a
way to request IPI through a non-blocking pattern.

It also resolved several issues in the old implementation:
- Multiple requests from different cores can not be queued in the work
  object of the target core.
- Data racing on `rt_smp_work` of same core. If multiple requests came
  in turns, or if the call is used by the target cpu, while a new
  request is coming, the value will be overwrite.
- Memory vulnerability. The rt_smp_event is allocated on stack, though
  the caller may not wait until the call is done.
- API naming problem. Actually we don't provide a way to issue an IPI to
  ANY core in mask. What the API do is aligned to MANY pattern.
- FUNC_IPI registering to PIC.

Changes:
- Declared and configured the new `RT_SMP_CALL_IPI` to support
  functional IPIs for task requests across cores.
- Replaced the single `rt_smp_work` array with `call_req_cores` to
  manage per-core call requests safely.
- Added `_call_req_take` and `_call_req_release` functions for atomic
  handling of request lifetimes, preventing data race conditions.
- Replaced single event handling with a queue-based approach
  (`call_queue`) for efficient multi-request processing per core.
- Introduced `rt_smp_call_ipi_handler` to process queued requests,
  reducing IPI contention by only sending new requests when needed.
- Implemented `_smp_call_remote_request` to handle remote requests
  with specific flags, enabling more flexible core-to-core task
  signaling.
- Refined `rt_smp_call_req_init` to initialize and track requests
  with atomic usage flags, mitigating potential memory vulnerabilities.

Signed-off-by: Shell <smokewood@qq.com>
2024-11-03 10:08:45 +08:00
..
dfs [components][dfs][dfs_v1]cat输出实际读取的长度 2024-10-10 17:44:32 -04:00
drivers feat: smp_call: added signaling call_req 2024-11-03 10:08:45 +08:00
fal [drivers] Specifies the name of the drivers driver file 2024-09-13 17:40:40 -04:00
finsh [components] change variable name 2024-09-24 20:04:57 -04:00
legacy [components][drivers]legacy fdt (#9062) 2024-06-19 19:48:35 +08:00
libc [libc] modify function names to resolve naming conflicts 2024-11-01 18:44:16 -04:00
lwp [libc] modify function names to resolve naming conflicts 2024-11-01 18:44:16 -04:00
mm feat: support ARCH_REMAP_KERNEL on libcpu/c906 (#9123) 2024-07-11 11:00:04 +08:00
mprotect 实现MPU抽象层 (#8080) 2023-10-30 08:24:55 -04:00
net [components][sal]add netdev ifindex feature 2024-10-11 00:10:21 -04:00
utilities [Bug] [ymodem] last frame's data_sz issue, fixed. 2024-10-07 23:13:41 -04:00
vbus 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
Kconfig 除了bsp之外的Kconfig使用rsource替代source 2024-06-20 14:40:42 +08:00
SConscript [components] 移除对老版本bsp的lwip版本默认选定 2021-06-28 15:33:14 +08:00