summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-02-14 14:08:48 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-04-06 21:29:17 +0400
commit04c6b3e2b5e5c1dbd99ad7620033eafd05ff4c26 (patch)
treea6f93ad79be6262819a5bc6b73f2646c4f4985dd /arch/xtensa/kernel
parent8585b316bbed9339412d267c1fd8839dd059d69f (diff)
downloadblackbird-op-linux-04c6b3e2b5e5c1dbd99ad7620033eafd05ff4c26.tar.gz
blackbird-op-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.c15
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)
OpenPOWER on IntegriCloud