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

index 9f643309ed3d726213403d6d4b64b428e3f773aa..2ff90a1a105657afc6586fa86c5689843db66fdc 100644 (file)
@@ -153,7 +153,7 @@ void show_regs(struct pt_regs *regs)
 {
        struct task_struct *tsk = current;
 
-        printk("CPU:    %d    %s\n", tsk->thread_info->cpu, print_tainted());
+        printk("CPU:    %d    %s\n", task_thread_info(tsk)->cpu, print_tainted());
         printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
               current->comm, current->pid, (void *) tsk,
               (void *) tsk->thread.ksp);
@@ -357,11 +357,10 @@ unsigned long get_wchan(struct task_struct *p)
        unsigned long return_address;
        int count;
 
-       if (!p || p == current || p->state == TASK_RUNNING || !p->thread_info)
+       if (!p || p == current || p->state == TASK_RUNNING || !task_stack_page(p))
                return 0;
-       low = (struct stack_frame *) p->thread_info;
-       high = (struct stack_frame *)
-               ((unsigned long) p->thread_info + THREAD_SIZE) - 1;
+       low = task_stack_page(p);
+       high = (struct stack_frame *) task_pt_regs(p);
        sf = (struct stack_frame *) (p->thread.ksp & PSW_ADDR_INSN);
        if (sf <= low || sf > high)
                return 0;
index e10f4ca00499ede1690e0a650ee935a5b7f27c12..cbfcfd02a43a503447380c55f5ab852d248e545b 100644 (file)
@@ -657,7 +657,7 @@ __cpu_up(unsigned int cpu)
        idle = current_set[cpu];
         cpu_lowcore = lowcore_ptr[cpu];
        cpu_lowcore->kernel_stack = (unsigned long)
-               idle->thread_info + (THREAD_SIZE);
+               task_stack_page(idle) + (THREAD_SIZE);
        sf = (struct stack_frame *) (cpu_lowcore->kernel_stack
                                     - sizeof(struct pt_regs)
                                     - sizeof(struct stack_frame));
index 012135b8b32e0a4ab7967d595abb33c0af54c1b2..5d21e9e6e7b4505fc6647aaa039222a44197de85 100644 (file)
@@ -136,8 +136,8 @@ void show_trace(struct task_struct *task, unsigned long * stack)
        sp = __show_trace(sp, S390_lowcore.async_stack - ASYNC_SIZE,
                          S390_lowcore.async_stack);
        if (task)
-               __show_trace(sp, (unsigned long) task->thread_info,
-                            (unsigned long) task->thread_info + THREAD_SIZE);
+               __show_trace(sp, (unsigned long) task_stack_page(task),
+                            (unsigned long) task_stack_page(task) + THREAD_SIZE);
        else
                __show_trace(sp, S390_lowcore.thread_info,
                             S390_lowcore.thread_info + THREAD_SIZE);
index 795bfcb95def035f02daa00dcceecca3bb2faf9b..c5cbc4bd8414e12c571982cb5c5d0f85bec31406 100644 (file)
@@ -192,7 +192,7 @@ extern void show_trace(struct task_struct *task, unsigned long *sp);
 
 unsigned long get_wchan(struct task_struct *p);
 #define task_pt_regs(tsk) ((struct pt_regs *) \
-        ((void *)(tsk)->thread_info + THREAD_SIZE) - 1)
+        (task_stack_page(tsk) + THREAD_SIZE) - 1)
 #define KSTK_EIP(tsk)  (task_pt_regs(tsk)->psw.addr)
 #define KSTK_ESP(tsk)  (task_pt_regs(tsk)->gprs[15])