diff options
author | Atish Patra <atish.patra@wdc.com> | 2021-06-13 02:52:26 +0300 |
---|---|---|
committer | Emil Renner Berthing <kernel@esmil.dk> | 2021-12-26 18:41:30 +0300 |
commit | f449d05ba3d4ac7254c3350013a4632979cc47e9 (patch) | |
tree | d51314715b4f200017180d50aaf7082e7fd96270 | |
parent | b499fbec0b21d49183a45ed5483d33649f4df603 (diff) | |
download | linux-f449d05ba3d4ac7254c3350013a4632979cc47e9.tar.xz |
sifive/sifive_l2_cache: Align the address to cache line
[Emil: fix suggested by Geert Uytterhoeven <geert@linux-m68k.org>]
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
-rw-r--r-- | drivers/soc/sifive/sifive_l2_cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c index 626b664547e5..fb39be6c730a 100644 --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -139,6 +139,9 @@ void sifive_l2_flush64_range(unsigned long start, unsigned long len) return; } + len = len + (start % SIFIVE_L2_FLUSH64_LINE_LEN); + start = ALIGN_DOWN(start, SIFIVE_L2_FLUSH64_LINE_LEN); + /* make sure the address is in the range */ if(start < CONFIG_SIFIVE_L2_FLUSH_START || (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + |