This patch renames KTHREAD_SIZE into THREAD_SIZE, similiar to all other archs.
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);
: "=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;
}
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;
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
.macro get_current reg=%d0
movel %sp,\reg
- andw #-KTHREAD_SIZE,\reg
+ andw #-THREAD_SIZE,\reg
movel \reg,%curptr
.endm
"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
#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__