]> git.itanic.dy.fi Git - linux-stable/commit
cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Sat, 3 Feb 2024 21:26:40 +0000 (21:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:35:08 +0000 (13:35 +0100)
commit50b30655b2246ac21352d2ae5ea4690e75cecf37
treeb46ea188bd7530adf83c4a221750d82c595b8797
parent9b099ed46dcaf1403c531ff02c3d7400fa37fa26
cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()

[ Upstream commit 9bd405c48b0ac4de087c0c4440fd79597201b8a7 ]

Align the end size to cache boundary size in ax45mp_dma_cache_wback()
callback likewise done in ax45mp_dma_cache_inv() callback.

Additionally return early in case of start == end.

Fixes: d34599bcd2e4 ("cache: Add L2 cache management for Andes AX45MP RISC-V core")
Reported-by: Pavel Machek <pavel@denx.de>
Link: https://lore.kernel.org/cip-dev/ZYsdKDiw7G+kxQ3m@duo.ucw.cz/
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cache/ax45mp_cache.c