Skip to content

Commit

Permalink
sifive/sifive_l2_cache: Print a backtrace on out-of-range flushes
Browse files Browse the repository at this point in the history
This makes it easier to find out which driver passes a wrong address
range.

Signed-off-by: Geert Uytterhoeven <[email protected]>
  • Loading branch information
geertu authored and esmil committed Dec 27, 2021
1 parent e090c47 commit 4e0ad81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/soc/sifive/sifive_l2_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4e0ad81

Please sign in to comment.