diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:05:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:56 -0500 |
commit | 32d39a9355780bc9aadcf76a2d2004bdbe0f4665 (patch) | |
tree | bd3003a3b13be7d4766e63dbb4c95472bc708125 | |
parent | 552058239238342dfd2fa8d33a299a162b1a4f05 (diff) |
[PATCH] arm: task_stack_page()
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>
-rw-r--r-- | arch/arm/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 2 | ||||
-rw-r--r-- | include/asm-arm/processor.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index ac6ed955ca0f..4b4e4cf79c80 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -460,7 +460,7 @@ unsigned long get_wchan(struct task_struct *p) | |||
460 | return 0; | 460 | return 0; |
461 | 461 | ||
462 | stack_start = (unsigned long)end_of_stack(p); | 462 | stack_start = (unsigned long)end_of_stack(p); |
463 | stack_end = ((unsigned long)p->thread_info) + THREAD_SIZE; | 463 | stack_end = (unsigned long)task_stack_page(p) + THREAD_SIZE; |
464 | 464 | ||
465 | fp = thread_saved_fp(p); | 465 | fp = thread_saved_fp(p); |
466 | do { | 466 | do { |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 373c0959bc2f..7338948bd7d3 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -114,7 +114,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
114 | * We need to tell the secondary core where to find | 114 | * We need to tell the secondary core where to find |
115 | * its stack and the page tables. | 115 | * its stack and the page tables. |
116 | */ | 116 | */ |
117 | secondary_data.stack = (void *)idle->thread_info + THREAD_START_SP; | 117 | secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; |
118 | secondary_data.pgdir = virt_to_phys(pgd); | 118 | secondary_data.pgdir = virt_to_phys(pgd); |
119 | wmb(); | 119 | wmb(); |
120 | 120 | ||
@@ -245,7 +245,7 @@ void __cpuexit cpu_die(void) | |||
245 | __asm__("mov sp, %0\n" | 245 | __asm__("mov sp, %0\n" |
246 | " b secondary_start_kernel" | 246 | " b secondary_start_kernel" |
247 | : | 247 | : |
248 | : "r" ((void *)current->thread_info + THREAD_SIZE - 8)); | 248 | : "r" (task_stack_page(current) + THREAD_SIZE - 8)); |
249 | } | 249 | } |
250 | #endif /* CONFIG_HOTPLUG_CPU */ | 250 | #endif /* CONFIG_HOTPLUG_CPU */ |
251 | 251 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index c1a04ec830d1..93cfd3ffcc72 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -210,7 +210,7 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p | |||
210 | 210 | ||
211 | if (!user_mode(regs) || in_interrupt()) { | 211 | if (!user_mode(regs) || in_interrupt()) { |
212 | dump_mem("Stack: ", regs->ARM_sp, | 212 | dump_mem("Stack: ", regs->ARM_sp, |
213 | THREAD_SIZE + (unsigned long)tsk->thread_info); | 213 | THREAD_SIZE + (unsigned long)task_stack_page(tsk)); |
214 | dump_backtrace(regs, tsk); | 214 | dump_backtrace(regs, tsk); |
215 | dump_instr(regs); | 215 | dump_instr(regs); |
216 | } | 216 | } |
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index fb5877e5a39b..31290694648b 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h | |||
@@ -86,7 +86,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
86 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 86 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
87 | 87 | ||
88 | #define task_pt_regs(p) \ | 88 | #define task_pt_regs(p) \ |
89 | ((struct pt_regs *)(THREAD_START_SP + (void *)(p)->thread_info) - 1) | 89 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) |
90 | 90 | ||
91 | #define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc | 91 | #define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc |
92 | #define KSTK_ESP(tsk) task_pt_regs(tsk)->ARM_sp | 92 | #define KSTK_ESP(tsk) task_pt_regs(tsk)->ARM_sp |