Hi Pedro,
Agree Assert is slightly more enforcing over logs, but you could still get away with even Assert in release mode.
One alternative is to convert VERBOSE into WARNING?
=D

On Thu, Jan 18, 2024 at 9:28 PM Pedro Falcato <pedro.falcato@gmail.com> wrote:
On Thu, Jan 18, 2024 at 9:50 AM Dhaval <dhaval@rivosinc.com> wrote:
>
> Some platforms do not implement cache management operations. Especially
> for DMA drivers have code to manage data cache. The code seem to depend
> on the underlying CPU/cache drivers to enact functionality and simply
> return if such functionality is not implemented. However this causes
> issue with CMO implementation which has an assert causing flow to
> hang within debug environment. While it is not an issue in production
> environment there is a recommendation to conver this assert in to

I don't agree with this patch. As I see it, the library has a simple
contract: Do cache operation X and return. We cannot safely return if
we don't know how to do cache operation X. Say, with a Thead core and
Xtheadcmo.
Any other concerns wrt DMA are, in my view, somewhat separate.

One can easily theorize a way this change can come to bite us, say, a
storage controller writes bogus data to storage (because the platform
needs explicit cache coherency, and we don't know how to do that) and
causes data corruption.

> a harmless logger message. Eventually platform/drivers need to have
> better guard for such functionality.

Like an ASSERT? :)

--
Pedro


--
Thanks!
=D
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#113999) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_