Skip to content

Commit 00b01b2

Browse files
Tim Abbotthtakata
authored andcommitted
m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
Previously, asm/thread_info.h was not usable from linker scripts because it contains a piece of .macro code. Since that code was only used in the m32r entry.S, the right fix is probably to move the macro there. Signed-off-by: Tim Abbott <tabbott@ksplice.com> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
1 parent a7efb87 commit 00b01b2

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,6 @@ static inline unsigned int get_thread_fault_code(void)
125125
return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
126126
}
127127

128-
#else /* !__ASSEMBLY__ */
129-
130-
/* how to get the thread information struct from ASM */
131-
#define GET_THREAD_INFO(reg) GET_THREAD_INFO reg
132-
.macro GET_THREAD_INFO reg
133-
ldi \reg, #-THREAD_SIZE
134-
and \reg, sp
135-
.endm
136-
137128
#endif
138129

139130
/*

‎arch/m32r/kernel/entry.S‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@
118118
#define resume_kernel restore_all
119119
#endif
120120

121+
/* how to get the thread information struct from ASM */
122+
#define GET_THREAD_INFO(reg) GET_THREAD_INFO reg
123+
.macro GET_THREAD_INFO reg
124+
ldi \reg, #-THREAD_SIZE
125+
and \reg, sp
126+
.endm
127+
121128
ENTRY(ret_from_fork)
122129
pop r0
123130
bl schedule_tail

0 commit comments

Comments
 (0)