mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 18:43:21 +01:00
MIPS: Changed current_thread_info() to an equivalent supported by both clang and GCC
Without this, a 'break' instruction is executed very early in the boot and the boot hangs. The problem is that clang doesn't honour named registers on local variables and silently treats them as normal uninitialized variables. However, it does honour them on global variables. Signed-off-by: Daniel Sanders <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul Burton <[email protected]> Cc: Markos Chandras <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: Behan Webster <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/9311/ Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
1 parent
65c6896d26
commit
fe92da0f35
1 file changed
+2
-2
@@ -55,10 +55,10 @@ struct thread_info {
|
||||
#define init_stack (init_thread_union.stack)
|
||||
|
||||
/* 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)
|
||||
{
|
||||
register struct thread_info *__current_thread_info __asm__("$28");
|
||||
|
||||
return __current_thread_info;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user