Skip to content

Commit

Permalink
m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tim Abbott authored and Hirokazu Takata committed Sep 22, 2009
1 parent a7efb87 commit 00b01b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 0 additions & 9 deletions arch/m32r/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,6 @@ static inline unsigned int get_thread_fault_code(void)
return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
}

#else /* !__ASSEMBLY__ */

/* how to get the thread information struct from ASM */
#define GET_THREAD_INFO(reg) GET_THREAD_INFO reg
.macro GET_THREAD_INFO reg
ldi \reg, #-THREAD_SIZE
and \reg, sp
.endm

#endif

/*
Expand Down
7 changes: 7 additions & 0 deletions arch/m32r/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@
#define resume_kernel restore_all
#endif

/* how to get the thread information struct from ASM */
#define GET_THREAD_INFO(reg) GET_THREAD_INFO reg
.macro GET_THREAD_INFO reg
ldi \reg, #-THREAD_SIZE
and \reg, sp
.endm

ENTRY(ret_from_fork)
pop r0
bl schedule_tail
Expand Down

0 comments on commit 00b01b2

Please sign in to comment.