mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Stian Halseth <stian@itx.no>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	linux-crypto@vger.kernel.org, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] lib/crypto: sparc/aes-xts: Add optimization using the AES opcodes
Date: Sun, 4 Oct 2026 20:02:08 +0200	[thread overview]
Message-ID: <20261004180208.GD1906@quark> (raw)
In-Reply-To: <20261002072110.1221579-1-stian@itx.no>

On Fri, Oct 02, 2026 at 09:21:10AM +0200, Stian Halseth wrote:
> +#if IS_ENABLED(CONFIG_CRYPTO_LIB_AES_XTS)
> +ENTRY(aes_sparc64_xts_encrypt_128)
[...]
> +ENTRY(aes_sparc64_xts_encrypt_256)
[...]
> +ENTRY(aes_sparc64_xts_decrypt_128)
[...]
> +ENTRY(aes_sparc64_xts_decrypt_256)

These four functions are almost identical.  They should each just invoke
a macro that expands to different code only in the parts that are
actually different, like what the __aes_xts_crypt macro in
lib/crypto/riscv/aes-riscv64-zvkned-zvbb-zvkg.S or the _aes_xts_crypt
macro in lib/crypto/x86/aes-aesni.S do.

This will generate the same object file with way fewer lines of source.

- Eric

  reply	other threads:[~2026-10-04 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  7:21 Stian Halseth
2026-10-04 18:02 ` Eric Biggers [this message]
2026-10-04 18:50   ` Stian Halseth

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=20261004180208.GD1906@quark \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=andreas@gaisler.com \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=stian@itx.no \
    /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

all inboxes | Powered by JetHome®