From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: hibernate: reduce TLB maintenance scope
Date: Fri, 12 Aug 2016 19:07:07 +0100 [thread overview]
Message-ID: <57AE104B.7010209@arm.com> (raw)
In-Reply-To: <1470651127-18386-1-git-send-email-mark.rutland@arm.com>
On 08/08/16 11:12, Mark Rutland wrote:
> In break_before_make_ttbr_switch we perform broadcast TLB maintenance
> for the inner shareable domain, and use a DSB ISH to complete this.
> However, at the point we execute this, secondary CPUs are either
> physically offline, or executing code outside of the kernel. Upon
> entering the kernel, secondary CPUs will invalidate their TLBs before
> enabling their MMUs.
>
> Thus we do not need to invalidate TLBs of other CPUs, and as with
> idmap_cpu_replace_ttbr1 we can reduce the scope of maintenance to the
> TLBs of the local CPU. This keeps our TLB maintenance code consistent,
> and is a minor optimisation.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: James Morse <james.morse@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/kernel/hibernate-asm.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/hibernate-asm.S b/arch/arm64/kernel/hibernate-asm.S
> index 46f29b6..7734f3e 100644
> --- a/arch/arm64/kernel/hibernate-asm.S
> +++ b/arch/arm64/kernel/hibernate-asm.S
> @@ -36,8 +36,8 @@
> .macro break_before_make_ttbr_switch zero_page, page_table
> msr ttbr1_el1, \zero_page
> isb
> - tlbi vmalle1is
> - dsb ish
> + tlbi vmalle1
> + dsb nsh
> msr ttbr1_el1, \page_table
> isb
> .endm
>
Looks like what I should have done from the beginning!
Acked-by: James Morse <james.morse@arm.com>
Thanks,
James
prev parent reply other threads:[~2016-08-12 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 10:12 [PATCH] arm64: hibernate: reduce TLB maintenance scope Mark Rutland
2016-08-12 18:07 ` James Morse [this message]
Reply instructions:
You may reply publicly 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57AE104B.7010209@arm.com \
--to=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).