Closed
Description
The optional Cortex-M cache exposes "clean" and "invalidate" operations. As pointed out by @adamgreig in #47 (comment), performing only the "invalidate" operation without a preceding "clean" is unsound.
- "Clean" flushes cache lines to main memory and makes operations visible to other peripherals and cores
- "Invalidate" drops cache lines so that they are fetched from main memory on subsequent accesses, making modifications from other bus masters visible to the core doing the invalidation
This operation is currently exposed via safe interfaces:
We should either deprecate the methods and add unsafe replacements, or make the methods unsafe
in a breaking change without deprecation period (this avoids having to find new names).
In my opinion there is little to no value in exposing only "invalidate" since it hard to use correctly and has little to no benefits over "clean + invalidate", so removing it is also an option.