diff options
author | Atish Patra <atish.patra@wdc.com> | 2021-06-13 02:52:26 +0300 |
---|---|---|
committer | Emil Renner Berthing <kernel@esmil.dk> | 2021-09-27 03:08:15 +0300 |
commit | b6585a3c5efdadf59b1ff55365949e6925297ff9 (patch) | |
tree | 673340f5f82285d1ed97d68302e9d4f14661329d | |
parent | eb9cb5f07942b500f5f3acca887fa7698c149e54 (diff) | |
download | linux-b6585a3c5efdadf59b1ff55365949e6925297ff9.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 + |