-
Notifications
You must be signed in to change notification settings - Fork 291
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
fix remoteproc get wrong memory when memory region are continuous and Invalidate the ring region but use non initialize ring index. #339
Conversation
Please re-split your commits.
For instance the first patch shoul contains something like this
|
57895e5
to
de211a3
Compare
Hi Arnopo, Thank you for your explain and recommend. Thank you. |
Hi @carlocaione |
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.
For the invalidation part
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.
Much better!
nitpicking over details else look good to me:
Some typos to correct in the commit message (I'm not a native English speaker, so I hope the proposals are valid).
- commit 1:
remoteproc: fix remoteproc get wrong memory
When memory region are continuous, it maybe get wrong memory region.
When memory regions are continuous, it may get wrong memory region.it may get
If pa is equal to the end address of the memory and size equal zero.
It will get wrong memory region.
So needto add check pa is smaller then end address.
need to
Signed-off-by: Joshua Lin [email protected]
- Commit 2:
virtqueue: fix invalidate wrong cache region
It is always invalidate the avail ring index 0.
It always invalidates
It need get the right vring index before incalidate.
It must get the right vring index before invalidating it.
Signed-off-by: Joshua Lin [email protected]
When memory region are continuous, it may get wrong memory region. If pa is equal to the end address of the memory and size equal zero. It will get wrong memory region. So need to add check pa is smaller then end address. Signed-off-by: Joshua Lin <[email protected]>
c4ef8c6
to
02f8ec8
Compare
Hi Arnopo, Thank you for your recommend. Joshua |
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.
The code looks good to me.
I would like to see the commit message changed to something like:
The current code fetches the vring index before invalidating the cache. This can lead to using an invalid index. Fetch the index before invalidation to ensure a correct index.
Feel free to change this so that it matches reality.
The current code fetches the vring index before invalidating the cache. This can lead to using an invalid index. Fetch the index before invalidation to ensure a correct index. Signed-off-by: Joshua Lin <[email protected]>
02f8ec8
to
ebb1371
Compare
Hi Edmooring: Thank you for your recommend. |
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.
Looks good to go.
Signed-off-by: Joshua Lin [email protected]