Patch "cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cache-ax45mp_cache-align-end-size-to-cache-boundary-.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5b75dab51171962007d5350107674fafede42f96
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Date:   Sat Feb 3 21:26:40 2024 +0000

    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@xxxxxxx>
    Link: https://lore.kernel.org/cip-dev/ZYsdKDiw7G+kxQ3m@xxxxxxxxxx/
    Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
    Signed-off-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cache/ax45mp_cache.c b/drivers/cache/ax45mp_cache.c
index 57186c58dc849..1d7dd3d2c101c 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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux