All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: define __current_thread_info inside of function
@ 2018-06-16 15:58 Hauke Mehrtens
  2018-07-02 13:54 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Hauke Mehrtens @ 2018-06-16 15:58 UTC (permalink / raw)
  To: ralf, paul.burton, jhogan; +Cc: linux-mips, ak, Hauke Mehrtens

__current_thread_info is currently defined in the header file, but when
we link the kernel with LTO it shows up in all files which include this
header file and causes conflicts with itself. Move the definition into
the only function which uses it to prevent these problems.

This fixes the build with LTO.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/mips/include/asm/thread_info.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index 4993db40482c..9348776e16a3 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -49,11 +49,11 @@ struct thread_info {
 	.addr_limit	= KERNEL_DS,		\
 }
 
-/* How to get the thread information struct from C.  */
-register struct thread_info *__current_thread_info __asm__("$28");
-
 static inline struct thread_info *current_thread_info(void)
 {
+	/* How to get the thread information struct from C.  */
+	register struct thread_info *__current_thread_info __asm__("$28");
+
 	return __current_thread_info;
 }
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-02 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-16 15:58 [PATCH] MIPS: define __current_thread_info inside of function Hauke Mehrtens
2018-07-02 13:54 ` Ralf Baechle

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.