linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Kristina Martsenko <kristina.martsenko@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH 5/5] arm64: lib: Use MOPS for copy_page() and clear_page()
Date: Wed, 2 Oct 2024 16:37:56 +0100	[thread overview]
Message-ID: <Zv1o1C7mJ4CU1RMy@arm.com> (raw)
In-Reply-To: <20240930161051.3777828-6-kristina.martsenko@arm.com>

On Mon, Sep 30, 2024 at 05:10:51PM +0100, Kristina Martsenko wrote:
> Similarly to what was done to the memcpy() routines, make copy_page()
> and clear_page() also use the Armv8.8 FEAT_MOPS instructions.
> 
> Note: For copy_page() this uses the CPY* instructions instead of CPYF*
> as CPYF* doesn't allow src and dst to be equal. It's not clear if
> copy_page() needs to allow equal src and dst but it has worked so far
> with the current implementation and there is no documentation forbidding
> it.

When we get real hardware, if CPYF* is faster we should switch to these
instructions. I wouldn't expect source and destination to be the same
but we can add a check.

>  SYM_FUNC_START(__pi_copy_page)
> +#ifdef CONFIG_AS_HAS_MOPS
> +	.arch_extension mops
> +alternative_if_not ARM64_HAS_MOPS
> +	b	.Lno_mops
> +alternative_else_nop_endif

Same comment as on the previous patch w.r.t. the branch.

-- 
Catalin


  reply	other threads:[~2024-10-02 15:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 16:10 [PATCH 0/5] arm64: Use memory copy instructions in kernel routines Kristina Martsenko
2024-09-30 16:10 ` [PATCH 1/5] arm64: probes: Disable kprobes/uprobes on MOPS instructions Kristina Martsenko
2024-10-02 10:28   ` Catalin Marinas
2024-09-30 16:10 ` [PATCH 2/5] arm64: mops: Handle MOPS exceptions from EL1 Kristina Martsenko
2024-09-30 16:10 ` [PATCH 3/5] arm64: mops: Document booting requirement for HCR_EL2.MCE2 Kristina Martsenko
2024-10-02 10:38   ` Catalin Marinas
2024-10-02 13:31     ` Kristina Martsenko
2024-10-02 17:09       ` Catalin Marinas
2024-09-30 16:10 ` [PATCH 4/5] arm64: lib: Use MOPS for memcpy() routines Kristina Martsenko
2024-10-02 15:29   ` Catalin Marinas
2024-10-03 16:46     ` Kristina Martsenko
2024-10-04 10:07       ` Catalin Marinas
2024-10-16 13:08         ` Kristina Martsenko
2024-10-17 11:57           ` Catalin Marinas
2024-09-30 16:10 ` [PATCH 5/5] arm64: lib: Use MOPS for copy_page() and clear_page() Kristina Martsenko
2024-10-02 15:37   ` Catalin Marinas [this message]
2024-10-02 16:20 ` [PATCH 0/5] arm64: Use memory copy instructions in kernel routines Catalin Marinas
2024-10-03 16:49   ` Kristina Martsenko
2024-10-04 10:10     ` Catalin Marinas
2024-10-17 18:00 ` Catalin Marinas

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=Zv1o1C7mJ4CU1RMy@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.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).