aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/mca.c4
-rw-r--r--arch/ia64/kernel/signal.c10
-rw-r--r--include/asm-ia64/thread_info.h9
3 files changed, 16 insertions, 7 deletions
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 355af15287c7..ee7eec9ee576 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -766,7 +766,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
766 l = strlen(previous_current->comm); 766 l = strlen(previous_current->comm);
767 snprintf(comm, sizeof(comm), "%s %*s %d", 767 snprintf(comm, sizeof(comm), "%s %*s %d",
768 current->comm, l, previous_current->comm, 768 current->comm, l, previous_current->comm,
769 previous_current->thread_info->cpu); 769 task_thread_info(previous_current)->cpu);
770 } 770 }
771 memcpy(current->comm, comm, sizeof(current->comm)); 771 memcpy(current->comm, comm, sizeof(current->comm));
772 772
@@ -1423,7 +1423,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset,
1423 struct task_struct *p = (struct task_struct *)((char *)mca_data + offset); 1423 struct task_struct *p = (struct task_struct *)((char *)mca_data + offset);
1424 struct thread_info *ti; 1424 struct thread_info *ti;
1425 memset(p, 0, KERNEL_STACK_SIZE); 1425 memset(p, 0, KERNEL_STACK_SIZE);
1426 ti = (struct thread_info *)((char *)p + IA64_TASK_SIZE); 1426 ti = task_thread_info(p);
1427 ti->flags = _TIF_MCA_INIT; 1427 ti->flags = _TIF_MCA_INIT;
1428 ti->preempt_count = 1; 1428 ti->preempt_count = 1;
1429 ti->task = p; 1429 ti->task = p;
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 58ce07efc56e..463f6bb44d07 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -655,11 +655,11 @@ set_sigdelayed(pid_t pid, int signo, int code, void __user *addr)
655 655
656 if (!t) 656 if (!t)
657 return; 657 return;
658 t->thread_info->sigdelayed.signo = signo; 658 task_thread_info(t)->sigdelayed.signo = signo;
659 t->thread_info->sigdelayed.code = code; 659 task_thread_info(t)->sigdelayed.code = code;
660 t->thread_info->sigdelayed.addr = addr; 660 task_thread_info(t)->sigdelayed.addr = addr;
661 t->thread_info->sigdelayed.start_time = start_time; 661 task_thread_info(t)->sigdelayed.start_time = start_time;
662 t->thread_info->sigdelayed.pid = pid; 662 task_thread_info(t)->sigdelayed.pid = pid;
663 wmb(); 663 wmb();
664 set_tsk_thread_flag(t, TIF_SIGDELAYED); 664 set_tsk_thread_flag(t, TIF_SIGDELAYED);
665 } 665 }
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 171b2207bde4..653bb7f9a753 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -57,11 +57,20 @@ struct thread_info {
57/* how to get the thread information struct from C */ 57/* how to get the thread information struct from C */
58#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) 58#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
59#define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) 59#define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
60#define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
60#else 61#else
61#define current_thread_info() ((struct thread_info *) 0) 62#define current_thread_info() ((struct thread_info *) 0)
62#define alloc_thread_info(tsk) ((struct thread_info *) 0) 63#define alloc_thread_info(tsk) ((struct thread_info *) 0)
64#define task_thread_info(tsk) ((struct thread_info *) 0)
63#endif 65#endif
64#define free_thread_info(ti) /* nothing */ 66#define free_thread_info(ti) /* nothing */
67#define task_stack_page(tsk) ((void *)(tsk))
68
69#define __HAVE_THREAD_FUNCTIONS
70#define setup_thread_stack(p, org) \
71 *task_thread_info(p) = *task_thread_info(org); \
72 task_thread_info(p)->task = (p);
73#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
65 74
66#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR 75#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
67#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER)) 76#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER))