-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Rpmsg rtc fixes #17909
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
Donny9
wants to merge
4
commits into
apache:master
Choose a base branch
from
Donny9:rpmsg-rtc-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
Rpmsg rtc fixes #17909
+72
−80
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
Export rpmsg endpoint to allow remote CPU to access RTC services. Simplify the initialization flow and remove unnecessary Kconfig options. Signed-off-by: dongjiuzhu1 <[email protected]>
without rpmsg rtc client driver Avoid sending rpmsg messages to cores that don't have RTC client driver. Check endpoint availability before attempting to send messages. Signed-off-by: dongjiuzhu1 <[email protected]>
Fix potential crash when removing client from server list. Add proper list initialization check before deletion operation. Signed-off-by: dongjiuzhu1 <[email protected]>
Add null pointer check for ioctl operations in RTC driver. Return -ENOTTY when ioctl function pointer is NULL to prevent crashes. Signed-off-by: dongjiuzhu1 <[email protected]>
a57a6a2 to
bfef2a3
Compare
xiaoxiang781216
approved these changes
Jan 14, 2026
Contributor
|
@Donny9 please fix: |
anchao
requested changes
Jan 19, 2026
| server = client->ept.priv; | ||
|
|
||
| nxmutex_lock(&server->lock); | ||
| list_add_tail(&server->list, &client->node); |
Contributor
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.
check node whether in list before add
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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 includes a series of fixes and improvements for the RPMSG RTC driver to enhance stability and functionality:
Export RTC endpoint to remote CPU: Refactor the RPMSG RTC driver to properly export the endpoint, allowing remote CPUs to access RTC services. This change simplifies the initialization flow and removes unnecessary Kconfig options.
Prevent messages to cores without RTC client: Add checks to avoid sending RPMSG messages to cores that don't have the RTC client driver installed, preventing communication errors.
Fix list node crash: Fix a critical crash that occurs when removing a client from the server list due to improper list initialization checks.
Add null pointer check for ioctl: Add proper null pointer validation for ioctl operations in the RTC driver to prevent crashes when ioctl function pointer is NULL, returning -ENOTTY as appropriate.
These changes improve the robustness and reliability of the RPMSG RTC driver in multi-core systems.
Impact
Testing
Test Environment:
Test Procedure:
datecommandTest Results:
nsh> hello
Hello, World!!
=== RPMSG RTC Time Sync Test ===
RTC Time: 2026-01-14 08:30:45
Time sync: OK
nsh> date
Tue, Jan 14 08:30:45 2026
Verification: