linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: Implement SMCCC v1.3 SVE register saving hint
@ 2021-05-18 18:25 Mark Brown
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Brown @ 2021-05-18 18:25 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Mark Rutland, Lorenzo Pieralisi, Sudeep Holla, Marc Zyngier,
	Ard Biesheuvel, linux-arm-kernel, Mark Brown

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.

v2:
 - 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
   meaningful.
 - Use _TIF for a bitfield like we should've done first time round.

[1] https://lore.kernel.org/r/20210518163618.43950-1-sudeep.holla@arm.com

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-19 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 18:25 [PATCH v2 0/2] arm64: Implement SMCCC v1.3 SVE register saving hint Mark Brown
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

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