archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <>
To: Catalin Marinas <>, Will Deacon <>
Cc: Mark Rutland <>,
	Lorenzo Pieralisi <>,
	Sudeep Holla <>,
	Marc Zyngier <>, Ard Biesheuvel <>,,
	Mark Brown <>
Subject: [PATCH v2 0/2] arm64: Implement SMCCC v1.3 SVE register saving hint
Date: Tue, 18 May 2021 19:25:47 +0100	[thread overview]
Message-ID: <> (raw)

SMCCC v1.3 provides support for a flag which allows the caller to say
that there is no state that needs to be preserved in the SVE registers,
meaning that the called code can skip doing this, especially with larger
vector lengths this can save a noticable amount of work in the event
that the state needs to be saved. Implement support for this, using the
TIF_ flags to report if there is live SVE state present.

This overlaps with Sudeep's patch "arm64: smccc: Add support for
SMCCCv1.2 extended input/output registers"[1] although there shouldn't
be any conflicts, that adds some new SMCCC calls for v1.2 - the new
functions for v1.2 calls will need updating to take advantage of the
hint bit.

 - Use ldr_l rather than adrp/ldr so we load the hint flag rather than
   the start of the 4K block the hint flag happens to be in.
 - Disable the optimisation when running in nVHE so we don't try to jump
   to a function that isn't mapped or look at a current task that isn't
 - Use _TIF for a bitfield like we should've done first time round.


Mark Brown (2):
  arm64: asmlinkage: Enable use of BTI_C macro in SYM_CODE
  arm64: smccc: Support SMCCC v1.3 SVE register saving hint

 arch/arm64/include/asm/linkage.h |  4 ++++
 arch/arm64/kernel/smccc-call.S   | 38 ++++++++++++++++++++++++++++++++
 drivers/firmware/smccc/smccc.c   |  4 ++++
 include/linux/arm-smccc.h        | 23 +++++++++++++++++--
 4 files changed, 67 insertions(+), 2 deletions(-)

base-commit: d07f6ca923ea0927a1024dfccafc5b53b61cfecc

linux-arm-kernel mailing list

             reply	other threads:[~2021-05-18 18:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 18:25 Mark Brown [this message]
2021-05-18 18:25 ` [PATCH v2 1/2] arm64: asmlinkage: Enable use of BTI_C macro in SYM_CODE Mark Brown
2021-05-18 18:25 ` [PATCH v2 2/2] arm64: smccc: Support SMCCC v1.3 SVE register saving hint Mark Brown
2021-05-19  7:05   ` Ard Biesheuvel
2021-05-19 13:07     ` Mark Brown

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:

* 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
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).