Commit c048ec22 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] m68k: Rename KTHREAD_SIZE [12/20]

This patch renames KTHREAD_SIZE into THREAD_SIZE, similiar to all other archs.
parent df171718
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment