From: psodagud@codeaurora.org (Sodagudi Prasad)
To: linux-arm-kernel@lists.infradead.org
Subject: Using __always_inline attribute
Date: Tue, 13 Jun 2017 15:39:37 -0700 [thread overview]
Message-ID: <2a762f1f3b355e71c5bca6a6e00bffe0@codeaurora.org> (raw)
Hi All,
With a variant of a CLANG(based on 4.0) following errors observed on
Linux 4.12-rc5 tag.
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
Clang does not seems to be marking this macro as inline and causing
above compilation issue due to BUILD_BUG().
We added __always_inline attribute to this macro as shown below, so
that clang forces this macro to be always inline.
Based on definition of __xchg##sfx, it should always be inline. Can we
force this macro to be __always_inline ?
diff --git a/arch/arm64/include/asm/cmpxchg.h
b/arch/arm64/include/asm/cmpxchg.h
index ae852ad..ce57cec 100644
--- a/arch/arm64/include/asm/cmpxchg.h
+++ b/arch/arm64/include/asm/cmpxchg.h
@@ -73,7 +73,7 @@
#undef __XCHG_CASE
#define __XCHG_GEN(sfx)
\
-static inline unsigned long __xchg##sfx(unsigned long x,
\
+static __always_inline unsigned long __xchg##sfx(unsigned long x,
\
volatile void *ptr,
\
int size)
\
{
\
-Thanks, Prasad
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
Linux Foundation Collaborative Project
WARNING: multiple messages have this Message-ID (diff)
From: Sodagudi Prasad <psodagud@codeaurora.org>
To: catalin.marinas@arm.com, will.deacon@arm.com, mingo@kernel.org,
peterz@infradead.org, mark.rutland@arm.com
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Using __always_inline attribute
Date: Tue, 13 Jun 2017 15:39:37 -0700 [thread overview]
Message-ID: <2a762f1f3b355e71c5bca6a6e00bffe0@codeaurora.org> (raw)
Hi All,
With a variant of a CLANG(based on 4.0) following errors observed on
Linux 4.12-rc5 tag.
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
Clang does not seems to be marking this macro as inline and causing
above compilation issue due to BUILD_BUG().
We added __always_inline attribute to this macro as shown below, so
that clang forces this macro to be always inline.
Based on definition of __xchg##sfx, it should always be inline. Can we
force this macro to be __always_inline ?
diff --git a/arch/arm64/include/asm/cmpxchg.h
b/arch/arm64/include/asm/cmpxchg.h
index ae852ad..ce57cec 100644
--- a/arch/arm64/include/asm/cmpxchg.h
+++ b/arch/arm64/include/asm/cmpxchg.h
@@ -73,7 +73,7 @@
#undef __XCHG_CASE
#define __XCHG_GEN(sfx)
\
-static inline unsigned long __xchg##sfx(unsigned long x,
\
+static __always_inline unsigned long __xchg##sfx(unsigned long x,
\
volatile void *ptr,
\
int size)
\
{
\
-Thanks, Prasad
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
Linux Foundation Collaborative Project
next reply other threads:[~2017-06-13 22:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 22:39 Sodagudi Prasad [this message]
2017-06-13 22:39 ` Using __always_inline attribute Sodagudi Prasad
2017-06-14 10:06 ` Will Deacon
2017-06-14 10:06 ` Will Deacon
2017-06-14 22:33 ` Sodagudi Prasad
2017-06-14 22:33 ` Sodagudi Prasad
2017-06-15 0:50 ` Sodagudi Prasad
2017-06-15 0:50 ` Sodagudi Prasad
2017-06-15 15:54 ` Mark Rutland
2017-06-15 15:54 ` Mark Rutland
2017-06-19 15:53 ` [PATCH] compiler, clang: Add always_inline attribute to inline Prasad Sodagudi
2017-06-19 15:53 ` Prasad Sodagudi
2017-06-19 20:25 ` David Rientjes
2017-06-19 20:25 ` David Rientjes
2017-06-19 21:14 ` Sodagudi Prasad
2017-06-19 21:14 ` Sodagudi Prasad
2017-06-19 21:42 ` David Rientjes
2017-06-19 21:42 ` David Rientjes
2017-06-19 22:19 ` Sodagudi Prasad
2017-06-19 22:19 ` Sodagudi Prasad
2017-06-20 10:59 ` Mark Rutland
2017-06-20 10:59 ` Mark Rutland
2017-06-20 23:12 ` David Rientjes
2017-06-20 23:12 ` David Rientjes
2017-06-22 9:43 ` Mark Rutland
2017-06-22 9:43 ` Mark Rutland
2017-06-23 6:45 ` Sodagudi Prasad
2017-06-23 6:45 ` Sodagudi Prasad
2017-06-20 10:52 ` Mark Rutland
2017-06-20 10:52 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a762f1f3b355e71c5bca6a6e00bffe0@codeaurora.org \
--to=psodagud@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.