Linux-parisc archive on
 help / color / Atom feed
From: Helge Deller <>
	James Bottomley <>,
	John David Anglin <>
Subject: [PATCH] parisc: speed up flush_tlb_all_local with qemu
Date: Mon, 12 Aug 2019 19:13:20 +0200
Message-ID: <> (raw)

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 <>

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)
+	/*
+	 * 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)

 	.import cache_info,data

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-parisc archive on

Archives are clonable:
	git clone --mirror linux-parisc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-parisc linux-parisc/ \
	public-inbox-index linux-parisc

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox