Commit graph

57065 commits

Author SHA1 Message Date
zhangyuan29
eae46b0823 sem: change sem wait to atomic operation
Add sem_wait fast operations, use atomic to ensure
atomicity of semcount operations, and do not depend
on critical section.

Test with robot:
before modify:
nxmutex_lock cost: 78 ns
nxmutex_unlock cost: 82 ns

after modify:
nxmutex_lock cost: 28 ns
nxmutex_unlock cost: 14 ns

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
zhangyuan29
77091a2296 atomic: Unify the compare_exchange functions of nx and stdatomic
define nx_atomic_compare_exchange_weak and nx_atomic_compare_exchange_strong function

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
chenrun1
9138e8af01 lib_pathbuffer.c:Use atomic instead of locks
Summary:
  Use atomic_cmpxchg to ensure that in multithreaded situations, if someone releases the buffer, it can be applied for in time. And use atomic_ulong to save free_bitmap

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-12-17 09:33:50 +08:00
chao an
4c379ecc98 libs/libc: rename LIBC_MAX_PATHBUFFER to LIBC_PATHBUFFER_MAX
Unified naming style:

if LIBC_PATHBUFFER
config LIBC_PATHBUFFER_MAX
...
config LIBC_PATHBUFFER_MALLOC
...
endif # LIBC_PATHBUFFER

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 09:33:50 +08:00
chao an
cf060b6bf2 libs/libc: add a option to disable path buffer by default
If the current platform does not require a large PATH_MAX size support and toolchain supports alloca(),
we could turn off this option to improve performance.

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 09:33:50 +08:00
YAMAMOTO Takashi
1f65af208a libxx: Make LIBCXXABI default for sim/macOS
Fix build errors like:
https://github.com/apache/nuttx/issues/14774
2024-12-17 09:25:24 +08:00
zhaohaiyang1
bb7562c380 nuttx/can.h: delete "begin_packed_struct" and "end_packed_struct" qualifier
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-12-17 09:25:02 +08:00
YAMAMOTO Takashi
63a9e1ff89 fs/littlefs/Make.defs: fix a littlefs unpack regression
Note that $(CONFIG_FS_LITTLEFS_VERSION).tar.gz is expanded to
eg. "v2.5.1".tar.gz. The extra quotes break make's file existence
checks.

Fixes: https://github.com/apache/nuttx/issues/15148

The regression was caused by https://github.com/apache/nuttx/pull/14903
2024-12-17 09:24:28 +08:00
Alin Jerpelea
58bc6d5ec3 arch/esp32c3-legacy/esp32c3_ice40: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Copyright and Author information is missing from the License and was filled with
commit authorship
    Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
0bfa46497d drivers/spi/ice40: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Copyright and Author information is missing from the License and was filled with
commit authorship
    Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
1e85f0c195 arch/arm/xmc4: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
62306849ca boards/arm/s32k1xx: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
e5272996f7 include/crypto/sha1: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
11183f68ab include/crypto/rijndael: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
b95414e6ba include/crypto/poly1305: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
8ba848a12b include/crypto/md5: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
438caa767a include/crypto/cast: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
0f2337e175 include/search: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
a9e3614eaa crypto/sha1: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
fea44435d4 crypto/rijndael: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
97827ab26b crypto/poly1305: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
568add3259 crypto/md5: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
861f81d9d7 crypto/chacha: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
ef0045ba0d crypto/cast: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
9ea488fd60 tools/macar-qcs.sh: migrate license to ASF
Xiaomi has signed the SGA and we can migrate the license to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
1a21acf5a4 arch/esp32c3-legacy/hardware: migrate license to ASF
the author has submitted the CLA and the license can be migrated to ASF
    Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
d19c0b8444 arch/esp32c3-legacy/hardware: migrate license to ASF
both co-authors have submitted the CLA and the license can be migrated to ASF
 Co-authored-by: Dong Heng <dongheng@espressif.com>
 Co-authored-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Andre Heinemans
f4e650352e sensors: fix Make.defs for bmm150 2024-12-16 10:27:21 +08:00
simbit18
97371c5b45 windows native: fixed FAILED: System.map
fixed

[1025/1027] Generating System.map
FAILED: System.map C:/nuttxgit/nuttx/build/System.map
cmd.exe /C "cd /D C:\nuttxgit\nuttx\build && arm-none-eabi-nm nuttx | grep -v '(compiled)|($)|( [aUw] )|(..ng$)|(LASH[RL]DI)' | sort > System.map"
2024-12-16 10:27:06 +08:00
Andre Heinemans
84ab0a3785 lpuart: fix build errors for SINGLEWIRE and INVERT without SERIAL_TERMIOS 2024-12-16 10:26:48 +08:00
Andre Heinemans
a0f0252e92 arm64/imx9: tpm: fix TPM_FILTER_CHXFVAL_MASK macro 2024-12-16 09:56:55 +08:00
Tiago Medicci Serrano
0da4e44e48 rv-virt/citest: Increase init task stack size to 3072
After https://github.com/apache/nuttx/pull/15075, the size of the
stack size has decreased 8 bytes and the init stack size for the
rv-virt:citest defconfig was near its full capacity, which lead to
crashing the `ps` command. The init stack size for this defconfig
was increased from 2048 to 3072 to avoid stack overflow.
2024-12-13 18:19:54 +08:00
SPRESENSE
957516105f arch: cxd56xx: Fix not restart after TX error
Fix a bug that I2C driver can not transfer after TX abort error.
It caused by remaining NO_STOP flag status.
2024-12-13 18:19:49 +08:00
chao an
6825f66fd6 sched/clock: cleanup g_system_ticks reference if arch timer is enabled
continue work of: https://github.com/apache/nuttx/pull/15139

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-13 18:19:44 +08:00
ligd
1463a49396 sched/clock: call up_timer_gettime() to get higher resolution
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-12-13 18:19:44 +08:00
Windrow14
90870ae62e fs/fat/fs_fat32util.c: fix potential exception due to dividing zero during mounting when fat is corrupted
Check fs_fatsecperclus' value when read from eMMC device. Return an error if it is zero.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-12-13 18:19:38 +08:00
Jukka Laitinen
1a74a44022 fs/shm/shmfs_alloc.c: Allocate zero-initialized memory in flat build
POSIX requires that the shm objects are zero-initialized. This has been broken
in some earlier commits (starting from 9af5fc5d09)

Also fix the flat build memory allocation to allocate both object data and payload
in the same chunk (as the comment also suggests). This saves allocations and memory
in a system with lots of shm objects.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-12-13 18:19:38 +08:00
chao an
200015d514 binfmt/exec: initialize binary_s to empty to avoid invaild access
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-13 18:19:13 +08:00
chao an
c6dfdbad41 binfmt/loadable: move binary_s to stack to avoid access allocator
Improve performance by reducing allocator accesses

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-13 18:19:13 +08:00
chao an
5abcc49789 mps2-an500/knsh: disable SPINLOCK to avoid build break
workaround for remove libc depends from kernel api

build break on phase 2 userspace link:

| arm-none-eabi-ld -o nuttx_user.elf --undefined=nsh_main --entry=nsh_main -T /nuttx/boards/arm/mps/mps2-an500/scripts/memory.ld \
| -T /nuttx/boards/arm/mps/mps2-an500/scripts/user-space.ld -L/nuttx/staging/ -L/nuttx/staging/ -L/nuttx/staging/ -L/nuttx/staging/ \
| -L/nuttx/staging/ -L/nuttx/staging/ mps_userspace.o --start-group -lproxies -lc -lmm -larch -lxx -lapps --end-group \
| "prebuilts/linux/gcc/arm/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a"
|
| arm-none-eabi-ld: /nuttx/staging//libc.a(lib_pathbuffer.o): in function `spin_unlock_wo_note':
| /nuttx/include/nuttx/spinlock.h:380:(.text.lib_get_pathbuffer+0x298): undefined reference to `g_irq_spin_count'
| arm-none-eabi-ld: /nuttx/include/nuttx/spinlock.h:380:(.text.lib_get_pathbuffer+0x29c): undefined reference to `g_irq_spin'
| arm-none-eabi-ld: /nuttx/staging//libc.a(lib_pathbuffer.o): in function `lib_put_pathbuffer':
| /nuttx/libs/libc/misc/lib_pathbuffer.c:147:(.text.lib_put_pathbuffer+0x210): undefined reference to `g_irq_spin_count'
| arm-none-eabi-ld: /nuttx/libs/libc/misc/lib_pathbuffer.c:147:(.text.lib_put_pathbuffer+0x214): undefined reference to `g_irq_spin'
| make[1]: *** [Makefile:61: nuttx_user.elf] Error 1
| make[1]: Leaving directory '/nuttx/boards/arm/mps/mps2-an500/kernel'
| make: *** [tools/Unix.mk:540: nuttx] Error 2

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 22:00:45 +08:00
chao an
2ccdd947a1 libc/chdir: replace heap alloc to path buffer to improve performance
realloc path buffer to avoid alloc from realpath()

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 22:00:45 +08:00
chao an
bf27e4d75d esp/mcpwm: fix unpaired spin lock
N/A

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 22:00:28 +08:00
Tiago Medicci Serrano
6eb9b09960 xtensa/esp32s3: Update the reserved size for struct __lock
After https://github.com/apache/nuttx/pull/15075, the static
assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c`
was being triggered when building any of the ESP32-S3's defconfigs.
This commit updates the reserved size to reflect the changes
introduced by the related PR.
2024-12-12 22:00:07 +08:00
Jouni Ukkonen
75ef5ea11e arch/arm64/imx9: Fix usdhc dma receive
Invalidate cache when dma transfer is ready

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-12-12 21:58:39 +08:00
anjiahao
5e4c14d8e8 procfs:fix cmdline overflow
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-12-12 21:58:23 +08:00
chao an
a94264ea00 arm/cxd56xx: Add g_ prefix to rtc spin lock
continue work of a68b00206b

| commit a68b00206b
| Author: hujun5 <hujun5@xiaomi.com>
| Date:   Mon Dec 9 20:48:09 2024 +0800
|
|     cxd56_rtc.c: use small lock in arch/arm/src/cxd56xx/cxd56_rtc.c
|
|     reason:
|     We hope to remove all instances of spin_lock_irqsave(NULL).
|
|     Signed-off-by: hujun5 <hujun5@xiaomi.com>

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-11 20:35:45 +08:00
buxiasen
52c4408db9 document/drivertest: add more information in drivertest
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-12-11 20:35:28 +08:00
Nathan Hartman
532bf64515 Documentation: Tweak text about Zero Latency Interrupts
This is a follow-up to 366c8a5d94 (PR-15102).

* Documentation/guides/zerolatencyinterrupts.rst
  (Title): Make title case consistent.
  (Getting Back into the Game, Maskable Nested Interrupts): Clarify discussion
   about priorities.
  (Cortex-M3/4 Implementation): The first half of a sentence was deleted in
   366c8a5d9 because the Kconfig that was described there no longer exists:
   CONFIG_ARMV7M_USEBASEPRI. Write a new beginning for this sentence that
   matches current implementation.
  (Disabling the High Priority Interrupt): Change "cannot" to "must not be
   allowed to" to improve clarity.
  (Configuring High Priority Interrupts): Change "to NVIC" to "in NVIC" to
   improve clarity.
2024-12-11 20:35:28 +08:00
Xiang Xiao
34d1a7fd54 Documentation: Remove CONFIG_ARMV7M_USEBASEPRI from code base
since the basepri is always used without any configuraion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-12-11 20:35:28 +08:00
chao an
32ab151712 libc/chdir: chdir/fchdir should not depend on environment variables
This PR will still allow basic shell operations such as cd/ls/pwd to be used even when the environment is disabled.

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-11 20:35:00 +08:00