Commit e7d4f086 authored by Yury Norov's avatar Yury Norov Committed by Tomasz Nowicki
Browse files

UPSTREAM: nodemask: Switch from inline to __always_inline

'inline' keyword is only a recommendation for compiler. If it decides to
not inline nodemask functions, the whole small_const_nbits() machinery
doesn't work.

This is how a standard GCC 11.3.0 does for my x86_64 build now. This patch
replaces 'inline' directive with unconditional '__always_inline' to make
sure that there's always a chance for compile-time optimization. It doesn't
change size of kernel image, according to bloat-o-meter.

[[ Brian: split out from:
      Subject: [PATCH 1/3] bitmap: switch from inline to __always_inline
      https://lore.kernel.org/all/20221027043810.350460-2-yury.norov@gmail.com/


   But rewritten, as there were too many conflicts. ]]

Co-developed-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Reviewed-by: default avatarKees Cook <kees@kernel.org>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
(cherry picked from commit 54c9e008)

BUG=b:336854404
TEST=build kernel 6.6 with USE=gcov

Change-Id: Id9bd8ff806cd0c4b6251ee5c7cc122e435479cfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5763341


Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Signed-off-by: default avatarMateusz Urbańczyk <urbanczyk@google.com>
parent 26078592
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment