All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] arm64: gcc asm flag outputs
@ 2020-03-11 18:04 Richard Henderson
  2020-03-11 18:04 ` [PATCH 1/6] arm64: Add asm/ccset.h header Richard Henderson
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Richard Henderson @ 2020-03-11 18:04 UTC (permalink / raw)
  To: linux-arm-kernel

With gcc 10, arm64 includes support for flag outputs, much like
x86 has done for years.

The most effective use of this within the kernel is in uaccess,
where we can branch directly on the Carry flag output, e.g.

	adds    x3, x2, #0x2
	csel    x1, xzr, x1, hi
	csinv   x3, x3, xzr, cc
	sbcs    xzr, x3, x1
	b.ls    ffff800010084b5c <aarch32_break_handler+0xec>

Changing __arm64_rndr has very few uses, and so the effect is
very minor, but is also changed for consistency.

Finally, a mostly unrelated fix to uaccess.h, which I noticed
while poking around the header and looking at the assembly.
Has no effect on generic kernels that include ARMv8.3 support,
but eliminates a branch if one starts to play with the knobs.


r~


Richard Henderson (6):
  arm64: Add asm/ccset.h header
  arm64: uaccess: Use named asm operands for __in_range
  arm64: uaccess: Untie the input address in __range_ok
  arm64: uaccess: Use asm/ccset.h macros in __range_ok
  arm64: archrandom: Use asm/ccset.h macros in __arm64_rndr
  arm64: Hoist CONFIG option out of ALTERNATIVE in uaccess.h

 arch/arm64/include/asm/archrandom.h |  7 +++--
 arch/arm64/include/asm/ccset.h      | 19 ++++++++++++
 arch/arm64/include/asm/uaccess.h    | 46 ++++++++++++++++-------------
 3 files changed, 48 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm64/include/asm/ccset.h

-- 
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] 18+ messages in thread

end of thread, other threads:[~2020-03-13 17:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 18:04 [PATCH 0/6] arm64: gcc asm flag outputs Richard Henderson
2020-03-11 18:04 ` [PATCH 1/6] arm64: Add asm/ccset.h header Richard Henderson
2020-03-13 10:54   ` Mark Rutland
2020-03-13 16:29     ` Richard Henderson
2020-03-11 18:04 ` [PATCH 2/6] arm64: uaccess: Use named asm operands for __in_range Richard Henderson
2020-03-11 19:08   ` Robin Murphy
2020-03-11 21:48     ` Richard Henderson
2020-03-13 16:14       ` Robin Murphy
2020-03-11 18:04 ` [PATCH 3/6] arm64: uaccess: Untie the input address in __range_ok Richard Henderson
2020-03-11 19:08   ` Robin Murphy
2020-03-11 18:04 ` [PATCH 4/6] arm64: uaccess: Use asm/ccset.h macros " Richard Henderson
2020-03-12 11:48   ` Robin Murphy
2020-03-13 11:04   ` Mark Rutland
2020-03-13 16:51     ` Robin Murphy
2020-03-13 17:14       ` Mark Rutland
2020-03-11 18:04 ` [PATCH 5/6] arm64: archrandom: Use asm/ccset.h macros in __arm64_rndr Richard Henderson
2020-03-11 18:04 ` [PATCH 6/6] arm64: Hoist CONFIG option out of ALTERNATIVE in uaccess.h Richard Henderson
2020-03-13 10:46   ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.