]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] arm: task_stack_page()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 12 Jan 2006 09:05:58 +0000 (01:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 17:08:56 +0000 (09:08 -0800)
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>
arch/arm/kernel/process.c
arch/arm/kernel/smp.c
arch/arm/kernel/traps.c
include/asm-arm/processor.h

index ac6ed955ca0f41f72e83154ddf0a325864c1c92e..4b4e4cf79c8070e0cfd055bdf3a72a93efd61027 100644 (file)
@@ -460,7 +460,7 @@ unsigned long get_wchan(struct task_struct *p)
                return 0;
 
        stack_start = (unsigned long)end_of_stack(p);
-       stack_end = ((unsigned long)p->thread_info) + THREAD_SIZE;
+       stack_end = (unsigned long)task_stack_page(p) + THREAD_SIZE;
 
        fp = thread_saved_fp(p);
        do {
index 373c0959bc2f64ff02e72610e3091f53b6cd9763..7338948bd7d38046e355807e73c44413d3db40d7 100644 (file)
@@ -114,7 +114,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
         * We need to tell the secondary core where to find
         * its stack and the page tables.
         */
-       secondary_data.stack = (void *)idle->thread_info + THREAD_START_SP;
+       secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
        secondary_data.pgdir = virt_to_phys(pgd);
        wmb();
 
@@ -245,7 +245,7 @@ void __cpuexit cpu_die(void)
        __asm__("mov    sp, %0\n"
        "       b       secondary_start_kernel"
                :
-               : "r" ((void *)current->thread_info + THREAD_SIZE - 8));
+               : "r" (task_stack_page(current) + THREAD_SIZE - 8));
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
index c1a04ec830d1b2a70958ea551234b52a001c2bf1..93cfd3ffcc72b6cbc90ff6c7ff8f808b15e3ea15 100644 (file)
@@ -210,7 +210,7 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p
 
        if (!user_mode(regs) || in_interrupt()) {
                dump_mem("Stack: ", regs->ARM_sp,
-                        THREAD_SIZE + (unsigned long)tsk->thread_info);
+                        THREAD_SIZE + (unsigned long)task_stack_page(tsk));
                dump_backtrace(regs, tsk);
                dump_instr(regs);
        }
index fb5877e5a39bdb2c7b6bb221c70b1e29c33fbb58..31290694648b095d2a4595c91a9b2825bb72bf6b 100644 (file)
@@ -86,7 +86,7 @@ unsigned long get_wchan(struct task_struct *p);
 extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
 #define task_pt_regs(p) \
-       ((struct pt_regs *)(THREAD_START_SP + (void *)(p)->thread_info) - 1)
+       ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
 
 #define KSTK_EIP(tsk)  task_pt_regs(tsk)->ARM_pc
 #define KSTK_ESP(tsk)  task_pt_regs(tsk)->ARM_sp