Skip to content

Commit 40f1f0d

Browse files
Al ViroLinus Torvalds
authored andcommitted
[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>
1 parent 513091b commit 40f1f0d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎arch/parisc/kernel/process.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
295295
struct task_struct * p, struct pt_regs * pregs)
296296
{
297297
struct pt_regs * cregs = &(p->thread.regs);
298-
struct thread_info *ti = p->thread_info;
298+
void *stack = task_stack_page(p);
299299

300300
/* We have to use void * instead of a function pointer, because
301301
* 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,
322322
*/
323323
if (usp == 1) {
324324
/* kernel thread */
325-
cregs->ksp = (((unsigned long)(ti)) + THREAD_SZ_ALGN);
325+
cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN;
326326
/* Must exit via ret_from_kernel_thread in order
327327
* to call schedule_tail()
328328
*/
@@ -344,7 +344,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
344344
*/
345345

346346
/* Use same stack depth as parent */
347-
cregs->ksp = ((unsigned long)(ti))
347+
cregs->ksp = (unsigned long)stack
348348
+ (pregs->gr[21] & (THREAD_SIZE - 1));
349349
cregs->gr[30] = usp;
350350
if (p->personality == PER_HPUX) {

‎arch/parisc/kernel/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ int __init smp_boot_one_cpu(int cpuid)
517517
if (IS_ERR(idle))
518518
panic("SMP: fork failed for CPU:%d", cpuid);
519519

520-
idle->thread_info->cpu = cpuid;
520+
task_thread_info(idle)->cpu = cpuid;
521521

522522
/* Let _start know what logical CPU we're booting
523523
** (offset into init_tasks[],cpu_data[])

0 commit comments

Comments
 (0)