All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] m68k: merge the init_task code for mmu and non-mmu targets
@ 2011-09-02  5:20 gerg
  2011-12-11  9:21 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: gerg @ 2011-09-02  5:20 UTC (permalink / raw)
  To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer

From: Greg Ungerer <gerg@uclinux.org>

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     |    6 +++---
 arch/m68k/kernel/init_task.c  |    3 +--
 arch/m68k/kernel/process_mm.c |   16 ----------------
 3 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
index e7f0f2e..01ae30e 100644
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -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
 
diff --git a/arch/m68k/kernel/init_task.c b/arch/m68k/kernel/init_task.c
index cbf9dc3..c744cfc 100644
--- a/arch/m68k/kernel/init_task.c
+++ b/arch/m68k/kernel/init_task.c
@@ -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..
  */
diff --git a/arch/m68k/kernel/process_mm.c b/arch/m68k/kernel/process_mm.c
index 1bc223a..58a3253 100644
--- a/arch/m68k/kernel/process_mm.c
+++ b/arch/m68k/kernel/process_mm.c
@@ -33,22 +33,6 @@
 #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);
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] m68k: merge the init_task code for mmu and non-mmu targets
  2011-09-02  5:20 [PATCH] m68k: merge the init_task code for mmu and non-mmu targets gerg
@ 2011-12-11  9:21 ` Geert Uytterhoeven
  2011-12-11 11:26   ` Greg Ungerer
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2011-12-11  9:21 UTC (permalink / raw)
  To: gerg; +Cc: linux-m68k, uclinux-dev, Greg Ungerer

On Fri, Sep 2, 2011 at 07:20,  <gerg@snapgear.com> wrote:
> From: Greg Ungerer <gerg@uclinux.org>
>
> 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>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] m68k: merge the init_task code for mmu and non-mmu targets
  2011-12-11  9:21 ` Geert Uytterhoeven
@ 2011-12-11 11:26   ` Greg Ungerer
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Ungerer @ 2011-12-11 11:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, uclinux-dev, Greg Ungerer

On 12/11/2011 07:21 PM, Geert Uytterhoeven wrote:
> On Fri, Sep 2, 2011 at 07:20,<gerg@snapgear.com>  wrote:
>> From: Greg Ungerer<gerg@uclinux.org>
>>
>> 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>
>
> Acked-by: Geert Uytterhoeven<geert@linux-m68k.org>

Thanks Geert!

Regards
Greg


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close,                            FAX:         +61 7 3891 3630
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-11 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-02  5:20 [PATCH] m68k: merge the init_task code for mmu and non-mmu targets gerg
2011-12-11  9:21 ` Geert Uytterhoeven
2011-12-11 11:26   ` Greg Ungerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.