Skip to content

generic/bitops: Always inline some more generic helpers

Borislav Petkov lkml 1 version Applied

Status from this message: The following commit has been merged into the locking/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2asm-generic/bitops: Always inline all bit manipulation helpersinclude/asm-generic/bitops/instrumented-atomic.h include/asm-generic/bitops/instrumented-non-atomic.h+14 -140 replies
2/2cpumask: Always inline helpers which use bit manipulation functionsinclude/linux/cpumask.h+7 -70 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarco Elver
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] generic/bitops: Always inline some more generic helpers

From: Borislav Petkov <[email protected]>

Hi all,

a build report by the 0day robot:

https://lore.kernel.org/r/Yc7t934f%2Bf/[email protected]

made me look at asm and how gcc, at least, generates funky calls to the *_bit() bit manipulation functions on x86 instead of inlining them into the call sites as on x86 that's a single insn, in most of the cases.

So PeterZ says the way to go is to always inline them. So here they are. The fun thing is that on x86 there is even a size decrease of more than a Kilobyte for a defconfig, which is nice, see patch 1.

As always, comments and suggestions are welcome.

Thx.

Borislav Petkov (2):
asm-generic/bitops: Always inline all bit manipulation helpers
cpumask: Always inline helpers which use bit manipulation functions

 include/asm-generic/bitops/instrumented-atomic.h | 12 ++++++------
 .../asm-generic/bitops/instrumented-non-atomic.h | 16 ++++++++--------
 include/linux/cpumask.h                          | 14 +++++++-------
 3 files changed, 21 insertions(+), 21 deletions(-)
Signature · 1 line
2.29.2