1
0
Fork 0
alistair23-linux/include
David Rientjes 9a04dbcfb3 compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled
The motivation for commit abb2ea7dfd ("compiler, clang: suppress
warning for unused static inline functions") was to suppress clang's
warnings about unused static inline functions.

For configs without CONFIG_OPTIMIZE_INLINING enabled, such as any non-x86
architecture, `inline' in the kernel implies that
__attribute__((always_inline)) is used.

Some code depends on that behavior, see
  https://lkml.org/lkml/2017/6/13/918:

  net/built-in.o: In function `__xchg_mb':
  arch/arm64/include/asm/cmpxchg.h:99: undefined reference to `__compiletime_assert_99'
  arch/arm64/include/asm/cmpxchg.h:99: undefined reference to `__compiletime_assert_99

The full fix would be to identify these breakages and annotate the
functions with __always_inline instead of `inline'.  But since we are
late in the 4.12-rc cycle, simply carry forward the forced inlining
behavior and work toward moving arm64, and other architectures, toward
CONFIG_OPTIMIZE_INLINING behavior.

Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1706261552200.1075@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Sodagudi Prasad <psodagud@codeaurora.org>
Tested-by: Sodagudi Prasad <psodagud@codeaurora.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-06 16:24:29 -07:00
..
acpi arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
asm-generic clocksource/drivers: Rename CLKSRC_OF to TIMER_OF 2017-06-14 12:01:03 +02:00
clocksource
crypto crypto: engine - replace pr_xxx by dev_xxx 2017-06-19 14:19:54 +08:00
drm drm/dp: start a DPCD based DP sink/branch device quirk database 2017-05-29 13:43:26 +03:00
dt-bindings ARM: 64-bit DT updates 2017-07-04 14:50:59 -07:00
keys
kvm KVM: arm/arm64: Fix bug when registering redist iodevs 2017-05-18 11:18:12 +02:00
linux compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled 2017-07-06 16:24:29 -07:00
math-emu
media [media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED 2017-06-08 16:52:28 -03:00
memory
misc
net Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2017-07-06 08:59:41 -07:00
pcmcia
ras trace, ras: add ARM processor error trace event 2017-06-22 18:22:05 +01:00
rdma Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-07-05 11:26:35 -07:00
rxrpc rxrpc: Implement service upgrade 2017-06-05 14:30:49 +01:00
scsi Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2017-07-06 09:41:58 -07:00
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
sound ASoC: Updates for v4.12 2017-05-02 08:25:25 +02:00
target iscsi-target: Fix initial login PDU asynchronous socket close OOPs 2017-05-31 15:12:31 -07:00
trace Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2017-07-06 08:59:41 -07:00
uapi Merge branch 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux 2017-07-05 16:41:23 -07:00
video uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
xen xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00