-
Notifications
You must be signed in to change notification settings - Fork 1.5k
NuttX miscellaneous fixes and improvements #18161
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
Open
txy-21
wants to merge
12
commits into
apache:master
Choose a base branch
from
txy-21:nuttx-misc-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+373
−118
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pse52 test error:fpathconf failed, errno = 38 (ENOSYS) Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Validate the file descriptor before attempting cancellation. Return EBADF for invalid descriptors as required by POSIX. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Probe the start/end of each configured range before dumping. Fails early on misconfigured ranges to ease diagnosis. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Invalidate descriptor entries before following NEXT links. Ensures CPU sees updated vring descriptors from the device. Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Use critical_section for regulator state updates. Reduces IRQ-off time while preserving atomic updates. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Drop critical_section usage from SMPS paths. Keeps locking consistent with the updated regulator flow. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Remove critical_section usage from powerled control. Aligns power LED handling with the updated regulator flow. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Handle stay_timeout updates consistently across CPUs. Avoids mismatched state when SMP scheduling is enabled. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Include kmalloc.h to satisfy allocator declarations. Prevents implicit declaration warnings on arm64 builds. Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Add netdb helpers needed by rexec support. Improves compatibility with legacy remote exec tooling. Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Don't include pthread.h in nuttx/userspace.h and move main_t to sys/types.h to avoid including the unnecessary header file. Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Populate VSOCK host/guest CIDs in the IVSHMEM resource. Ensures endpoints are configured before bring-up. Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
jerpelea
requested changes
Jan 26, 2026
Contributor
jerpelea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split the contribution in several PRs each one containing one contribution topic
Contributor
Author
@jerpelea OK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Arch: arm64
Issues related to ARM64 (64-bit) architecture
Area: Drivers
Drivers issues
Area: File System
File System issues
Area: OS Components
OS Components issues
Size: M
The size of the change in this PR is medium
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR contains 12 miscellaneous fixes and improvements for NuttX, covering various subsystems including networking, memory management, power management, and system utilities. All changes are targeted bug fixes and compatibility improvements with no breaking changes.
Changes Overview:
Network & Communication (4 commits)
VSOCK improvements: Set host_cid and guest_cid for proper endpoint configuration
Header optimization: Remove pthread.h inclusion from nuttx/userspace.h to reduce dependencies
netdb/rexec: Add missing rexec helpers for legacy remote exec compatibility
VirtIO drivers: Invalidate cache for vq_ring descriptors to ensure cache coherency
Memory & Resource Management (2 commits)
ARM64 timer: Add missing kmalloc.h include to fix build warnings
Coredump: Validate memory range accessibility before dumping to prevent crashes
Power Management (4 commits)
PM/SMP: Fix stay_timeout inconsistency in SMP environments
Power supplies: Remove critical_section usage from powerled.c, smps.c, and update regulator.c for better locking strategy
System & API Improvements (2 commits)
AIO: Add proper file descriptor validation in aio_cancel function
fpathconf: Return -1 for _PC_PRIO_IO to indicate unsupported feature
Impact
Stability: Fixes several SMP-related race conditions and memory access issues
Compatibility: Improves POSIX compliance and legacy tool compatibility
Performance: Reduces IRQ-off time in power management paths
Build Quality: Eliminates build warnings and reduces unnecessary dependencies
No Breaking Changes: All changes maintain backward compatibility
Testing:
nsh> user_main: Exiting
nsh> ostest_main: Exiting with status 0