summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2019-08-12 19:13:20 +0200
committerHelge Deller <deller@gmx.de>2019-08-12 19:17:40 +0200
commita5ff2130a4d98d22377e5fdab87d713f4b17f4f2 (patch)
tree72d50c4107f39ee0482ef751c7ce9239a14d6f8d /arch/parisc
parent82992fc70f98dee091faa926eb5cecadda5c84f4 (diff)
downloadlinux-a5ff2130a4d98d22377e5fdab87d713f4b17f4f2.tar.bz2
parisc: speed up flush_tlb_all_local with qemu
When started in qemu, we know that qemu will drop all local TLB entries on any pxtlbe instruction. So, if we detect qemu, replace the whole flush_tlb_all_local function by one pdtlbe instruction. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/pacache.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
index df46b0e5a915..fa092ed1e837 100644
--- a/arch/parisc/kernel/pacache.S
+++ b/arch/parisc/kernel/pacache.S
@@ -174,6 +174,15 @@ fdtdone:
2: bv %r0(%r2)
nop
+
+ /*
+ * When running in qemu, drop whole flush_tlb_all_local function and
+ * replace by one pdtlbe instruction, for which QEMU will drop all
+ * local TLB entries.
+ */
+3: pdtlbe %r0(%sr1,%r0)
+ bv,n %r0(%r2)
+ ALTERNATIVE_CODE(flush_tlb_all_local, 2, ALT_COND_RUN_ON_QEMU, 3b)
ENDPROC_CFI(flush_tlb_all_local)
.import cache_info,data