-
Notifications
You must be signed in to change notification settings - Fork 292
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
Updates and clean-up cache management #502
Conversation
ed5d27b
to
581d0a3
Compare
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.
Instead of having different macros with different names doing the same thing can we have one single set of macros for flushing and invalidating?
I totally agree, but TBH I don't know where to add them - in which header so it can be accessed by all? |
IMO if you cannot find a proper header for that just add a new one. |
ok, I'll look again. Thanks! |
I've add a new commit to fix this: 731e394 |
b8d6ec3
to
9293a0b
Compare
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.
I'm in general ok with this change but we must discuss whether we actually want to have a general VIRTIO_USE_CACHE
switch or we want to have a more fine grained control over buffers placement.
cmake/options.cmake
Outdated
option (WITH_DCACHE "Build with all cache operations enabled" OFF) | ||
|
||
if (WITH_DCACHE) | ||
add_definitions(-DVIRTIO_USE_CACHE) |
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.
add_definitions(-DVIRTIO_USE_CACHE) | |
add_definitions(-DVIRTIO_USE_DCACHE) |
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.
done. Thanks!
9293a0b
to
122570d
Compare
IMO we should keep all 3, but see here: #502 (comment) |
#define RSC_TABLE_INVALIDATE(x, s) metal_cache_invalidate(x, s) | ||
#warning "VIRTIO_CACHED_RSC_TABLE is deprecated, please use VIRTIO_USE_CACHE" | ||
#endif | ||
#if defined(VIRTIO_CACHED_RSC_TABLE) || defined(VIRTIO_USE_CACHE) |
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.
you update VIRTIO_USE_CACHE to VIRTIO_USE_DCACHE in option.cmake
but not in the source files
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.
You're right. Thanks!
I fixed it!
@carlocaione
@xiaoxiang781216 : |
122570d
to
505dbba
Compare
@carlocaione @xiaoxiang781216 any comment/feedback on this PR? |
@arnopo instead of deprecating At least people could decide the lever of granularity to use. |
If possible, I would avoid multiplying the configs that complexify the support and increase the risk of bugs. Therefore, if no rational to keep them they should be removed. |
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.
I don't have any real problem with this. @iuliana-prodan please update https://github.com/zephyrproject-rtos/open-amp/blob/master/CMakeLists.txt and the zephyr open-amp repo when this is merged.
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.
LGTM
LGTM |
@iuliana-prodan |
Sure |
505dbba
to
8641e8b
Compare
Did the rebase and push the changes.
It seems to me that is required zephyr-sdk 0.16 and the continuous integrations uses 0.15. @arnopo is it possible to update the zephyr-sdk? |
The dsk version in the Ci need to be uopdated , I will do it |
Ci fixed in #504 |
Fix typo for WITH_DCACHE_BUFFERS option. Signed-off-by: Iuliana Prodan <[email protected]>
Move VRING_FLUSH and VRING_INVALIDATE defines to header file. Signed-off-by: Iuliana Prodan <[email protected]>
Do buffers flush and invalidate the same as with vrings and resource table: - add defines in header file; - call BUFFER_FLUSH/BUFFER_INVALIDATE where necessary. Signed-off-by: Iuliana Prodan <[email protected]>
Since all cache operations, for vrings, buffer and resource table are using metal_cache_flush and metal_cache_invalidate, define a common function for all. Signed-off-by: Iuliana Prodan <[email protected]>
Add WITH_DCACHE operation used for all cache operations: vrings, buffers and resource table. The other options will be deprecated - add warning message for this. Add info for WITH_DCACHE option in README. Signed-off-by: Iuliana Prodan <[email protected]>
8641e8b
to
003311e
Compare
Done. |
@carlocaione Sorry for not doing this earlier, but... here it is: zephyrproject-rtos/open-amp#17 |
Please, check each commit.
cc: @arnopo @carlocaione @TanmayShah-xilinx