diff options
author | 2024-02-23 13:53:30 +0100 | |
---|---|---|
committer | 2024-02-23 13:53:30 +0100 | |
commit | bcb323bd10a1b6e2a041f0730e094f522d18c709 (patch) | |
tree | f673163435b3b85405af96f5d08441c5c47fe442 | |
parent | arm64: dts: qcom: Fix interrupt-map cell sizes (diff) | |
parent | cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback() (diff) | |
download | wireguard-linux-bcb323bd10a1b6e2a041f0730e094f522d18c709.tar.xz wireguard-linux-bcb323bd10a1b6e2a041f0730e094f522d18c709.zip |
Merge tag 'riscv-cache-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes
RISC-V Cache driver fixes for v6.8-rc6
A single fix for an inconsistency reported during CIP review by Pavel in
the newly added ax45mp cache driver.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* tag 'riscv-cache-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()
Link: https://lore.kernel.org/r/20240221-keenness-handheld-b930aaa77708@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/cache/ax45mp_cache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cache/ax45mp_cache.c b/drivers/cache/ax45mp_cache.c index 57186c58dc84..1d7dd3d2c101 100644 --- a/drivers/cache/ax45mp_cache.c +++ b/drivers/cache/ax45mp_cache.c @@ -129,8 +129,12 @@ static void ax45mp_dma_cache_wback(phys_addr_t paddr, size_t size) unsigned long line_size; unsigned long flags; + if (unlikely(start == end)) + return; + line_size = ax45mp_priv.ax45mp_cache_line_size; start = start & (~(line_size - 1)); + end = ((end + line_size - 1) & (~(line_size - 1))); local_irq_save(flags); ax45mp_cpu_dcache_wb_range(start, end); local_irq_restore(flags); |