Bowen Wang
313d6df787
include/nuttx.h: replace all the align macros to nuttx version
...
1. add IS_ALIGNED() definitions for NuttX;
2. replace all the ALIGN_UP() and ALIGN_DOWN() to use common
align implementation;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 16:55:43 +08:00
dongjiuzhu1
a041ebbaef
Revert "sched/group/setuptask_file: duplicate idle task fd for kernel thread"
...
let's using shared group for kthreads, see pull/12320
This reverts commit 4e24eec7b6 .
2024-10-11 16:53:19 +08:00
guohao15
69f3774f30
littlefs:remove the '/' in the end of relpath in mkdir
...
mkdir /data/log success
mkdir /data/log/ failed in littlefs (but fatfs/yaffs/tmpfs success)
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 15:46:02 +08:00
ligd
da5839c6f2
littlefs: fix warnings
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
8f6ea8896f
fs/littlefs: revert fstat and use lfs_file_attr function
...
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
Jiuzhu Dong
c5779297cf
littlefs/stat: return OK when stat success
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
0ab637f57e
fs/littlefs: Add attr to dirA
...
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
f70de1c65f
fs/littlefs: Fix the bug of missing file types
...
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
zhouliang3
44992c8821
fs/littlefs: Implement fchstat and chstat of littlefs
...
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-10-11 15:46:02 +08:00
Tomasz 'CeDeROM' CEDRO
140ce28616
Update github pull request template.
...
* Update CONTRIBUTING.md guide with hints and examples.
* Minor GitHub Pull Request Template update hinting expected information.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2024-10-11 15:45:36 +08:00
ouyangxiangzhen
0936c97d3e
arch/x86_64: Fix SMP startup for ACRN Hypervisor
...
This patch fixed SMP startup for ACRN Hypervisor.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-11 15:43:01 +08:00
liwenxiang1
9189800760
arch/x86_64:Add configuration to disable vectorization optimization
...
With aggresive optimization enabled (-O3), ostest FPU test will fail.This is because the compiler will generate additional vector instructions between subsequent up_fpucmp() calls (loop vectorization somewhere in usleep() call), which will consequently overwrite the expected FPU context (XMM registers).The compilation option -fno-tree-vectorize can avoid this issue.
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-10-11 15:40:55 +08:00
andi6
19e34b7f6e
x64: modify addr limit to support 64 bits addr backtrace
...
Signed-off-by: andi6 <andi6@xiaomi.com>
2024-10-11 15:32:28 +08:00
Yongrong Wang
976c4173f0
rpmsg_ping.c: fix msg data memset length
...
The range of memset exceeds the size of the buffer
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
4b77dd03db
rpmsg_ping.c: change msg cmd type for more compatible
...
Use bit mask method to represent the command, because it's more
convenient to express multiple characteristics simultaneously.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
1cf97ac4d0
rpmsg_ping.c: improve log level to LOG_EMERG
...
Usually rpmsg ping logs are needed during testing,
but too many other module logs can easily overwrite it,
so improve the rpmsg ping log level, later we can setlogmask to
a higher log level to mask other modules' logs.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
Yongrong Wang
b96ad59d69
rpmsg_ping.c: change check data to fluctuation value
...
We can found the error happend packet more accurately based
on the data value.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-11 14:59:26 +08:00
cuiziwei
5e96e72cb6
X86_64: Add libcxx availability macros.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 13:53:10 +08:00
hujun5
1373957ea0
fix typo error
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-11 13:52:58 +08:00
SPRESENSE
5e81726f21
binfmt/libelf: Fix return code
...
Fix return code in case of error in loading constructor and destructor section.
Detected by Codesonar 54667871, 54667873
2024-10-11 13:52:46 +08:00
cuiziwei
1816d752af
arch/x86_64:Fix build cxx warning.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 13:46:27 +08:00
lipengfei28
274ca2ea65
arch: arm64: Fix ARM64_CONTEXT_REGS number
...
This commit fixes the regression in https://github.com/apache/nuttx/pull/14063
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 13:26:54 +08:00
yinshengkai
154cb4a860
sim/note: add note related configuration
...
Ensure that CI can cover all note code
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
c83858bbb6
note: fix note_common unaligned access
...
Data in ARMV8-M may be aligned with less than 4 bytes, resulting in USAGE FAULT
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
464d284587
drivers/note: simplify notesnap_dump logic
...
RTOSXMDPYX-969
Crash at startup, index is 0 will cause loop printing
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
cuiziwei
6ad06ba004
note:unified note filtering at runtime.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
a70175ea06
note: make sched_note_start depend on INSTRUMENTATION_SWITCH
...
In some cases, we only need to use INSTRUMENTATION_DUMP to record custom data,
and we don't want the thread start and end information
Move this part to INSTRUMENTATION_SWTICH for recording
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
453cde945f
note: add note stream drivers
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai
43d96a5d9e
note: Increase crash dump buffer
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
anjiahao
5076b0c74c
risc-v:Unify module compilation options
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-11 11:20:45 +08:00
yinshengkai
4685175617
sched: fix the inaccurate cpuload statistics issue
...
Non-fixed clock source will lead to inaccurate cpuload statistics
before:
5 5 253 RR Task - Waiting Signal 0000000000000000 0002000 0000624 31.2% 2.5% cpuload -p 50
6 6 253 RR Task - Waiting Signal 0000000000000000 0002000 0000624 31.2% 0.7% cpuload -p 10
7 7 253 RR Task - Waiting Signal 0000000000000000 0002000 0000624 31.2% 2.2% cpuload -p 20
after:
5 5 253 RR Task - Waiting Signal 0000000000000000 0002000 0000624 31.2% 50.8% cpuload -p 50
6 6 253 RR Task - Waiting Signal 0000000000000000 0002000 0000624 31.2% 10.8% cpuload -p 10
7 7 253 RR Task - Waiting Signal 0000000000000000 0002000 0000624 31.2% 20.0% cpuload -p 20
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:04:47 +08:00
yinshengkai
f88afa5825
sched/cpuload: fix SMP situation CPULOAD statistics are inaccurate
...
When statistics when sched_cpuload_critMonitor, thread switching only calculates the current CPU's running time. Other CPU running threads are updated for updates
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:04:47 +08:00
guohao15
38f0056dcd
romfs:extend romfs to enable write part4
...
add sem for write safe
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
322765b442
fs/romfs: Align up the file size to 16 bytes
...
and set volume size to 96 bytes in romfs_mkfs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
7814c40a99
fs/romfs: Replace strlcpy and strcmp with memcpy and memcmp
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
4d9512f0d4
fs/romfs: Add romfs_devstrcpy and romfs_devmemcpy
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
808beabc83
fs/romfs: Compute rf_endsector correctly when the file end on the sector boundary
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
cca7b7cb37
fs/romfs: romfs_read return the partail read size instead error code
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
96900845a5
fs/romfs: Change the type of num from uint8_t to uint16_t
...
to support the directory with more than 255 files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
Xiang Xiao
4ebcc130b9
fs/romfs: Remove the reference to OK and ERROR
...
and fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-11 10:42:20 +08:00
guohao15
23aef2d7b4
romfs:extend romfs to enable write part3
...
add romfs_mkfs to support autoformat && forceformat
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
guohao15
7d8d766018
romfs:bugfix use origoffset instead of offset
...
origoffset represent the offset of current node
offset represent the offset of the file when
the current node is a soft or hard link
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
guohao15
3e58620ccc
romfs:bugfix romfs_statfs
...
fix for df cmd infomation of romfs
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
guohao15
c61734a469
romfs:extend romfs to enable write part2
...
add sparelist api
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
guohao15
f3840cf141
romfs:extend romfs to enable write part1
...
change romfs_cachenode to find all headers
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-11 10:42:20 +08:00
hujun5
670c4d9a89
sched: inline nxsched_select_cpu nxsched_add_prioritized to improve performence
...
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-net none -chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-11 03:21:24 +08:00
zhangwenjian
aec44de921
ICANON mode need echo every bytes
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
zhangwenjian
7532a0e833
serial:need check old config before setting tty
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
zhangwenjian
df5c876932
libc:getline support backspace
...
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:11:26 +08:00
yinshengkai
e4e355d164
fs: Set the poll return value according to the man manual
...
The man manual describes that poll only has EFAULT, EINTR, EINVAL, and ENOMEM return values.
If a file returns an error, the POLLERR event should be set and OK should be returned
https://man7.org/linux/man-pages/man2/poll.2.html
When using libuv to poll the socket, the socket poll returned an EBUSY error, causing libuv to abort.
The expected logic should be to return OK, allowing libuv to notify the event listener that the POLLERR event occurred.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 03:08:05 +08:00