]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
m68k: merge the init_task code for mmu and non-mmu targets
authorGreg Ungerer <gerg@uclinux.org>
Tue, 30 Aug 2011 06:11:05 +0000 (16:11 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Tue, 8 Nov 2011 04:43:42 +0000 (14:43 +1000)
The init_task code can be the same for both mmu and non-mmu targets.
None of the alignment carried out in the the current init_task code
is necessary. The linker script takes care of aligning the init_thread
structure to a THREAD SIZE boundary, and that is all we need.

So use the init_task.c code for all target types, that makes m68k
code consistent with what most other architectures do.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68k/kernel/Makefile
arch/m68k/kernel/init_task.c
arch/m68k/kernel/process_mm.c

index e7f0f2e5ad4478a767732c70f229b78aca753383..01ae30ea0e88d3ed92a68d8fcdae8931566fc41f 100644 (file)
@@ -6,8 +6,8 @@ extra-$(CONFIG_MMU)     := head.o
 extra-$(CONFIG_SUN3)   := sun3-head.o
 extra-y                        += vmlinux.lds
 
-obj-y  := entry.o m68k_ksyms.o module.o process.o ptrace.o setup.o signal.o \
-          sys_m68k.o syscalltable.o time.o traps.o
+obj-y  := entry.o init_task.o m68k_ksyms.o module.o process.o ptrace.o
+obj-y  += setup.o signal.o sys_m68k.o syscalltable.o time.o traps.o
 
 obj-$(CONFIG_MMU)      += ints.o devres.o vectors.o
 devres-$(CONFIG_MMU)   = ../../../kernel/irq/devres.o
@@ -16,6 +16,6 @@ ifndef CONFIG_MMU_SUN3
 obj-y                  += dma.o
 endif
 ifndef CONFIG_MMU
-obj-y                  += init_task.o irq.o
+obj-y                  += irq.o
 endif
 
index cbf9dc3cc51dc6a8a8d297fa99d7b9d349100a03..c744cfc6bfa1ceb0d4efb5828c270e76dc893700 100644 (file)
@@ -19,7 +19,6 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  *
  * All other task structs will be allocated on slabs in fork.c
  */
-__asm__(".align 4");
 struct task_struct init_task = INIT_TASK(init_task);
 
 EXPORT_SYMBOL(init_task);
@@ -27,7 +26,7 @@ EXPORT_SYMBOL(init_task);
 /*
  * Initial thread structure.
  *
- * We need to make sure that this is 8192-byte aligned due to the
+ * We need to make sure that this is THREAD size aligned due to the
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
index 1bc223aa07ec297a6ed923bbc49168b89eedfec3..58a3253f3eb9166c7736493b5a505da3c834d241 100644 (file)
 #include <asm/setup.h>
 #include <asm/pgtable.h>
 
-/*
- * Initial task/thread structure. Make this a per-architecture thing,
- * because different architectures tend to have different
- * alignment requirements and potentially different initial
- * setup.
- */
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-union thread_union init_thread_union __init_task_data
-       __attribute__((aligned(THREAD_SIZE))) =
-               { INIT_THREAD_INFO(init_task) };
-
-/* initial task structure */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
 
 asmlinkage void ret_from_fork(void);