linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/19] unify init_task
@ 2008-12-11  3:52 Kyle McMartin
  2008-12-11  3:52 ` [PATCH 01/19] add HAVE_ARCH_INIT_TASK Kyle McMartin
                   ` (6 more replies)
  0 siblings, 7 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin

Create a common kernel/init_task.c, and convert low hanging fruit to
use it. Architecture maintainers will need to ensure that I didn't
break anything before applying the init_task removal patch to their
arch.

A few architectures appear to possibly rely on link-ordering (with
an extra-y makefile rule) and may need additional linker script rules.

Unconverted architectures so far are m68k (because it doesn't use an explicit
init_task.c), ia64 (because it faffs about with init_thread_union), and
sparc{,64} (which appear to rely on some magic.)

The other open question is what to do about init_mm, which was supposed to be
removed in 2.6.26...

Kyle McMartin (19):
  add HAVE_ARCH_INIT_TASK
  add generic kernel/init_task.c
  x86: convert to generic init_task.c
  alpha: rename .data.init_thread to .data.init_task
  alpha: convert to generic init_task.c
  arm: convert to generic init_task.c
  avr32: convert to generic init_task.c
  blackfin: convert to generic init_task.c
  frv: convert to generic init_task.c
  h8300: convert to generic init_task.c
  m32r: convert to generic init_task.c
  m68knommu: convert to generic init_task.c
  mips: convert to generic init_task.c
  mn10300: convert to generic init_task.c
  parisc: convert to generic init_task.c
  powerpc: convert to generic init_task.c
  s390: convert to generic init_task.c
  sh: convert to generic init_task.c
  xtensa: convert to generic init_task.c

 arch/Kconfig                      |    9 +++++
 arch/alpha/kernel/Makefile        |    2 +-
 arch/alpha/kernel/init_task.c     |   22 -------------
 arch/alpha/kernel/vmlinux.lds.S   |    4 +-
 arch/arm/kernel/Makefile          |    2 +-
 arch/arm/kernel/init_task.c       |   43 --------------------------
 arch/avr32/kernel/Makefile        |    2 +-
 arch/avr32/kernel/init_task.c     |   37 ----------------------
 arch/blackfin/kernel/Makefile     |    2 +-
 arch/blackfin/kernel/init_task.c  |   60 -------------------------------------
 arch/cris/Kconfig                 |    1 +
 arch/frv/kernel/Makefile          |    2 +-
 arch/frv/kernel/init_task.c       |   38 -----------------------
 arch/h8300/kernel/Makefile        |    2 +-
 arch/h8300/kernel/init_task.c     |   42 --------------------------
 arch/ia64/Kconfig                 |    1 +
 arch/m32r/kernel/Makefile         |    2 +-
 arch/m32r/kernel/init_task.c      |   40 ------------------------
 arch/m68k/Kconfig                 |    1 +
 arch/m68knommu/kernel/Makefile    |    2 +-
 arch/m68knommu/kernel/init_task.c |   42 --------------------------
 arch/mips/kernel/Makefile         |    2 +-
 arch/mips/kernel/init_task.c      |   41 -------------------------
 arch/mn10300/kernel/Makefile      |    2 +-
 arch/mn10300/kernel/init_task.c   |   44 ---------------------------
 arch/parisc/kernel/init_task.c    |   28 -----------------
 arch/powerpc/kernel/Makefile      |    2 +-
 arch/powerpc/kernel/init_task.c   |   35 ---------------------
 arch/s390/kernel/Makefile         |    2 +-
 arch/s390/kernel/init_task.c      |   44 ---------------------------
 arch/sh/kernel/init_task.c        |   25 ---------------
 arch/sparc/Kconfig                |    1 +
 arch/sparc64/Kconfig              |    1 +
 arch/x86/kernel/init_task.c       |   25 ---------------
 arch/xtensa/kernel/Makefile       |    2 +-
 arch/xtensa/kernel/init_task.c    |   37 ----------------------
 kernel/Makefile                   |    4 ++
 kernel/init_task.c                |   36 ++++++++++++++++++++++
 38 files changed, 69 insertions(+), 618 deletions(-)
 delete mode 100644 arch/alpha/kernel/init_task.c
 delete mode 100644 arch/arm/kernel/init_task.c
 delete mode 100644 arch/avr32/kernel/init_task.c
 delete mode 100644 arch/blackfin/kernel/init_task.c
 delete mode 100644 arch/frv/kernel/init_task.c
 delete mode 100644 arch/h8300/kernel/init_task.c
 delete mode 100644 arch/m32r/kernel/init_task.c
 delete mode 100644 arch/m68knommu/kernel/init_task.c
 delete mode 100644 arch/mips/kernel/init_task.c
 delete mode 100644 arch/mn10300/kernel/init_task.c
 delete mode 100644 arch/powerpc/kernel/init_task.c
 delete mode 100644 arch/s390/kernel/init_task.c
 delete mode 100644 arch/xtensa/kernel/init_task.c
 create mode 100644 kernel/init_task.c

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

* [PATCH 01/19] add HAVE_ARCH_INIT_TASK
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
@ 2008-12-11  3:52 ` Kyle McMartin
  2008-12-11  3:52   ` [PATCH 02/19] add generic kernel/init_task.c Kyle McMartin
  2008-12-11  8:57 ` [RFC PATCH 00/19] unify init_task Geert Uytterhoeven
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, Kyle McMartin

Since some architectures faff about with init_task.c (*cough ia64 cough*)
for various reasons, we may not be able to entirely convert most architectures.
To ensure bisect-ability, this is an omnibus commit declaring a new config
option which all architectures will select to begin with, selecting the
status quo of arch/$a/kernel/init_task.c (or whatever.)

Once the maintainers apply a patch removing their init_task.c, the
option will be removed, and a generic kernel/init_task.c will be used.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/Kconfig           |    9 +++++++++
 arch/alpha/Kconfig     |    1 +
 arch/arm/Kconfig       |    1 +
 arch/avr32/Kconfig     |    1 +
 arch/blackfin/Kconfig  |    1 +
 arch/cris/Kconfig      |    1 +
 arch/frv/Kconfig       |    1 +
 arch/h8300/Kconfig     |    1 +
 arch/ia64/Kconfig      |    1 +
 arch/m32r/Kconfig      |    1 +
 arch/m68k/Kconfig      |    1 +
 arch/m68knommu/Kconfig |    1 +
 arch/mips/Kconfig      |    1 +
 arch/mn10300/Kconfig   |    1 +
 arch/parisc/Kconfig    |    1 +
 arch/powerpc/Kconfig   |    1 +
 arch/s390/Kconfig      |    1 +
 arch/sh/Kconfig        |    1 +
 arch/sparc/Kconfig     |    1 +
 arch/sparc64/Kconfig   |    1 +
 arch/x86/Kconfig       |    1 +
 arch/xtensa/Kconfig    |    1 +
 22 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 471e72d..b0a7a30 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -89,6 +89,15 @@ config HAVE_KRETPROBES
 config HAVE_ARCH_TRACEHOOK
 	bool
 
+config HAVE_ARCH_INIT_TASK
+	bool
+	help
+	  Select this option from your arch Kconfig if your architecture
+	  provides its own init_task.c primitives. If your architecture
+	  has been converted to use the generic kernel/init_task.c, this
+	  option must be unselected. Once all have been converted, this
+	  option will be removed.
+
 config HAVE_DMA_ATTRS
 	bool
 
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 6110197..5752c74 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -8,6 +8,7 @@ config ALPHA
 	select HAVE_AOUT
 	select HAVE_IDE
 	select HAVE_OPROFILE
+	select HAVE_ARCH_INIT_TASK
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9722f8b..8f13edb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -18,6 +18,7 @@ config ARM
 	select HAVE_KRETPROBES if (HAVE_KPROBES)
 	select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
 	select HAVE_GENERIC_DMA_COHERENT
+	select HAVE_ARCH_INIT_TASK
 	help
 	  The ARM series is a line of low-power-consumption RISC chip designs
 	  licensed by ARM Ltd and targeted at embedded applications and
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 26eca87..a69ad8d 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -13,6 +13,7 @@ config AVR32
 	select HAVE_CLK
 	select HAVE_OPROFILE
 	select HAVE_KPROBES
+	select HAVE_ARCH_INIT_TASK
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 29e71ed..e25d145 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -26,6 +26,7 @@ config BLACKFIN
 	default y
 	select HAVE_IDE
 	select HAVE_OPROFILE
+	select HAVE_ARCH_INIT_TASK
 
 config ZONE_DMA
 	bool
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index b17aeea..5be6884 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -55,6 +55,7 @@ config CRIS
 	bool
 	default y
 	select HAVE_IDE
+	select HAVE_ARCH_INIT_TASK
 
 config HZ
 	int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 9d1552a..f251d82 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -6,6 +6,7 @@ config FRV
 	bool
 	default y
 	select HAVE_IDE
+	select HAVE_ARCH_INIT_TASK
 
 config ZONE_DMA
 	bool
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 28f06fd..6ec26b4 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -9,6 +9,7 @@ config H8300
 	bool
 	default y
 	select HAVE_IDE
+	select HAVE_ARCH_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 6bd91ed..9c66997 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -24,6 +24,7 @@ config IA64
 	select HAVE_DMA_ATTRS
 	select HAVE_KVM
 	select HAVE_ARCH_TRACEHOOK
+	select HAVE_ARCH_INIT_TASK
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index dbaed4a..2b1aa23 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -10,6 +10,7 @@ config M32R
 	default y
 	select HAVE_IDE
 	select HAVE_OPROFILE
+	select HAVE_ARCH_INIT_TASK
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 836fb66..acb1917 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -7,6 +7,7 @@ config M68K
 	default y
 	select HAVE_AOUT
 	select HAVE_IDE
+	select HAVE_ARCH_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 76b66fe..4019e0b 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -9,6 +9,7 @@ config M68K
 	bool
 	default y
 	select HAVE_IDE
+	select HAVE_ARCH_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index f4af967..0d15668 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -7,6 +7,7 @@ config MIPS
 	# Horrible source of confusion.  Die, die, die ...
 	select EMBEDDED
 	select RTC_LIB
+	select HAVE_ARCH_INIT_TASK
 
 mainmenu "Linux/MIPS Kernel Configuration"
 
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 9a9f433..7cb6f51 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -7,6 +7,7 @@ mainmenu "Linux Kernel Configuration"
 
 config MN10300
 	def_bool y
+	select HAVE_ARCH_INIT_TASK
 
 config AM33
 	def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 644a70b..fe0a9d3 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -11,6 +11,7 @@ config PARISC
 	select HAVE_OPROFILE
 	select RTC_CLASS
 	select RTC_DRV_PARISC
+	select HAVE_ARCH_INIT_TASK
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
 	  in many of their workstations & servers (HP9000 700 and 800 series,
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 525c13a..9f1db45 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -121,6 +121,7 @@ config PPC
 	select HAVE_DMA_ATTRS if PPC64
 	select USE_GENERIC_SMP_HELPERS if SMP
 	select HAVE_OPROFILE
+	select HAVE_ARCH_INIT_TASK
 
 config EARLY_PRINTK
 	bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 8116a33..4381302 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -75,6 +75,7 @@ config S390
 	select HAVE_KRETPROBES
 	select HAVE_KVM if 64BIT
 	select HAVE_ARCH_TRACEHOOK
+	select HAVE_ARCH_INIT_TASK
 
 source "init/Kconfig"
 
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 80119b3..0ac7852 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -13,6 +13,7 @@ config SUPERH
 	select HAVE_OPROFILE
 	select HAVE_GENERIC_DMA_COHERENT
 	select HAVE_IOREMAP_PROT if MMU
+	select HAVE_ARCH_INIT_TASK
 	help
 	  The SuperH is a RISC processor targeted for use in embedded systems
 	  and consumer electronics; it was also used in the Sega Dreamcast
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index e594559..f2e9d53 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -79,6 +79,7 @@ config SPARC
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select RTC_CLASS
 	select RTC_DRV_M48T59
+	select HAVE_ARCH_INIT_TASK
 
 # Identify this as a Sparc32 build
 config SPARC32
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 3b96e70..96fedcb 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -24,6 +24,7 @@ config SPARC64
 	select RTC_DRV_BQ4802
 	select RTC_DRV_SUN4V
 	select RTC_DRV_STARFIRE
+	select HAVE_ARCH_INIT_TASK
 
 config GENERIC_TIME
 	bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ac22bb7..5b913d4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -34,6 +34,7 @@ config X86
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_GENERIC_DMA_COHERENT if X86_32
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS
+	select HAVE_ARCH_INIT_TASK
 
 config ARCH_DEFCONFIG
 	string
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 6c873dc..da236cf 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -15,6 +15,7 @@ config XTENSA
 	bool
 	default y
 	select HAVE_IDE
+	select HAVE_ARCH_INIT_TASK
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
-- 
1.6.0.4

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

* [PATCH 02/19] add generic kernel/init_task.c
  2008-12-11  3:52 ` [PATCH 01/19] add HAVE_ARCH_INIT_TASK Kyle McMartin
@ 2008-12-11  3:52   ` Kyle McMartin
  2008-12-11  3:52     ` [PATCH 03/19] x86: convert to generic init_task.c Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, Kyle McMartin

Add a generic kernel/init_task.c, since it is basically identical across
all the architectures Linux supports.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 kernel/Makefile    |    4 ++++
 kernel/init_task.c |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 kernel/init_task.c

diff --git a/kernel/Makefile b/kernel/Makefile
index 19fad00..b370dec 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -11,6 +11,10 @@ obj-y     = sched.o fork.o exec_domain.o panic.o printk.o \
 	    hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
 	    notifier.o ksysfs.o pm_qos_params.o sched_clock.o
 
+ifneq ($(CONFIG_HAVE_ARCH_INIT_TASK),y)
+obj-y	+= init_task.o
+endif
+
 ifdef CONFIG_FUNCTION_TRACER
 # Do not trace debug files and internal ftrace files
 CFLAGS_REMOVE_lockdep.o = -pg
diff --git a/kernel/init_task.c b/kernel/init_task.c
new file mode 100644
index 0000000..2ebfa81
--- /dev/null
+++ b/kernel/init_task.c
@@ -0,0 +1,36 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/init_task.h>
+#include <linux/fs.h>
+#include <linux/mqueue.h>
+
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+
+static struct fs_struct init_fs = INIT_FS;
+static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
+static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+struct mm_struct init_mm = INIT_MM(init_mm);
+EXPORT_UNUSED_SYMBOL(init_mm); /* will be removed in 2.6.26 */
+
+/*
+ * Initial thread structure.
+ *
+ * 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..
+ */
+union thread_union init_thread_union
+	__attribute__((__section__(".data.init_task"))) =
+		{ INIT_THREAD_INFO(init_task) };
+
+/*
+ * Initial task structure.
+ *
+ * All other task structs will be allocated on slabs in fork.c
+ */
+struct task_struct init_task = INIT_TASK(init_task);
+EXPORT_SYMBOL(init_task);
+
-- 
1.6.0.4

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

* [PATCH 03/19] x86: convert to generic init_task.c
  2008-12-11  3:52   ` [PATCH 02/19] add generic kernel/init_task.c Kyle McMartin
@ 2008-12-11  3:52     ` Kyle McMartin
  2008-12-11  3:52       ` [PATCH 04/19] alpha: rename .data.init_thread to .data.init_task Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, Kyle McMartin

Leave arch/x86/kernel/init_task.c hanging around with the INIT_TSS
definition in it, a later patch will move it to an appropriate place and
nuke the file.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/x86/Kconfig            |    1 -
 arch/x86/kernel/init_task.c |   25 -------------------------
 2 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5b913d4..ac22bb7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -34,7 +34,6 @@ config X86
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_GENERIC_DMA_COHERENT if X86_32
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS
-	select HAVE_ARCH_INIT_TASK
 
 config ARCH_DEFCONFIG
 	string
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
index a4f93b4..de8776d 100644
--- a/arch/x86/kernel/init_task.c
+++ b/arch/x86/kernel/init_task.c
@@ -10,31 +10,6 @@
 #include <asm/pgtable.h>
 #include <asm/desc.h>
 
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_UNUSED_SYMBOL(init_mm); /* will be removed in 2.6.26 */
-
-/*
- * Initial thread structure.
- *
- * 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..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
 /*
  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
  * no more per-task TSS's. The TSS size is kept cacheline-aligned
-- 
1.6.0.4

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

* [PATCH 04/19] alpha: rename .data.init_thread to .data.init_task
  2008-12-11  3:52     ` [PATCH 03/19] x86: convert to generic init_task.c Kyle McMartin
@ 2008-12-11  3:52       ` Kyle McMartin
  2008-12-11  3:52         ` [PATCH 05/19] alpha: convert to generic init_task.c Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, ink, rth, Kyle McMartin

Everyone else calls it .init_task, and it's one less special case
for a generic kernel/init_task.c...

Cc: ink@jurassic.park.msu.ru
Cc: rth@twiddle.net
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/alpha/kernel/init_task.c   |    2 +-
 arch/alpha/kernel/vmlinux.lds.S |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/kernel/init_task.c b/arch/alpha/kernel/init_task.c
index 1f76218..901a0e2 100644
--- a/arch/alpha/kernel/init_task.c
+++ b/arch/alpha/kernel/init_task.c
@@ -18,5 +18,5 @@ EXPORT_SYMBOL(init_mm);
 EXPORT_SYMBOL(init_task);
 
 union thread_union init_thread_union
-	__attribute__((section(".data.init_thread")))
+	__attribute__((section(".data.init_task")))
 	= { INIT_THREAD_INFO(init_task) };
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index ef37fc1..563c8d1 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -93,8 +93,8 @@ SECTIONS
 	/* Freed after init ends here */
 
 	/* Note 2 page alignment above.  */
-	.data.init_thread : {
-		*(.data.init_thread)
+	.data.init_task : {
+		*(.data.init_task)
 	}
 
 	. = ALIGN(PAGE_SIZE);
-- 
1.6.0.4

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

* [PATCH 05/19] alpha: convert to generic init_task.c
  2008-12-11  3:52       ` [PATCH 04/19] alpha: rename .data.init_thread to .data.init_task Kyle McMartin
@ 2008-12-11  3:52         ` Kyle McMartin
  2008-12-11  3:52           ` [PATCH 06/19] arm: " Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, ink, rth, Kyle McMartin

Cc: ink@jurassic.park.msu.ru
Cc: rth@twiddle.net
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/alpha/Kconfig            |    1 -
 arch/alpha/kernel/Makefile    |    2 +-
 arch/alpha/kernel/init_task.c |   22 ----------------------
 3 files changed, 1 insertions(+), 24 deletions(-)
 delete mode 100644 arch/alpha/kernel/init_task.c

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 5752c74..6110197 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -8,7 +8,6 @@ config ALPHA
 	select HAVE_AOUT
 	select HAVE_IDE
 	select HAVE_OPROFILE
-	select HAVE_ARCH_INIT_TASK
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index ac706c1..4028f1a 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y		:= head.o vmlinux.lds
 EXTRA_AFLAGS	:= $(KBUILD_CFLAGS)
 EXTRA_CFLAGS	:= -Werror -Wno-sign-compare
 
-obj-y    := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
+obj-y    := entry.o traps.o process.o osf_sys.o irq.o \
 	    irq_alpha.o signal.o setup.o ptrace.o time.o \
 	    alpha_ksyms.o systbls.o err_common.o io.o
 
diff --git a/arch/alpha/kernel/init_task.c b/arch/alpha/kernel/init_task.c
deleted file mode 100644
index 901a0e2..0000000
--- a/arch/alpha/kernel/init_task.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-#include <asm/uaccess.h>
-
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_mm);
-EXPORT_SYMBOL(init_task);
-
-union thread_union init_thread_union
-	__attribute__((section(".data.init_task")))
-	= { INIT_THREAD_INFO(init_task) };
-- 
1.6.0.4

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

* [PATCH 06/19] arm: convert to generic init_task.c
  2008-12-11  3:52         ` [PATCH 05/19] alpha: convert to generic init_task.c Kyle McMartin
@ 2008-12-11  3:52           ` Kyle McMartin
  2008-12-11  3:52             ` [PATCH 07/19] avr32: " Kyle McMartin
  2008-12-12 19:29             ` [PATCH 06/19] arm: " Russell King
  0 siblings, 2 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, rmk, Kyle McMartin

Cc: rmk@arm.linux.org.uk
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/arm/Kconfig            |    1 -
 arch/arm/kernel/Makefile    |    2 +-
 arch/arm/kernel/init_task.c |   43 -------------------------------------------
 3 files changed, 1 insertions(+), 45 deletions(-)
 delete mode 100644 arch/arm/kernel/init_task.c

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8f13edb..9722f8b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -18,7 +18,6 @@ config ARM
 	select HAVE_KRETPROBES if (HAVE_KPROBES)
 	select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
 	select HAVE_GENERIC_DMA_COHERENT
-	select HAVE_ARCH_INIT_TASK
 	help
 	  The ARM series is a line of low-power-consumption RISC chip designs
 	  licensed by ARM Ltd and targeted at embedded applications and
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 4305345..b3671bd 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -45,4 +45,4 @@ endif
 head-y			:= head$(MMUEXT).o
 obj-$(CONFIG_DEBUG_LL)	+= debug.o
 
-extra-y := $(head-y) init_task.o vmlinux.lds
+extra-y := $(head-y) vmlinux.lds
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c
deleted file mode 100644
index 0bbf806..0000000
--- a/arch/arm/kernel/init_task.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  linux/arch/arm/kernel/init_task.c
- */
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/uaccess.h>
-
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by making sure
- * the linker maps this in the .text segment right after head.S,
- * and making head.S ensure the proper alignment.
- *
- * The things we do for performance..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 07/19] avr32: convert to generic init_task.c
  2008-12-11  3:52           ` [PATCH 06/19] arm: " Kyle McMartin
@ 2008-12-11  3:52             ` Kyle McMartin
  2008-12-11  3:52               ` [PATCH 08/19] blackfin: " Kyle McMartin
  2009-01-06 12:55               ` [PATCH 07/19] avr32: " Haavard Skinnemoen
  2008-12-12 19:29             ` [PATCH 06/19] arm: " Russell King
  1 sibling, 2 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, hskinnemoen, Kyle McMartin

Cc: hskinnemoen@atmel.com
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/avr32/Kconfig            |    1 -
 arch/avr32/kernel/Makefile    |    2 +-
 arch/avr32/kernel/init_task.c |   37 -------------------------------------
 3 files changed, 1 insertions(+), 39 deletions(-)
 delete mode 100644 arch/avr32/kernel/init_task.c

diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index a69ad8d..26eca87 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -13,7 +13,6 @@ config AVR32
 	select HAVE_CLK
 	select HAVE_OPROFILE
 	select HAVE_KPROBES
-	select HAVE_ARCH_INIT_TASK
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
diff --git a/arch/avr32/kernel/Makefile b/arch/avr32/kernel/Makefile
index 18229d0..9e2c465 100644
--- a/arch/avr32/kernel/Makefile
+++ b/arch/avr32/kernel/Makefile
@@ -8,7 +8,7 @@ obj-$(CONFIG_SUBARCH_AVR32B)	+= entry-avr32b.o
 obj-y				+= syscall_table.o syscall-stubs.o irq.o
 obj-y				+= setup.o traps.o ocd.o ptrace.o
 obj-y				+= signal.o sys_avr32.o process.o time.o
-obj-y				+= init_task.o switch_to.o cpu.o
+obj-y				+= switch_to.o cpu.o
 obj-$(CONFIG_MODULES)		+= module.o avr32_ksyms.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c
deleted file mode 100644
index 4405846..0000000
--- a/arch/avr32/kernel/init_task.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure. Must be aligned on an 8192-byte boundary.
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 08/19] blackfin: convert to generic init_task.c
  2008-12-11  3:52             ` [PATCH 07/19] avr32: " Kyle McMartin
@ 2008-12-11  3:52               ` Kyle McMartin
  2008-12-11  3:52                 ` [PATCH 09/19] frv: " Kyle McMartin
  2008-12-11 12:55                 ` [PATCH 08/19] blackfin: " Arnd Bergmann
  2009-01-06 12:55               ` [PATCH 07/19] avr32: " Haavard Skinnemoen
  1 sibling, 2 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, cooloney, Kyle McMartin

Cc: cooloney@kernel.org
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/blackfin/Kconfig            |    1 -
 arch/blackfin/kernel/Makefile    |    2 +-
 arch/blackfin/kernel/init_task.c |   60 --------------------------------------
 3 files changed, 1 insertions(+), 62 deletions(-)
 delete mode 100644 arch/blackfin/kernel/init_task.c

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index e25d145..29e71ed 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -26,7 +26,6 @@ config BLACKFIN
 	default y
 	select HAVE_IDE
 	select HAVE_OPROFILE
-	select HAVE_ARCH_INIT_TASK
 
 config ZONE_DMA
 	bool
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile
index 606adc7..fbe5ab3 100644
--- a/arch/blackfin/kernel/Makefile
+++ b/arch/blackfin/kernel/Makefile
@@ -2,7 +2,7 @@
 # arch/blackfin/kernel/Makefile
 #
 
-extra-y := init_task.o vmlinux.lds
+extra-y := vmlinux.lds
 
 obj-y := \
 	entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \
diff --git a/arch/blackfin/kernel/init_task.c b/arch/blackfin/kernel/init_task.c
deleted file mode 100644
index 6bdba7b..0000000
--- a/arch/blackfin/kernel/init_task.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * File:         arch/blackfin/kernel/init_task.c
- * Based on:
- * Author:
- *
- * Created:
- * Description:  This file contains the simple DMA Implementation for Blackfin
- *
- * Modified:
- *               Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/fs.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry.
- */
-union thread_union init_thread_union
-    __attribute__ ((__section__(".init_task.data"))) = {
-INIT_THREAD_INFO(init_task)};
-- 
1.6.0.4

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

* [PATCH 09/19] frv: convert to generic init_task.c
  2008-12-11  3:52               ` [PATCH 08/19] blackfin: " Kyle McMartin
@ 2008-12-11  3:52                 ` Kyle McMartin
  2008-12-11  3:52                   ` [PATCH 10/19] h8300: " Kyle McMartin
  2008-12-11 12:55                 ` [PATCH 08/19] blackfin: " Arnd Bergmann
  1 sibling, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, dhowells, Kyle McMartin

Cc: dhowells@redhat.com
Signed-off-by: Kyle McMartin <kye@mcmartin.ca>
---
 arch/frv/Kconfig            |    1 -
 arch/frv/kernel/Makefile    |    2 +-
 arch/frv/kernel/init_task.c |   38 --------------------------------------
 3 files changed, 1 insertions(+), 40 deletions(-)
 delete mode 100644 arch/frv/kernel/init_task.c

diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index f251d82..9d1552a 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -6,7 +6,6 @@ config FRV
 	bool
 	default y
 	select HAVE_IDE
-	select HAVE_ARCH_INIT_TASK
 
 config ZONE_DMA
 	bool
diff --git a/arch/frv/kernel/Makefile b/arch/frv/kernel/Makefile
index c36f70b..ad4087b 100644
--- a/arch/frv/kernel/Makefile
+++ b/arch/frv/kernel/Makefile
@@ -5,7 +5,7 @@
 heads-y				:= head-uc-fr401.o head-uc-fr451.o head-uc-fr555.o
 heads-$(CONFIG_MMU)		:= head-mmu-fr451.o
 
-extra-y:= head.o init_task.o vmlinux.lds
+extra-y:= head.o vmlinux.lds
 
 obj-y := $(heads-y) entry.o entry-table.o break.o switch_to.o kernel_thread.o \
 	 kernel_execve.o process.o traps.o ptrace.o signal.o dma.o \
diff --git a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c
deleted file mode 100644
index e219881..0000000
--- a/arch/frv/kernel/init_task.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * 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..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 10/19] h8300: convert to generic init_task.c
  2008-12-11  3:52                 ` [PATCH 09/19] frv: " Kyle McMartin
@ 2008-12-11  3:52                   ` Kyle McMartin
  2008-12-11  3:52                     ` [PATCH 11/19] m32r: " Kyle McMartin
  2008-12-11 12:59                     ` [PATCH 10/19] h8300: " Arnd Bergmann
  0 siblings, 2 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, Kyle McMartin

This one has a bizarre 4-byte align on init_task, but that would
(at least) be implied alignment on a struct...

Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/h8300/Kconfig            |    1 -
 arch/h8300/kernel/Makefile    |    2 +-
 arch/h8300/kernel/init_task.c |   42 -----------------------------------------
 3 files changed, 1 insertions(+), 44 deletions(-)
 delete mode 100644 arch/h8300/kernel/init_task.c

diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 6ec26b4..28f06fd 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -9,7 +9,6 @@ config H8300
 	bool
 	default y
 	select HAVE_IDE
-	select HAVE_ARCH_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile
index 8d4d2a5..1cc57f8 100644
--- a/arch/h8300/kernel/Makefile
+++ b/arch/h8300/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y := vmlinux.lds
 
 obj-y := process.o traps.o ptrace.o irq.o \
 	 sys_h8300.o time.o signal.o \
-         setup.o gpio.o init_task.o syscalls.o \
+         setup.o gpio.o syscalls.o \
 	 entry.o timer/
 
 obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o 
diff --git a/arch/h8300/kernel/init_task.c b/arch/h8300/kernel/init_task.c
deleted file mode 100644
index 93a4899..0000000
--- a/arch/h8300/kernel/init_task.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  linux/arch/h8300/kernel/init_task.c
- */
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial task structure.
- *
- * 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);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-- 
1.6.0.4

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

* [PATCH 11/19] m32r: convert to generic init_task.c
  2008-12-11  3:52                   ` [PATCH 10/19] h8300: " Kyle McMartin
@ 2008-12-11  3:52                     ` Kyle McMartin
  2008-12-11  3:52                       ` [PATCH 12/19] m68knommu: " Kyle McMartin
  2008-12-11 12:59                     ` [PATCH 10/19] h8300: " Arnd Bergmann
  1 sibling, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, takata, Kyle McMartin

Cc: takata@linux-m32r.org
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/m32r/Kconfig            |    1 -
 arch/m32r/kernel/Makefile    |    2 +-
 arch/m32r/kernel/init_task.c |   40 ----------------------------------------
 3 files changed, 1 insertions(+), 42 deletions(-)
 delete mode 100644 arch/m32r/kernel/init_task.c

diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 2b1aa23..dbaed4a 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -10,7 +10,6 @@ config M32R
 	default y
 	select HAVE_IDE
 	select HAVE_OPROFILE
-	select HAVE_ARCH_INIT_TASK
 
 config SBUS
 	bool
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile
index 09200d4..25e96ab 100644
--- a/arch/m32r/kernel/Makefile
+++ b/arch/m32r/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the Linux/M32R kernel.
 #
 
-extra-y	:= head.o init_task.o vmlinux.lds
+extra-y	:= head.o vmlinux.lds
 
 obj-y	:= process.o entry.o traps.o align.o irq.o setup.o time.o \
 	m32r_ksyms.o sys_m32r.o signal.o ptrace.o
diff --git a/arch/m32r/kernel/init_task.c b/arch/m32r/kernel/init_task.c
deleted file mode 100644
index 0d658db..0000000
--- a/arch/m32r/kernel/init_task.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* orig : i386 init_task.c */
-
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-
-- 
1.6.0.4

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

* [PATCH 12/19] m68knommu: convert to generic init_task.c
  2008-12-11  3:52                     ` [PATCH 11/19] m32r: " Kyle McMartin
@ 2008-12-11  3:52                       ` Kyle McMartin
  2008-12-11  3:52                         ` [PATCH 13/19] mips: " Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, gerg, Kyle McMartin

Cc: gerg@uclinux.org
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/m68knommu/Kconfig            |    1 -
 arch/m68knommu/kernel/Makefile    |    2 +-
 arch/m68knommu/kernel/init_task.c |   42 -------------------------------------
 3 files changed, 1 insertions(+), 44 deletions(-)
 delete mode 100644 arch/m68knommu/kernel/init_task.c

diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 4019e0b..76b66fe 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -9,7 +9,6 @@ config M68K
 	bool
 	default y
 	select HAVE_IDE
-	select HAVE_ARCH_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/m68knommu/kernel/Makefile b/arch/m68knommu/kernel/Makefile
index f0eab3d..02a2c83 100644
--- a/arch/m68knommu/kernel/Makefile
+++ b/arch/m68knommu/kernel/Makefile
@@ -4,7 +4,7 @@
 
 extra-y := vmlinux.lds
 
-obj-y += dma.o entry.o init_task.o irq.o m68k_ksyms.o process.o ptrace.o \
+obj-y += dma.o entry.o irq.o m68k_ksyms.o process.o ptrace.o \
 	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
 
 obj-$(CONFIG_MODULES)	+= module.o
diff --git a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c
deleted file mode 100644
index 344c01a..0000000
--- a/arch/m68knommu/kernel/init_task.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  linux/arch/m68knommu/kernel/init_task.c
- */
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial task structure.
- *
- * 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);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-- 
1.6.0.4

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

* [PATCH 13/19] mips: convert to generic init_task.c
  2008-12-11  3:52                       ` [PATCH 12/19] m68knommu: " Kyle McMartin
@ 2008-12-11  3:52                         ` Kyle McMartin
  2008-12-11  3:52                           ` [PATCH 14/19] mn10300: " Kyle McMartin
  2008-12-11 13:04                           ` [PATCH 13/19] mips: " Arnd Bergmann
  0 siblings, 2 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, ralf, Kyle McMartin

Cc: ralf@linux-mips.org
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/mips/Kconfig            |    1 -
 arch/mips/kernel/Makefile    |    2 +-
 arch/mips/kernel/init_task.c |   41 -----------------------------------------
 3 files changed, 1 insertions(+), 43 deletions(-)
 delete mode 100644 arch/mips/kernel/init_task.c

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 0d15668..f4af967 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -7,7 +7,6 @@ config MIPS
 	# Horrible source of confusion.  Die, die, die ...
 	select EMBEDDED
 	select RTC_LIB
-	select HAVE_ARCH_INIT_TASK
 
 mainmenu "Linux/MIPS Kernel Configuration"
 
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index b1372c2..d2f31a1 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the Linux/MIPS kernel.
 #
 
-extra-y		:= head.o init_task.o vmlinux.lds
+extra-y		:= head.o vmlinux.lds
 
 obj-y		+= cpu-probe.o branch.o entry.o genex.o irq.o process.o \
 		   ptrace.o reset.o setup.o signal.o syscall.o \
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c
deleted file mode 100644
index d72487a..0000000
--- a/arch/mips/kernel/init_task.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/thread_info.h>
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by making sure
- * the linker maps this in the .text segment right after head.S,
- * and making head.S ensure the proper alignment.
- *
- * The things we do for performance..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"),
-	               __aligned__(THREAD_SIZE))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 14/19] mn10300: convert to generic init_task.c
  2008-12-11  3:52                         ` [PATCH 13/19] mips: " Kyle McMartin
@ 2008-12-11  3:52                           ` Kyle McMartin
  2008-12-11  3:52                             ` [PATCH 15/19] parisc: " Kyle McMartin
  2008-12-11 13:04                           ` [PATCH 13/19] mips: " Arnd Bergmann
  1 sibling, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, dhowells, Kyle McMartin

Cc: dhowells@redhat.com
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/mn10300/Kconfig            |    1 -
 arch/mn10300/kernel/Makefile    |    2 +-
 arch/mn10300/kernel/init_task.c |   44 ---------------------------------------
 3 files changed, 1 insertions(+), 46 deletions(-)
 delete mode 100644 arch/mn10300/kernel/init_task.c

diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 7cb6f51..9a9f433 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -7,7 +7,6 @@ mainmenu "Linux Kernel Configuration"
 
 config MN10300
 	def_bool y
-	select HAVE_ARCH_INIT_TASK
 
 config AM33
 	def_bool y
diff --git a/arch/mn10300/kernel/Makefile b/arch/mn10300/kernel/Makefile
index 23f2ab6..e9c4e61 100644
--- a/arch/mn10300/kernel/Makefile
+++ b/arch/mn10300/kernel/Makefile
@@ -1,7 +1,7 @@
 #
 # Makefile for the MN10300-specific core kernel code
 #
-extra-y := head.o init_task.o vmlinux.lds
+extra-y := head.o vmlinux.lds
 
 obj-y   := process.o signal.o entry.o fpu.o traps.o irq.o \
 	   ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \
diff --git a/arch/mn10300/kernel/init_task.c b/arch/mn10300/kernel/init_task.c
deleted file mode 100644
index af16f6e..0000000
--- a/arch/mn10300/kernel/init_task.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* MN10300 Initial task definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * 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..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 15/19] parisc: convert to generic init_task.c
  2008-12-11  3:52                           ` [PATCH 14/19] mn10300: " Kyle McMartin
@ 2008-12-11  3:52                             ` Kyle McMartin
  2008-12-11  3:52                               ` [PATCH 16/19] powerpc: " Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, Kyle McMartin

swapper page tables need to be moved before this file can be nuked...

Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/parisc/Kconfig            |    1 -
 arch/parisc/kernel/init_task.c |   28 ----------------------------
 2 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index fe0a9d3..644a70b 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -11,7 +11,6 @@ config PARISC
 	select HAVE_OPROFILE
 	select RTC_CLASS
 	select RTC_DRV_PARISC
-	select HAVE_ARCH_INIT_TASK
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
 	  in many of their workstations & servers (HP9000 700 and 800 series,
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index f5941c0..4bfa119 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -34,24 +34,6 @@
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial task structure.
- *
- * We need to make sure that this is 16384-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union
-	__attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
 #if PT_NLEVELS == 3
 /* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout
  * with the first pmd adjacent to the pgd and below it. gcc doesn't actually
@@ -63,13 +45,3 @@ pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data.vm0.pmd"), aligned(
 
 pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data.vm0.pgd"), aligned(PAGE_SIZE)));
 pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data.vm0.pte"), aligned(PAGE_SIZE)));
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-EXPORT_SYMBOL(init_task);
-
-__asm__(".data");
-struct task_struct init_task = INIT_TASK(init_task);
-- 
1.6.0.4

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

* [PATCH 16/19] powerpc: convert to generic init_task.c
  2008-12-11  3:52                             ` [PATCH 15/19] parisc: " Kyle McMartin
@ 2008-12-11  3:52                               ` Kyle McMartin
  2008-12-11  3:52                                 ` [PATCH 17/19] s390: " Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, paulus, Kyle McMartin

Cc: paulus@samba.org
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/powerpc/Kconfig            |    1 -
 arch/powerpc/kernel/Makefile    |    2 +-
 arch/powerpc/kernel/init_task.c |   35 -----------------------------------
 3 files changed, 1 insertions(+), 37 deletions(-)
 delete mode 100644 arch/powerpc/kernel/init_task.c

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9f1db45..525c13a 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -121,7 +121,6 @@ config PPC
 	select HAVE_DMA_ATTRS if PPC64
 	select USE_GENERIC_SMP_HELPERS if SMP
 	select HAVE_OPROFILE
-	select HAVE_ARCH_INIT_TASK
 
 config EARLY_PRINTK
 	bool
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 92673b4..b329ecb 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -27,7 +27,7 @@ endif
 
 obj-y				:= cputable.o ptrace.o syscalls.o \
 				   irq.o align.o signal_32.o pmc.o vdso.o \
-				   init_task.o process.o systbl.o idle.o \
+				   process.o systbl.o idle.o \
 				   signal.o sysfs.o
 obj-y				+= vdso32/
 obj-$(CONFIG_PPC64)		+= setup_64.o sys_ppc32.o \
diff --git a/arch/powerpc/kernel/init_task.c b/arch/powerpc/kernel/init_task.c
deleted file mode 100644
index 4c85b8d..0000000
--- a/arch/powerpc/kernel/init_task.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-#include <asm/uaccess.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 16384-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union 
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 17/19] s390: convert to generic init_task.c
  2008-12-11  3:52                               ` [PATCH 16/19] powerpc: " Kyle McMartin
@ 2008-12-11  3:52                                 ` Kyle McMartin
  2008-12-11  3:52                                   ` [PATCH 18/19] sh: " Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, schwidefsky, Kyle McMartin

Cc: schwidefsky@de.ibm.com
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/s390/Kconfig            |    1 -
 arch/s390/kernel/Makefile    |    2 +-
 arch/s390/kernel/init_task.c |   44 ------------------------------------------
 3 files changed, 1 insertions(+), 46 deletions(-)
 delete mode 100644 arch/s390/kernel/init_task.c

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 4381302..8116a33 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -75,7 +75,6 @@ config S390
 	select HAVE_KRETPROBES
 	select HAVE_KVM if 64BIT
 	select HAVE_ARCH_TRACEHOOK
-	select HAVE_ARCH_INIT_TASK
 
 source "init/Kconfig"
 
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index 50f657e..35331a2 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -19,7 +19,7 @@ obj-y	:=  bitmap.o traps.o time.o process.o base.o early.o \
 obj-y	+= $(if $(CONFIG_64BIT),entry64.o,entry.o)
 obj-y	+= $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
 
-extra-y				+= head.o init_task.o vmlinux.lds
+extra-y				+= head.o vmlinux.lds
 
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 obj-$(CONFIG_SMP)		+= smp.o topology.o
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
deleted file mode 100644
index e807168..0000000
--- a/arch/s390/kernel/init_task.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  arch/s390/kernel/init_task.c
- *
- *  S390 version
- *
- *  Derived from "arch/i386/kernel/init_task.c"
- */
-
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * 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..
- */
-union thread_union init_thread_union 
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 18/19] sh: convert to generic init_task.c
  2008-12-11  3:52                                 ` [PATCH 17/19] s390: " Kyle McMartin
@ 2008-12-11  3:52                                   ` Kyle McMartin
  2008-12-11  3:52                                     ` [PATCH 19/19] xtensa: " Kyle McMartin
  0 siblings, 1 reply; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, lethal, Kyle McMartin

struct pt_regs fake_swapper_regs needs to be moved to a more appropriate
location before this file can be nuked.

Cc: lethal@linux-sh.org
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/sh/Kconfig            |    1 -
 arch/sh/kernel/init_task.c |   25 -------------------------
 2 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 0ac7852..80119b3 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -13,7 +13,6 @@ config SUPERH
 	select HAVE_OPROFILE
 	select HAVE_GENERIC_DMA_COHERENT
 	select HAVE_IOREMAP_PROT if MMU
-	select HAVE_ARCH_INIT_TASK
 	help
 	  The SuperH is a RISC processor targeted for use in embedded systems
 	  and consumer electronics; it was also used in the Sega Dreamcast
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c
index b151a25..47596de 100644
--- a/arch/sh/kernel/init_task.c
+++ b/arch/sh/kernel/init_task.c
@@ -7,29 +7,4 @@
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
 struct pt_regs fake_swapper_regs;
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* [PATCH 19/19] xtensa: convert to generic init_task.c
  2008-12-11  3:52                                   ` [PATCH 18/19] sh: " Kyle McMartin
@ 2008-12-11  3:52                                     ` Kyle McMartin
  0 siblings, 0 replies; 36+ messages in thread
From: Kyle McMartin @ 2008-12-11  3:52 UTC (permalink / raw)
  To: linux-arch; +Cc: Kyle McMartin, chris, Kyle McMartin

Cc: chris@zankel.net
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
 arch/xtensa/Kconfig            |    1 -
 arch/xtensa/kernel/Makefile    |    2 +-
 arch/xtensa/kernel/init_task.c |   37 -------------------------------------
 3 files changed, 1 insertions(+), 39 deletions(-)
 delete mode 100644 arch/xtensa/kernel/init_task.c

diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index da236cf..6c873dc 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -15,7 +15,6 @@ config XTENSA
 	bool
 	default y
 	select HAVE_IDE
-	select HAVE_ARCH_INIT_TASK
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index 7419dbc..3ec85cb 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o vmlinux.lds
 
 obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \
 	 setup.o signal.o syscall.o time.o traps.o vectors.o platform.o  \
-	 pci-dma.o init_task.o io.o
+	 pci-dma.o io.o
 
 ## windowspill.o
 
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
deleted file mode 100644
index 3df469d..0000000
--- a/arch/xtensa/kernel/init_task.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * arch/xtensa/kernel/init_task.c
- *
- * Xtensa Processor version.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2007 Tensilica Inc.
- *
- * Chris Zankel <chris@zankel.net>
- */
-
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/module.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-{ INIT_THREAD_INFO(init_task) };
-
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-- 
1.6.0.4

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
  2008-12-11  3:52 ` [PATCH 01/19] add HAVE_ARCH_INIT_TASK Kyle McMartin
@ 2008-12-11  8:57 ` Geert Uytterhoeven
  2008-12-11 13:21   ` Arnd Bergmann
  2008-12-11 12:56 ` Sam Ravnborg
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 36+ messages in thread
From: Geert Uytterhoeven @ 2008-12-11  8:57 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch

On Thu, 11 Dec 2008, Kyle McMartin wrote:
> Create a common kernel/init_task.c, and convert low hanging fruit to
> use it. Architecture maintainers will need to ensure that I didn't
> break anything before applying the init_task removal patch to their
> arch.
> 
> A few architectures appear to possibly rely on link-ordering (with
> an extra-y makefile rule) and may need additional linker script rules.
> 
> Unconverted architectures so far are m68k (because it doesn't use an explicit
> init_task.c), ia64 (because it faffs about with init_thread_union), and
> sparc{,64} (which appear to rely on some magic.)

m68k just has the same code as anyone else embedded in
arch/m68k/kernel/process.c.

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] 36+ messages in thread

* Re: [PATCH 08/19] blackfin: convert to generic init_task.c
  2008-12-11  3:52               ` [PATCH 08/19] blackfin: " Kyle McMartin
  2008-12-11  3:52                 ` [PATCH 09/19] frv: " Kyle McMartin
@ 2008-12-11 12:55                 ` Arnd Bergmann
  1 sibling, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 12:55 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch, cooloney, Kyle McMartin

On Thursday 11 December 2008, Kyle McMartin wrote:

> -union thread_union init_thread_union
> -    __attribute__ ((__section__(".init_task.data"))) = {
> -INIT_THREAD_INFO(init_task)};

Did you notice that this is init_task.data, not data.init_task?
The blackfin vmlinux.lds.S file references data.* sections
together, so this appears broken to me with your patch.

	Arnd <><

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
  2008-12-11  3:52 ` [PATCH 01/19] add HAVE_ARCH_INIT_TASK Kyle McMartin
  2008-12-11  8:57 ` [RFC PATCH 00/19] unify init_task Geert Uytterhoeven
@ 2008-12-11 12:56 ` Sam Ravnborg
  2008-12-11 13:10 ` Arnd Bergmann
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 36+ messages in thread
From: Sam Ravnborg @ 2008-12-11 12:56 UTC (permalink / raw)
  To: Kyle McMartin, David Miller; +Cc: linux-arch

Hi Kyle.

> 
> Unconverted architectures so far are m68k (because it doesn't use an explicit
> init_task.c), ia64 (because it faffs about with init_thread_union), and
> sparc{,64} (which appear to rely on some magic.)

sparc has harcoded the alignment requirments in init_task.c.
I will try to make it look like all others by moving
this to vmlinux.lds.

Speaking of that there seems to be another bit that could be
shared between the arch vmlinux.lds as all arch has init_task included.

	Sam

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

* Re: [PATCH 10/19] h8300: convert to generic init_task.c
  2008-12-11  3:52                   ` [PATCH 10/19] h8300: " Kyle McMartin
  2008-12-11  3:52                     ` [PATCH 11/19] m32r: " Kyle McMartin
@ 2008-12-11 12:59                     ` Arnd Bergmann
  1 sibling, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 12:59 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch, Kyle McMartin

On Thursday 11 December 2008, Kyle McMartin wrote:
> This one has a bizarre 4-byte align on init_task, but that would
> (at least) be implied alignment on a struct...
> 
> Signed-off-by: Kyle McMartin <kyle@redhat.com>

I'm pretty sure that the .align was copied from m68knommu, which does
indeed have bizarre alignment rules and needs this.

	Arnd <><

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

* Re: [PATCH 13/19] mips: convert to generic init_task.c
  2008-12-11  3:52                         ` [PATCH 13/19] mips: " Kyle McMartin
  2008-12-11  3:52                           ` [PATCH 14/19] mn10300: " Kyle McMartin
@ 2008-12-11 13:04                           ` Arnd Bergmann
  2008-12-11 13:21                             ` Ralf Baechle
  1 sibling, 1 reply; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 13:04 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch, ralf, Kyle McMartin

On Thursday 11 December 2008, Kyle McMartin wrote:
> - */
> -union thread_union init_thread_union
> -       __attribute__((__section__(".data.init_task"),
> -                      __aligned__(THREAD_SIZE))) =
> -               { INIT_THREAD_INFO(init_task) };
> -

The __aligned__(THREAD_SIZE) is only present in sparc, mips and
parisc (though the latter uses 128 byte align). I guess you
verified that dropping it is ok for parisc, but is that also
true for mips and sparc?

	Arnd <><

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
                   ` (2 preceding siblings ...)
  2008-12-11 12:56 ` Sam Ravnborg
@ 2008-12-11 13:10 ` Arnd Bergmann
  2008-12-11 13:23 ` Arnd Bergmann
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 13:10 UTC (permalink / raw)
  To: Kyle McMartin, Jeff Dike; +Cc: linux-arch

Leave arch/x86/kernel/init_task.c hanging around with the cpu0_irqstack
definition in it, a later patch can move it to an appropriate place and
nuke the file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
On Thursday 11 December 2008, Kyle McMartin wrote:

> Unconverted architectures so far are m68k (because it doesn't use an explicit
> init_task.c), ia64 (because it faffs about with init_thread_union), and
> sparc{,64} (which appear to rely on some magic.)

Apparently, you also forget arch/um. It is similar to the x86 version.

--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -10,34 +10,10 @@
 #include "linux/mqueue.h"
 #include "asm/uaccess.h"
 
-static struct fs_struct init_fs = INIT_FS;
-struct mm_struct init_mm = INIT_MM(init_mm);
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-
 /*
- * Initial thread structure.
- *
- * We need to make sure that this is aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
+ * This definition is left over from the move to kernel/init_task.c
  */
 
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
 union thread_union cpu0_irqstack
 	__attribute__((__section__(".data.init_irqstack"))) =
 		{ INIT_THREAD_INFO(init_task) };

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11  8:57 ` [RFC PATCH 00/19] unify init_task Geert Uytterhoeven
@ 2008-12-11 13:21   ` Arnd Bergmann
  2008-12-11 14:02     ` Geert Uytterhoeven
  0 siblings, 1 reply; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 13:21 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Kyle McMartin, linux-arch

On Thursday 11 December 2008, Geert Uytterhoeven wrote:

> > Unconverted architectures so far are m68k (because it doesn't use an explicit
> > init_task.c), ia64 (because it faffs about with init_thread_union), and
> > sparc{,64} (which appear to rely on some magic.)
> 
> m68k just has the same code as anyone else embedded in
> arch/m68k/kernel/process.c.

There is an extra aligned(THREAD_SIZE))) attribute in the m68k thread_info
definition, just like sparc and mips. Are you sure that removing it is
safe on m68k?

	Arnd <><

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

* Re: [PATCH 13/19] mips: convert to generic init_task.c
  2008-12-11 13:04                           ` [PATCH 13/19] mips: " Arnd Bergmann
@ 2008-12-11 13:21                             ` Ralf Baechle
  0 siblings, 0 replies; 36+ messages in thread
From: Ralf Baechle @ 2008-12-11 13:21 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Kyle McMartin, linux-arch, Kyle McMartin

On Thu, Dec 11, 2008 at 02:04:25PM +0100, Arnd Bergmann wrote:

> On Thursday 11 December 2008, Kyle McMartin wrote:
> > - */
> > -union thread_union init_thread_union
> > -       __attribute__((__section__(".data.init_task"),
> > -                      __aligned__(THREAD_SIZE))) =
> > -               { INIT_THREAD_INFO(init_task) };
> > -
> 
> The __aligned__(THREAD_SIZE) is only present in sparc, mips and
> parisc (though the latter uses 128 byte align). I guess you
> verified that dropping it is ok for parisc, but is that also
> true for mips and sparc?

Duhh...  Good point.  The alignment is also enforced or at least should
be enforced in vmlinux.lds.S.  Which in case of MIPS

[...]
                . = ALIGN(_PAGE_SIZE);
                *(.data.init_task)
[...]

only enforces _PAGE_SIZE alignment and _PAGE_SIZE can be less than
THREAD_SIZE so removing the __aligned__ would have broken things.  Of
course that's a bug of the linker script not Kyle's patches.

  Ralf

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
                   ` (3 preceding siblings ...)
  2008-12-11 13:10 ` Arnd Bergmann
@ 2008-12-11 13:23 ` Arnd Bergmann
  2008-12-11 13:26 ` [PATCH] cris: convert to generic init_task Arnd Bergmann
  2008-12-11 16:10 ` [RFC PATCH 00/19] unify init_task Arnd Bergmann
  6 siblings, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 13:23 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch

On Thursday 11 December 2008, Kyle McMartin wrote:
> Create a common kernel/init_task.c, and convert low hanging fruit to
> use it. Architecture maintainers will need to ensure that I didn't
> break anything before applying the init_task removal patch to their
> arch.

Incidentally, I was working on the same stuff already, just didn't
get around to posting it before the discussion arose here.
My patches were largely identical, so I'm just commenting on
what I found beyond what you did.

The major difference to my patch is that I added a CONFIG_GENERIC_INIT_TASK
to each architecture I converted rather than remove the HAVE_ARCH_INIT_TASK.

> A few architectures appear to possibly rely on link-ordering (with
> an extra-y makefile rule) and may need additional linker script rules.

My approach was add "head-y += kernel/init_task" to each architecture
Makefile in order to keep the link order the same. If it work without
that, even better.

> Unconverted architectures so far are m68k (because it doesn't use an explicit
> init_task.c), ia64 (because it faffs about with init_thread_union), and
> sparc{,64} (which appear to rely on some magic.)

And you forgot about um and cris. I'll follow up with trivial patches.

> The other open question is what to do about init_mm, which was supposed to be
> removed in 2.6.26...

Only the EXPORT_SYMBOL was to be removed, not the init_mm itself, because
it is still referenced by init_task. I'd vote for not putting the export
into kernel/init_task.c. There are no modular users in the kernel.

	Arnd <><

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

* [PATCH] cris: convert to generic init_task
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
                   ` (4 preceding siblings ...)
  2008-12-11 13:23 ` Arnd Bergmann
@ 2008-12-11 13:26 ` Arnd Bergmann
  2008-12-11 16:10 ` [RFC PATCH 00/19] unify init_task Arnd Bergmann
  6 siblings, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 13:26 UTC (permalink / raw)
  To: Kyle McMartin, Mikael Starvik, Jesper Nilsson, dev-etrax; +Cc: linux-arch

Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---

This assumes that the kernel/init_task.c file is already present.

--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -31,40 +31,6 @@
 //#define DEBUG
 
 /*
- * Initial task structure. Make this a per-architecture thing,
- * because different architectures tend to have different
- * alignment requirements and potentially different initial
- * setup.
- */
-
-static struct fs_struct init_fs = INIT_FS;
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
-/*
- * Initial thread structure.
- *
- * We need to make sure that this is 8192-byte aligned due to the
- * way process stacks are handled. This is done by having a special
- * "init_task" linker map entry..
- */
-union thread_union init_thread_union 
-	__attribute__((__section__(".data.init_task"))) =
-		{ INIT_THREAD_INFO(init_task) };
-
-/*
- * Initial task structure.
- *
- * All other task structs will be allocated on slabs in fork.c
- */
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);
-
-/*
  * The hlt_counter, disable_hlt and enable_hlt is just here as a hook if
  * there would ever be a halt sequence (for power save when idle) with
  * some largish delay when halting or resuming *and* a driver that can't

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11 13:21   ` Arnd Bergmann
@ 2008-12-11 14:02     ` Geert Uytterhoeven
  2008-12-11 14:26       ` Arnd Bergmann
  0 siblings, 1 reply; 36+ messages in thread
From: Geert Uytterhoeven @ 2008-12-11 14:02 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Kyle McMartin, linux-arch

On Thu, 11 Dec 2008, Arnd Bergmann wrote:
> On Thursday 11 December 2008, Geert Uytterhoeven wrote:
> > > Unconverted architectures so far are m68k (because it doesn't use an explicit
> > > init_task.c), ia64 (because it faffs about with init_thread_union), and
> > > sparc{,64} (which appear to rely on some magic.)
> > 
> > m68k just has the same code as anyone else embedded in
> > arch/m68k/kernel/process.c.
> 
> There is an extra aligned(THREAD_SIZE))) attribute in the m68k thread_info
> definition, just like sparc and mips. Are you sure that removing it is
> safe on m68k?

Thanks, I missed that one. I should have launched `diff' instead of my own
eyes...

Wondering, would it harm a lot having the aligned(THREAD_SIZE) everywhere?

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] 36+ messages in thread

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11 14:02     ` Geert Uytterhoeven
@ 2008-12-11 14:26       ` Arnd Bergmann
  0 siblings, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 14:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Kyle McMartin, linux-arch

On Thursday 11 December 2008, Geert Uytterhoeven wrote:
> Wondering, would it harm a lot having the aligned(THREAD_SIZE) everywhere?

No real harm, but some architectures don't require alignment of thread_info,
and they might waste a few kb because of the forced alignment.

The easier solution should be to force the alignment in
arch/{sparc,m68k}/vmlinux.lds.S, like the other architectures have it.

m68k-sun3 currently aligns thread_info to PAGE_SIZE, m68k aligns it
to 8192. AFAICT, you can simply replace both with THREAD_SIZE.

	Arnd <><

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

* Re: [RFC PATCH 00/19] unify init_task
  2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
                   ` (5 preceding siblings ...)
  2008-12-11 13:26 ` [PATCH] cris: convert to generic init_task Arnd Bergmann
@ 2008-12-11 16:10 ` Arnd Bergmann
  6 siblings, 0 replies; 36+ messages in thread
From: Arnd Bergmann @ 2008-12-11 16:10 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch

On Thursday 11 December 2008, Kyle McMartin wrote:
> Create a common kernel/init_task.c, and convert low hanging fruit to
> use it. Architecture maintainers will need to ensure that I didn't
> break anything before applying the init_task removal patch to their
> arch.
> 
> A few architectures appear to possibly rely on link-ordering (with
> an extra-y makefile rule) and may need additional linker script rules.

FWIW, here is the alignment of init_thread_info on all architectures:

alpha: 2 * PAGE_SIZE
arm, avr32, frv, mn10300, s390, sh, x86: THREAD_SIZE
blackfin: THREAD_SIZE, but uses a different section
cris, m68k-sun3: PAGE_SIZE
h8300, m32r, m68knommu, ppc32, xtensa, m68k-std: 0x2000/8192
ia64: PAGE_SIZE (but ia64 is different)
mips: _PAGE_SIZE
parisc, ppc64: 16384
ppc32: 8192
um: KERNEL_STACK_SIZE
sparc: PAGE_SIZE with .text section
sparc64: 16384 (implicit)

This is the same as THREAD_SIZE on all architectures, except for
mips in certain configurations, which should be fixed.

Maybe we can get all of them to just use THREAD_SIZE in there?

	Arnd <><

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

* Re: [PATCH 06/19] arm: convert to generic init_task.c
  2008-12-11  3:52           ` [PATCH 06/19] arm: " Kyle McMartin
  2008-12-11  3:52             ` [PATCH 07/19] avr32: " Kyle McMartin
@ 2008-12-12 19:29             ` Russell King
  1 sibling, 0 replies; 36+ messages in thread
From: Russell King @ 2008-12-12 19:29 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch, Kyle McMartin

On Thu, Dec 11, 2008 at 03:52:44AM +0000, Kyle McMartin wrote:
> Cc: rmk@arm.linux.org.uk
> Signed-off-by: Kyle McMartin <kyle@redhat.com>

Looks fine.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: [PATCH 07/19] avr32: convert to generic init_task.c
  2008-12-11  3:52             ` [PATCH 07/19] avr32: " Kyle McMartin
  2008-12-11  3:52               ` [PATCH 08/19] blackfin: " Kyle McMartin
@ 2009-01-06 12:55               ` Haavard Skinnemoen
  2009-01-06 12:55                 ` Haavard Skinnemoen
  1 sibling, 1 reply; 36+ messages in thread
From: Haavard Skinnemoen @ 2009-01-06 12:55 UTC (permalink / raw)
  Cc: linux-arch, Kyle McMartin, hskinnemoen, Kyle McMartin

Kyle McMartin wrote:
> Cc: hskinnemoen@atmel.com
> Signed-off-by: Kyle McMartin <kyle@redhat.com>

Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>

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

* Re: [PATCH 07/19] avr32: convert to generic init_task.c
  2009-01-06 12:55               ` [PATCH 07/19] avr32: " Haavard Skinnemoen
@ 2009-01-06 12:55                 ` Haavard Skinnemoen
  0 siblings, 0 replies; 36+ messages in thread
From: Haavard Skinnemoen @ 2009-01-06 12:55 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-arch, hskinnemoen, Kyle McMartin

Kyle McMartin wrote:
> Cc: hskinnemoen@atmel.com
> Signed-off-by: Kyle McMartin <kyle@redhat.com>

Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>

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

end of thread, other threads:[~2009-01-06 13:01 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-11  3:52 [RFC PATCH 00/19] unify init_task Kyle McMartin
2008-12-11  3:52 ` [PATCH 01/19] add HAVE_ARCH_INIT_TASK Kyle McMartin
2008-12-11  3:52   ` [PATCH 02/19] add generic kernel/init_task.c Kyle McMartin
2008-12-11  3:52     ` [PATCH 03/19] x86: convert to generic init_task.c Kyle McMartin
2008-12-11  3:52       ` [PATCH 04/19] alpha: rename .data.init_thread to .data.init_task Kyle McMartin
2008-12-11  3:52         ` [PATCH 05/19] alpha: convert to generic init_task.c Kyle McMartin
2008-12-11  3:52           ` [PATCH 06/19] arm: " Kyle McMartin
2008-12-11  3:52             ` [PATCH 07/19] avr32: " Kyle McMartin
2008-12-11  3:52               ` [PATCH 08/19] blackfin: " Kyle McMartin
2008-12-11  3:52                 ` [PATCH 09/19] frv: " Kyle McMartin
2008-12-11  3:52                   ` [PATCH 10/19] h8300: " Kyle McMartin
2008-12-11  3:52                     ` [PATCH 11/19] m32r: " Kyle McMartin
2008-12-11  3:52                       ` [PATCH 12/19] m68knommu: " Kyle McMartin
2008-12-11  3:52                         ` [PATCH 13/19] mips: " Kyle McMartin
2008-12-11  3:52                           ` [PATCH 14/19] mn10300: " Kyle McMartin
2008-12-11  3:52                             ` [PATCH 15/19] parisc: " Kyle McMartin
2008-12-11  3:52                               ` [PATCH 16/19] powerpc: " Kyle McMartin
2008-12-11  3:52                                 ` [PATCH 17/19] s390: " Kyle McMartin
2008-12-11  3:52                                   ` [PATCH 18/19] sh: " Kyle McMartin
2008-12-11  3:52                                     ` [PATCH 19/19] xtensa: " Kyle McMartin
2008-12-11 13:04                           ` [PATCH 13/19] mips: " Arnd Bergmann
2008-12-11 13:21                             ` Ralf Baechle
2008-12-11 12:59                     ` [PATCH 10/19] h8300: " Arnd Bergmann
2008-12-11 12:55                 ` [PATCH 08/19] blackfin: " Arnd Bergmann
2009-01-06 12:55               ` [PATCH 07/19] avr32: " Haavard Skinnemoen
2009-01-06 12:55                 ` Haavard Skinnemoen
2008-12-12 19:29             ` [PATCH 06/19] arm: " Russell King
2008-12-11  8:57 ` [RFC PATCH 00/19] unify init_task Geert Uytterhoeven
2008-12-11 13:21   ` Arnd Bergmann
2008-12-11 14:02     ` Geert Uytterhoeven
2008-12-11 14:26       ` Arnd Bergmann
2008-12-11 12:56 ` Sam Ravnborg
2008-12-11 13:10 ` Arnd Bergmann
2008-12-11 13:23 ` Arnd Bergmann
2008-12-11 13:26 ` [PATCH] cris: convert to generic init_task Arnd Bergmann
2008-12-11 16:10 ` [RFC PATCH 00/19] unify init_task Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).