]> git.hungrycats.org Git - linux/commitdiff
[PATCH] m68k: Rename KTHREAD_SIZE [12/20]
authorRoman Zippel <zippel@linux-m68k.org>
Tue, 7 May 2002 03:11:02 +0000 (20:11 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 7 May 2002 03:11:02 +0000 (20:11 -0700)
This patch renames KTHREAD_SIZE into THREAD_SIZE, similiar to all other archs.

arch/m68k/kernel/process.c
arch/m68k/kernel/sun3-head.S
include/asm-m68k/entry.h
include/asm-m68k/page.h

index b6beffd774207bfb3d4d8862f7f3dd8bedb7acd5..f7802c1117a7e486b19e4a107c234f665fd03e1c 100644 (file)
@@ -44,7 +44,7 @@ static struct signal_struct init_signals = INIT_SIGNALS;
 struct mm_struct init_mm = INIT_MM(init_mm);
 
 union task_union init_task_union
-__attribute__((section("init_task"), aligned(KTHREAD_SIZE)))
+__attribute__((section("init_task"), aligned(THREAD_SIZE)))
        = { task: INIT_TASK(init_task_union.task) };
 
 asmlinkage void ret_from_fork(void);
@@ -148,7 +148,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
           : "=d" (retval)
           : "0" (__NR_clone), "i" (__NR_exit),
             "r" (arg), "a" (fn), "d" (clone_arg), "r" (current),
-            "i" (-KTHREAD_SIZE)
+            "i" (-THREAD_SIZE)
           : "d0", "d2");
        pid = retval;
        }
@@ -206,8 +206,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
        struct switch_stack * childstack, *stack;
        unsigned long stack_offset, *retp;
 
-       stack_offset = KTHREAD_SIZE - sizeof(struct pt_regs);
-       childregs = (struct pt_regs *) ((unsigned long) p + stack_offset);
+       stack_offset = THREAD_SIZE - sizeof(struct pt_regs);
+       childregs = (struct pt_regs *) ((unsigned long) (p->thread_info) + stack_offset);
 
        *childregs = *regs;
        childregs->d0 = 0;
index f05a72318a64fb0cf60ce837bc9fb6dbbcea21f1..015a53a80c4cbb2a7cd2d37ea90f1b8a2b5a3c09 100644 (file)
@@ -70,8 +70,8 @@ ENTRY(_start)
        jmp     1f:l            
 
 /* Following code executes at high addresses (0xE000xxx). */
-1:     lea     init_task_union,%a2                     | get initial thread...
-       lea     %a2@(KTHREAD_SIZE),%sp                  | ...and its stack.
+1:     lea     init_task,%curptr                       | get initial thread...
+       lea     init_thread_union+THREAD_SIZE,%sp       | ...and its stack.
 
 /* copy bootinfo records from the loader to _end */
        lea     _end, %a1
index d5eae1ee1f04432fdbf559d71687081f3c8b9352..c35ec2e45aa691169264b5b4526c0f4d921c17f2 100644 (file)
@@ -109,7 +109,7 @@ PT_DTRACE_BIT = 2
 
 .macro get_current reg=%d0
        movel   %sp,\reg
-       andw    #-KTHREAD_SIZE,\reg
+       andw    #-THREAD_SIZE,\reg
        movel   \reg,%curptr
 .endm
 
@@ -128,8 +128,9 @@ PT_DTRACE_BIT = 2
        "moveml %%d1-%%d5/%%a0-%%a2,%%sp@-"
 #define GET_CURRENT(tmp) \
        "movel  %%sp,"#tmp"\n\t" \
-       "andw   #-"STR(KTHREAD_SIZE)","#tmp"\n\t" \
-       "movel  "#tmp",%%a2"
+       "andw   #-"STR(THREAD_SIZE)","#tmp"\n\t" \
+       "movel  "#tmp",%%a2\n\t" \
+       "movel  %%a2@,%%a2"
 
 #endif
 
index 525ae6ecc32692aa11c8a90b1a66e38ddfe899bc..3fc192010d1203896939fdf282df8bc8398a7d68 100644 (file)
@@ -18,9 +18,9 @@
 #include <asm/setup.h>
 
 #if PAGE_SHIFT < 13
-#define KTHREAD_SIZE (8192)
+#define THREAD_SIZE (8192)
 #else
-#define KTHREAD_SIZE PAGE_SIZE
+#define THREAD_SIZE PAGE_SIZE
 #endif
  
 #ifndef __ASSEMBLY__