diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:05:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:54 -0500 |
commit | 30af7120fe6cfa8cf9ccd0626474fa1cd6d2bd59 (patch) | |
tree | 11b63f1e3c69444303a031eab445f3222f10a6c3 /arch/s390 | |
parent | c7584fb6b46a71a1aba5e06dc3cc54ce10f0129e (diff) |
[PATCH] s390: 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>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/process.c | 9 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 9f643309ed3d..2ff90a1a1056 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -153,7 +153,7 @@ void show_regs(struct pt_regs *regs) | |||
153 | { | 153 | { |
154 | struct task_struct *tsk = current; | 154 | struct task_struct *tsk = current; |
155 | 155 | ||
156 | printk("CPU: %d %s\n", tsk->thread_info->cpu, print_tainted()); | 156 | printk("CPU: %d %s\n", task_thread_info(tsk)->cpu, print_tainted()); |
157 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | 157 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", |
158 | current->comm, current->pid, (void *) tsk, | 158 | current->comm, current->pid, (void *) tsk, |
159 | (void *) tsk->thread.ksp); | 159 | (void *) tsk->thread.ksp); |
@@ -357,11 +357,10 @@ unsigned long get_wchan(struct task_struct *p) | |||
357 | unsigned long return_address; | 357 | unsigned long return_address; |
358 | int count; | 358 | int count; |
359 | 359 | ||
360 | if (!p || p == current || p->state == TASK_RUNNING || !p->thread_info) | 360 | if (!p || p == current || p->state == TASK_RUNNING || !task_stack_page(p)) |
361 | return 0; | 361 | return 0; |
362 | low = (struct stack_frame *) p->thread_info; | 362 | low = task_stack_page(p); |
363 | high = (struct stack_frame *) | 363 | high = (struct stack_frame *) task_pt_regs(p); |
364 | ((unsigned long) p->thread_info + THREAD_SIZE) - 1; | ||
365 | sf = (struct stack_frame *) (p->thread.ksp & PSW_ADDR_INSN); | 364 | sf = (struct stack_frame *) (p->thread.ksp & PSW_ADDR_INSN); |
366 | if (sf <= low || sf > high) | 365 | if (sf <= low || sf > high) |
367 | return 0; | 366 | return 0; |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index e10f4ca00499..cbfcfd02a43a 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -657,7 +657,7 @@ __cpu_up(unsigned int cpu) | |||
657 | idle = current_set[cpu]; | 657 | idle = current_set[cpu]; |
658 | cpu_lowcore = lowcore_ptr[cpu]; | 658 | cpu_lowcore = lowcore_ptr[cpu]; |
659 | cpu_lowcore->kernel_stack = (unsigned long) | 659 | cpu_lowcore->kernel_stack = (unsigned long) |
660 | idle->thread_info + (THREAD_SIZE); | 660 | task_stack_page(idle) + (THREAD_SIZE); |
661 | sf = (struct stack_frame *) (cpu_lowcore->kernel_stack | 661 | sf = (struct stack_frame *) (cpu_lowcore->kernel_stack |
662 | - sizeof(struct pt_regs) | 662 | - sizeof(struct pt_regs) |
663 | - sizeof(struct stack_frame)); | 663 | - sizeof(struct stack_frame)); |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 012135b8b32e..5d21e9e6e7b4 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -136,8 +136,8 @@ void show_trace(struct task_struct *task, unsigned long * stack) | |||
136 | sp = __show_trace(sp, S390_lowcore.async_stack - ASYNC_SIZE, | 136 | sp = __show_trace(sp, S390_lowcore.async_stack - ASYNC_SIZE, |
137 | S390_lowcore.async_stack); | 137 | S390_lowcore.async_stack); |
138 | if (task) | 138 | if (task) |
139 | __show_trace(sp, (unsigned long) task->thread_info, | 139 | __show_trace(sp, (unsigned long) task_stack_page(task), |
140 | (unsigned long) task->thread_info + THREAD_SIZE); | 140 | (unsigned long) task_stack_page(task) + THREAD_SIZE); |
141 | else | 141 | else |
142 | __show_trace(sp, S390_lowcore.thread_info, | 142 | __show_trace(sp, S390_lowcore.thread_info, |
143 | S390_lowcore.thread_info + THREAD_SIZE); | 143 | S390_lowcore.thread_info + THREAD_SIZE); |