sifive/sifive_l2_cache: Print a backtrace on out-of-range flushes

This makes it easier to find out which driver passes a wrong address
range.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
Geert Uytterhoeven 2021-05-21 08:35:33 +02:00 committed by Emil Renner Berthing
parent 578236e1ab
commit 28e5304536

View file

@ -143,8 +143,8 @@ void sifive_l2_flush64_range(unsigned long start, unsigned long len)
if(start < CONFIG_SIFIVE_L2_FLUSH_START ||
(start + len) > (CONFIG_SIFIVE_L2_FLUSH_START +
CONFIG_SIFIVE_L2_FLUSH_SIZE)) {
pr_warn("L2CACHE: flush64 out of range: %lx(%lx), skip flush\n",
start, len);
WARN(1, "L2CACHE: flush64 out of range: %lx(%lx), skip flush\n",
start, len);
return;
}