Skip to content
Commit eb936858 authored by Paul Walmsley's avatar Paul Walmsley
Browse files

riscv: fix flush_tlb_range() end address for flush_tlb_page()



The RISC-V kernel implementation of flush_tlb_page() when CONFIG_SMP
is set is wrong.  It passes zero to flush_tlb_range() as the final
address to flush, but it should be at least 'addr'.

Some other Linux architecture ports use the beginning address to
flush, plus PAGE_SIZE, as the final address to flush.  This might
flush slightly more than what's needed, but it seems unlikely that
being more clever would improve anything.  So let's just take that
implementation for now.

While here, convert the macro into a static inline function, primarily
to avoid unintentional multiple evaluations of 'addr'.

This second version of the patch fixes a coding style issue found by
Christoph Hellwig <hch@lst.de>.

Reported-by: default avatarAndreas Schwab <schwab@suse.de>
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent d45331b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment