Skip to content

Commit fe92da0

Browse files
dsandersllvmralfbaechle
authored andcommitted
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 <daniel.sanders@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: David Daney <ddaney.cavm@gmail.com> Acked-by: Behan Webster <behanw@converseincode.com> Patchwork: https://patchwork.linux-mips.org/patch/9311/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 65c6896 commit fe92da0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/mips/include/asm/thread_info.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ struct thread_info {
5555
#define init_stack (init_thread_union.stack)
5656

5757
/* How to get the thread information struct from C. */
58+
register struct thread_info *__current_thread_info __asm__("$28");
59+
5860
static inline struct thread_info *current_thread_info(void)
5961
{
60-
register struct thread_info *__current_thread_info __asm__("$28");
61-
6262
return __current_thread_info;
6363
}
6464

0 commit comments

Comments
 (0)