Commit 17d887f4 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5_ppc64

into samba.org:/scratch/anton/sfr
parents 2063c892 d2541032
...@@ -163,6 +163,11 @@ void exit_thread(void) ...@@ -163,6 +163,11 @@ void exit_thread(void)
void flush_thread(void) void flush_thread(void)
{ {
struct thread_info *t = current_thread_info();
if (t->flags & _TIF_ABI_PENDING)
t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
if (last_task_used_math == current) if (last_task_used_math == current)
last_task_used_math = NULL; last_task_used_math = NULL;
} }
......
...@@ -86,10 +86,15 @@ ppc64_elf_core_copy_regs(elf_gregset_t dstRegs, struct pt_regs* srcRegs) ...@@ -86,10 +86,15 @@ ppc64_elf_core_copy_regs(elf_gregset_t dstRegs, struct pt_regs* srcRegs)
#ifdef __KERNEL__ #ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) \ #define SET_PERSONALITY(ex, ibcs2) \
do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ do { \
set_thread_flag(TIF_32BIT); \ unsigned long new_flags = 0 \
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
new_flags = _TIF_32BIT; \
if ((current_thread_info()->flags & _TIF_32BIT) \
!= new_flags) \
set_thread_flag(TIF_ABI_PENDING); \
else \ else \
clear_thread_flag(TIF_32BIT); \ clear_thread_flag(TIF_ABI_PENDING); \
if (ibcs2) \ if (ibcs2) \
set_personality(PER_SVR4); \ set_personality(PER_SVR4); \
else if (current->personality != PER_LINUX32) \ else if (current->personality != PER_LINUX32) \
......
...@@ -85,6 +85,7 @@ static inline struct thread_info *current_thread_info(void) ...@@ -85,6 +85,7 @@ static inline struct thread_info *current_thread_info(void)
TIF_NEED_RESCHED */ TIF_NEED_RESCHED */
#define TIF_32BIT 5 /* 32 bit binary */ #define TIF_32BIT 5 /* 32 bit binary */
#define TIF_RUN_LIGHT 6 /* iSeries run light */ #define TIF_RUN_LIGHT 6 /* iSeries run light */
#define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */
/* as above, but as bit values */ /* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
...@@ -94,6 +95,7 @@ static inline struct thread_info *current_thread_info(void) ...@@ -94,6 +95,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_32BIT (1<<TIF_32BIT) #define _TIF_32BIT (1<<TIF_32BIT)
#define _TIF_RUN_LIGHT (1<<TIF_RUN_LIGHT) #define _TIF_RUN_LIGHT (1<<TIF_RUN_LIGHT)
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
_TIF_NEED_RESCHED) _TIF_NEED_RESCHED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment