Commit Graph

55280 Commits

Author SHA1 Message Date
Michal Lenc 939c10ea34 fs_truncate: provide inotify call for truncate
IN_MODIFY event should occur on file modification, which includes
truncate. This is consistent with the inotify usage on Linux.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-10-08 08:14:19 +08:00
raiden00pl c1c5d8d611 arch/arm/stm32{|f7}/socketcan: fix debugassert for extid frames
fix debugassert for extid frames, we have to remove
CAN_EFF_FLAG bit from the expression
2024-10-08 08:14:07 +08:00
Philippe Leduc d186c1cedb Enable C++ toolchain and cxxtest app on xmc4800-relax:nsh config 2024-10-08 08:13:42 +08:00
Philippe Leduc 80e578c9aa Fix ctypes.h locale macro 2024-10-08 08:13:42 +08:00
hujun5 31a3cea64a arch: rename xxxx_pause.c to xxxx_smpcall.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
hujun5 d8cb7759b6 arch: remove up_cpu_pause up_cpu_resume up_cpu_paused up_cpu_pausereq
reason:
  To remove the "sync pause" and decouple the critical section from the dependency on enabling interrupts,
  after that we need to further implement "schedlock + spinlock".
changelist
  1 Modify the implementation of critical sections to no longer involve enabling interrupts or handling synchronous pause events.
  2 GIC_SMP_CPUCALL attach to pause handler to remove arch interface up_cpu_paused_restore up_cpu_paused_save
  3 Completely remove up_cpu_pause, up_cpu_resume, up_cpu_paused, and up_cpu_pausereq
  4 change up_cpu_pause_async to up_send_cpu_sgi

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
hujun5 fc22fb8f53 xtensa: Replace the implementation of up_cpu_pause
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
Almir Okato 2d2f4055c4 riscv/esp32c6: fix rtc text section and wifi ram placement
Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-10-07 22:39:20 +08:00
Xiang Xiao f838987e44 fs/romfs: Call block_operations::close when romfs_bind fail
to avoid the resource leak

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-07 21:10:07 +08:00
Bowen Wang 79be76a22c serial/uart_rpmsg: should init the lock before call rpmsg_register_callback
To avoid init the lock after this lock has been used.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-07 20:42:44 +08:00
Bowen Wang 262ccbb068 drivers/uart_rpmsg: add recv lock when received the data from peer
The recv buffer is used both in user thread and rpmsg ept->callback
thread, so add recv lock to protect the recv buffer.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-07 20:42:44 +08:00
yintao a1dc6dc7fc driver/uart_rpmsg: clear transmit buffer when remote exception occurred
Make uart rpmsg work normally when restart the remote core

Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-07 20:42:44 +08:00
ligd b3727f67be esp32: fix esp32 wifi bug caused scan failed
tools/configure.sh esp32c3-generic:wifi
wapi scan wlan0
has no return result after couple times

rootcause:
mq_timedsend() return failed because the time valid check error.
the ts_nsec is bigger than 1000000000.
esp_update_time() hasn't consider of the ns > 1s after the adding
calculation

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 20:21:45 +08:00
zhangyuan29 82eca2607a mq: change mqueue msg mail to dynamic array
Change mqueue_msg_s to a dynamic array so that
mqueue msg can be malloc based on the msg size
of the current data when applied dynamically.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-07 20:20:13 +08:00
simbit18 7db9b47465 Cmake: Improved setconfig support for setting multiple parameters
Improved setconfig support for setting multiple parameters for the .config

Added Cmake and Ninja version info

Modified savedefconfig now behaves with the same logic as the tools/refresh.sh script used for the update stage (make build) on GitHub.
2024-10-07 18:45:22 +08:00
Lup Yuen Lee 69f58de304 CI: Apply the Refactored Build Rules based on Arch Labels
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The PR will update the CI Build Workflow `build.yml`, to call the Refactored Build Rules in `arch.yml` (which is a Reusable Workflow).

The original rules were migrated from `build.yml` to `arch.yml`:
- We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS")
- For "Arch: risc-v": Build `risc-v-01`, `risc-v-02`
- For "Arch: xtensa": Build `xtensa-01`, `xtensa-02`
- The above rules apply when the PR is Created or Modified
- When the PR is Merged: All targets shall be built

This PR applies the New and Updated Rules defined in `arch.yml`:
- For "Arch: arm": Build `arm-01`, `arm-02`, ...
- For "Arch: arm64": Build `other`
- For "Arch: simulator": Build `sim-01`, `sim-02`
- For "Arch: x86_64": Build `other`
- For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow
- Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02`
- If GitHub CLI Fails: Build all targets

The code is explained here: https://github.com/apache/nuttx/issues/13775
2024-10-07 18:40:07 +08:00
ligd 5ff332f936 math: remove is_power_of_2() keep IS_POWER_OF_2()
Caused it may conflict with other platfrom

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 18:39:27 +08:00
SPRESENSE 9bfc426321 arch: cxd56xx: Add SD card 4-bit capability
The mmcsd driver has been updated to require SDIO_CAPS_4BIT to be
explicitly specified for SD card 4-bit support.
2024-10-07 17:35:19 +08:00
Neo Xu 0ba4d2c857 Documentation: add segger sysview heap trace example
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 18d5ae20f5 drivers/segger: add heap data plot
Add heap current used to note.
Plot it in segger sysview data plot.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
Neo Xu b3cc564910 drivers/segger: upgrade segger to v356
From V3.5.6 on, data plot is supported.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 3bfb40f299 drivers/segger: add heap note support
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang ee11d6ca0a drivers/noteram: fix compile error
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang eac6a8597f sched/note: add note when mm add new region
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 0663ac1483 sched/note: specify note event for heap instrumentation
1. Add NOTE_HEAP_ prefix for heap note event.
2. Use note type as heap instrumentation parameter.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
yinshengkai 8fecd0385b mm: fix memory statistics error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
yinshengkai 79eab8783f note: add memory tracing event support
Record all memory allocation and release, save to ram, used to analyze memory allocation rate and memory usage
Its absolute value is not trustworthy because the memory will be allocated in thread A and released in thread B

 netinit-5   [0]   0.105984392: tracing_mark_write: C|5|Heap Usage|96|free: heap: 0x606000000020 size:24, address: 0x603000000370
 netinit-5   [0]   0.105996874: tracing_mark_write: C|5|Heap Usage|24|free: heap: 0x606000000020 size:72, address: 0x6070000008e0
nsh_main-4   [0]   3.825169408: tracing_mark_write: C|4|Heap Usage|2177665|free: heap: 0x606000000020 size:424, address: 0x614000000840
nsh_main-4   [0]   3.825228525: tracing_mark_write: C|4|Heap Usage|14977|free: heap: 0x606000000020 size:2162688, address: 0x7f80a639f800
nsh_main-4   [0]   3.825298789: tracing_mark_write: C|4|Heap Usage|15189|malloc: heap: 0x606000000020 size:20, address: 0x6030000003a0

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
lijianjun 9762ddee6e add mm_uninitialize empty implementation for sim
Signed-off-by: lijianjun <lijianjun@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
buxiasen b444bf2e6a goldfish: fix sched api update missed godlfish_cpuboot
add cmake support

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-07 17:33:14 +08:00
buxiasen 5bf7d0e4a7 goldfish: boot add missing header when CONFIG_SCHED_INSTRUMENTATION
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
wangmingrong1 3e66cc30d0 arch/qemu: up_perf_init depends on CONFIG_ARCH_PERF_EVENTS
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
hujun5 0ed47c5f7e qemu: fix smp boot not enter idle
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
Bowen Wang a952e9ca78 arm/qemu_boot: fix the rpmsg syslog init warning
chip/qemu_boot.c:84:3: warning: implicit declaration of function 'syslog_rpmsg_init_early' [-Wimplicit-function-declaration]
   84 |   syslog_rpmsg_init_early(g_syslog_rpmsg_buf, sizeof(g_syslog_rpmsg_buf));
      |   ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
Bowen Wang 9e76bc610f arm/qemu_boot: add rpmsg syslog support for qemu armv7a
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
wangming9 00857c7fd9 arm/qemu: The PSCI can be configured with CONFIG_ARM_PSCI
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
ligd 4818707870 glodfish: add SMP boot support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
ligd d1bcc1f504 qemu: simply SMP boot
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
ligd 86a1cc30a5 task: merge nxtask_setup_name() before create_stack
After this patch up_create_stack() can do some
judgement with thread name

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 15:47:13 +08:00
Lup Yuen Lee 3173746e5d CI: Refactor the Build Rules based on Arch Labels
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The changes in this PR will not take effect until the next PR, which will switch `build.yml` to use the rules in this PR.

In this PR, we refactor the CI Build Rules into a separate Reusable Workflow `arch.yml`. The original rules were migrated to `arch.yml`:
- We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS")
- For "Arch: risc-v": Build `risc-v-01`, `risc-v-02`
- For "Arch: xtensa": Build `xtensa-01`, `xtensa-02`
- The above rules apply when the PR is Created or Modified
- When the PR is Merged: All targets shall be built

New and Updated Rules:
- For "Arch: arm": Build `arm-01`, `arm-02`, ...
- For "Arch: arm64": Build `other`
- For "Arch: simulator": Build `sim-01`, `sim-02`
- For "Arch: x86_64": Build `other`
- For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow
- Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02`
- If GitHub CLI Fails: Build all targets

The code is explained here: https://github.com/apache/nuttx/issues/13775
2024-10-07 15:04:28 +08:00
ligd 553cf84a7b audio: update audio null driver
fix nxplayer can't start
support capture

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 13:33:34 +08:00
hujun5 f12996c851 sched: replace sync pause with async pause for nxsig_process
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-07 13:32:57 +08:00
hujun5 f132ed2edb signal: adjust the signal processing logic to remove the judgment
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-07 13:32:57 +08:00
hujun5 7eea4223ee arch: move sigdeliver to common code
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-07 13:32:57 +08:00
buxiasen a569eef6ba arch: cpu pause when sigaction only necessary if tcb running
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-07 13:32:57 +08:00
yuanyongjian 6869a05368 syslog/syslog_rpmsg.c: the last log may be lost when it crashes
At line 236, we may set the null terminate to the priv->buffer,
when flushing the priv->buffer, we should use up_putc() instead up_nputs()
to ensure all the data has been output, because up_nputs() will check
the null terminate but up_putc() not.

Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
2024-10-07 12:18:10 +08:00
yuanyongjian 9e1750d22c syslog/syslog_rpmsg.c: out of memory
Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
2024-10-07 12:18:10 +08:00
ligd 7567e429b6 syslog_rpmsg: fix coding style
Follow the nxstyle

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 12:18:10 +08:00
yuanyongjian 8713638687 syslog/syslog_rpmsg.c: improve syslog_rpmsg performance
use copy buffer instead of single assignment

Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
2024-10-07 12:18:10 +08:00
Xiang Xiao 6e5c81e061 mm/heap: hold heap lock before access mm_nregions
to remove the race condition and rename IDX to idx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 04:19:27 +08:00
Yongrong Wang 365fed554e rpmsgblk.c: fix compile warning
misc/rpmsgblk.c:616:29: warning: implicit declaration of function ‘rpmsg_virtio_get_buffer_size’; did you mean ‘rpmsg_get_rx_buffer_size’? [-Wimplicit-function-declaration]
  616 |   if (MAX(msglen, rsplen) > rpmsg_virtio_get_buffer_size(priv->ept.rdev))
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             rpmsg_get_rx_buffer_size

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-07 04:18:18 +08:00