riscv: andes: add L2 cache flush support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | dm: cache: Add flush_all operationdrivers/ include/ | +26 | 0 replies | |
| 2/4 | cache: andes-l2: implement flush_alldrivers/ | +14 | 0 replies | |
| 3/4 | riscv: andes: flush the L2 cache in flush_dcache_all()arch/ | +4 | 0 replies | |
| 4/4 | riscv: andes: probe the L2 cache device in U-Boot properarch/ | +15 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Leo Yu-Chi Liang |
|---|---|
| Series | R-b |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] riscv: andes: add L2 cache flush support
On Andes, flush_dcache_all() only flushes L1, and flush_dcache_range() and invalidate_dcache_range() call it. Without the I/O coherence port (IOCP), DMA masters do not snoop the CPU caches, so dirty lines left in L2 make them read stale data.
This series adds a flush_all operation to the cache uclass, implements it in the Andes L2 cache driver and calls it from flush_dcache_all(). In U-Boot proper, enable_caches() runs before driver model is set up after relocation and cannot find the L2 cache device, so patch 4 runs it again once driver model is ready. U-Boot proper in S-mode then drives L2 itself, as the Linux ax45mp_cache driver does.
Side effects: each range operation flushes the whole L2 cache, "dcache off" and "dcache on" turn L2 off and on in S-mode, and L2 is now enabled in M-mode U-Boot proper.
checkpatch warns about the #ifdef in patch 3, which matches the rest of the file, and does not know the Assisted-by tag from Linux's Documentation/process/coding-assistants.rst.
Randolph Lin (4):
dm: cache: Add flush_all operation
cache: andes-l2: implement flush_all
riscv: andes: flush the L2 cache in flush_dcache_all()
riscv: andes: probe the L2 cache device in U-Boot proper
arch/riscv/cpu/andes/cache.c | 19 +++++++++++++++++++ drivers/cache/cache-andes-l2.c | 16 ++++++++++++++-- drivers/cache/cache-uclass.c | 10 ++++++++++ include/cache.h | 16 ++++++++++++++++ 4 files changed, 59 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1