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>
This commit is contained in:
Atish Patra 2021-06-12 16:52:26 -07:00 committed by Emil Renner Berthing
parent 28e5304536
commit b1108f5977

View file

@ -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 +