summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 12:05:55 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 20:08:55 +0300
commit40f1f0deaff90b78b81dbba109bfa1cef241ec16 (patch)
treed4c3ca3c4a26df585b5cd24e7ae63ac3c246f4e3 /arch
parent513091ba7e4a8b498632d7913ff9408ebbca6235 (diff)
downloadlinux-40f1f0deaff90b78b81dbba109bfa1cef241ec16.tar.xz
[PATCH] parisc: task_stack_page(), task_thread_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/kernel/process.c6
-rw-r--r--arch/parisc/kernel/smp.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 4eb70a40ec7e..5da41677e70b 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -295,7 +295,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
struct task_struct * p, struct pt_regs * pregs)
{
struct pt_regs * cregs = &(p->thread.regs);
- struct thread_info *ti = p->thread_info;
+ void *stack = task_stack_page(p);
/* We have to use void * instead of a function pointer, because
* function pointers aren't a pointer to the function on 64-bit.
@@ -322,7 +322,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
*/
if (usp == 1) {
/* kernel thread */
- cregs->ksp = (((unsigned long)(ti)) + THREAD_SZ_ALGN);
+ cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN;
/* Must exit via ret_from_kernel_thread in order
* to call schedule_tail()
*/
@@ -344,7 +344,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
*/
/* Use same stack depth as parent */
- cregs->ksp = ((unsigned long)(ti))
+ cregs->ksp = (unsigned long)stack
+ (pregs->gr[21] & (THREAD_SIZE - 1));
cregs->gr[30] = usp;
if (p->personality == PER_HPUX) {
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 17f23c26f1ca..25564b7ca6bb 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -517,7 +517,7 @@ int __init smp_boot_one_cpu(int cpuid)
if (IS_ERR(idle))
panic("SMP: fork failed for CPU:%d", cpuid);
- idle->thread_info->cpu = cpuid;
+ task_thread_info(idle)->cpu = cpuid;
/* Let _start know what logical CPU we're booting
** (offset into init_tasks[],cpu_data[])