mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
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:
parent
28e5304536
commit
b1108f5977
1 changed files with 3 additions and 0 deletions
|
@ -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 +
|
||||
|
|
Loading…
Add table
Reference in a new issue