Skip to content

Commit 06cbc5e

Browse files
glneomathieupoirier
authored andcommitted
remoteproc: k3-r5: Use IO memset to clear TCMs
While it should be safe to use normal memset() on these memories as they are mapped as Normal Non-Cached, using the memset_io() provides stronger guarantees on access alignment and fixes a sparse check warning. Switch to memset_io() here. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241021204557.929823-1-afd@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent be3e652 commit 06cbc5e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/remoteproc/ti_k3_r5_remoteproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,10 @@ static int k3_r5_rproc_prepare(struct rproc *rproc)
487487
* can be effective on all TCM addresses.
488488
*/
489489
dev_dbg(dev, "zeroing out ATCM memory\n");
490-
memset(core->mem[0].cpu_addr, 0x00, core->mem[0].size);
490+
memset_io(core->mem[0].cpu_addr, 0x00, core->mem[0].size);
491491

492492
dev_dbg(dev, "zeroing out BTCM memory\n");
493-
memset(core->mem[1].cpu_addr, 0x00, core->mem[1].size);
493+
memset_io(core->mem[1].cpu_addr, 0x00, core->mem[1].size);
494494

495495
return 0;
496496
}

0 commit comments

Comments
 (0)