diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2014-02-14 11:08:48 +0100 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-04-06 19:29:17 +0200 |
commit | 04c6b3e2b5e5c1dbd99ad7620033eafd05ff4c26 (patch) | |
tree | a6f93ad79be6262819a5bc6b73f2646c4f4985dd /arch/xtensa/kernel | |
parent | xtensa: dump sysmem from the bootmem_init (diff) | |
download | linux-04c6b3e2b5e5c1dbd99ad7620033eafd05ff4c26.tar.xz linux-04c6b3e2b5e5c1dbd99ad7620033eafd05ff4c26.zip |
xtensa: optimize local_flush_tlb_kernel_range
Don't flush whole TLB if only a small kernel range is requested.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/smp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index aa8bd8717927..40b5a3771fb0 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c @@ -496,6 +496,21 @@ void flush_tlb_range(struct vm_area_struct *vma, on_each_cpu(ipi_flush_tlb_range, &fd, 1); } +static void ipi_flush_tlb_kernel_range(void *arg) +{ + struct flush_data *fd = arg; + local_flush_tlb_kernel_range(fd->addr1, fd->addr2); +} + +void flush_tlb_kernel_range(unsigned long start, unsigned long end) +{ + struct flush_data fd = { + .addr1 = start, + .addr2 = end, + }; + on_each_cpu(ipi_flush_tlb_kernel_range, &fd, 1); +} + /* Cache flush functions */ static void ipi_flush_cache_all(void *arg) |