linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch V2 00/31] init_task: Use a generic init_task variant
@ 2012-05-03  9:02 Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 01/31] frv: Use correct size for task_struct allocation Thomas Gleixner
                   ` (32 more replies)
  0 siblings, 33 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML

All architectures do roughly the same to initialize init_task. The
only architecture which deviates is ia64 as it allocates task_struct
and thread_info together.

Move the common code to init/init_task.c and remove all the redundant
copies.

Difference to V1:
	- FRV updates
	- left IA64 alone
	- Score/Sparc corrections
	- Picked up Acked-bys

Thanks,

        tglx

 arch/alpha/kernel/init_task.c           |   17 -------
 arch/arm/kernel/init_task.c             |   37 ----------------
 arch/avr32/kernel/init_task.c           |   31 --------------
 arch/blackfin/kernel/init_task.c        |   32 --------------
 arch/frv/kernel/init_task.c             |   32 --------------
 arch/h8300/kernel/init_task.c           |   36 ----------------
 arch/hexagon/kernel/init_task.c         |   54 ------------------------
 arch/m32r/kernel/init_task.c            |   34 ---------------
 arch/m68k/kernel/init_task.c            |   35 ----------------
 arch/microblaze/kernel/init_task.c      |   26 -----------
 arch/mips/kernel/init_task.c            |   35 ----------------
 arch/mn10300/kernel/init_task.c         |   39 -----------------
 arch/openrisc/kernel/init_task.c        |   42 -------------------
 arch/parisc/kernel/init_task.c          |   70 --------------------------------
 arch/powerpc/kernel/init_task.c         |   29 -------------
 arch/s390/kernel/init_task.c            |   38 -----------------
 arch/score/kernel/init_task.c           |   46 ---------------------
 arch/sh/kernel/init_task.c              |   30 -------------
 arch/sparc/kernel/init_task.c           |   22 ----------
 arch/tile/kernel/init_task.c            |   59 --------------------------
 arch/um/kernel/init_task.c              |   38 -----------------
 arch/unicore32/kernel/init_task.c       |   44 --------------------
 arch/x86/kernel/init_task.c             |   42 -------------------
 arch/xtensa/kernel/init_task.c          |   31 --------------
 tip/arch/Kconfig                        |    9 ++++
 tip/arch/alpha/kernel/Makefile          |    2 
 tip/arch/arm/Makefile                   |    2 
 tip/arch/arm/kernel/Makefile            |    2 
 tip/arch/avr32/kernel/Makefile          |    2 
 tip/arch/blackfin/Makefile              |    2 
 tip/arch/blackfin/kernel/Makefile       |    2 
 tip/arch/c6x/kernel/process.c           |   16 -------
 tip/arch/cris/kernel/process.c          |   28 ------------
 tip/arch/frv/Kconfig                    |    1 
 tip/arch/frv/Makefile                   |    2 
 tip/arch/frv/include/asm/thread_info.h  |    4 -
 tip/arch/frv/kernel/Makefile            |    2 
 tip/arch/frv/kernel/process.c           |   15 ------
 tip/arch/h8300/kernel/Makefile          |    2 
 tip/arch/hexagon/Makefile               |    3 -
 tip/arch/hexagon/kernel/Makefile        |    2 
 tip/arch/ia64/Kconfig                   |    3 +
 tip/arch/ia64/include/asm/thread_info.h |    3 -
 tip/arch/m32r/Makefile                  |    2 
 tip/arch/m32r/kernel/Makefile           |    2 
 tip/arch/m68k/kernel/Makefile           |    2 
 tip/arch/microblaze/kernel/Makefile     |    2 
 tip/arch/mips/Makefile                  |    2 
 tip/arch/mips/kernel/Makefile           |    2 
 tip/arch/mips/kernel/vmlinux.lds.S      |    2 
 tip/arch/mn10300/Makefile               |    2 
 tip/arch/mn10300/kernel/Makefile        |    2 
 tip/arch/openrisc/Makefile              |    2 
 tip/arch/openrisc/kernel/Makefile       |    2 
 tip/arch/parisc/mm/init.c               |   12 +++++
 tip/arch/powerpc/kernel/Makefile        |    2 
 tip/arch/s390/Makefile                  |    1 
 tip/arch/s390/kernel/Makefile           |    2 
 tip/arch/score/kernel/Makefile          |    2 
 tip/arch/sh/Makefile                    |    2 
 tip/arch/sh/kernel/Makefile             |    2 
 tip/arch/sparc/Makefile                 |    1 
 tip/arch/sparc/kernel/Makefile          |    1 
 tip/arch/tile/kernel/Makefile           |    2 
 tip/arch/tile/kernel/setup.c            |   16 +++++++
 tip/arch/um/kernel/Makefile             |    2 
 tip/arch/um/kernel/um_arch.c            |    5 ++
 tip/arch/unicore32/Makefile             |    1 
 tip/arch/unicore32/kernel/Makefile      |    2 
 tip/arch/x86/Makefile                   |    1 
 tip/arch/x86/kernel/Makefile            |    2 
 tip/arch/x86/kernel/process.c           |    9 ++++
 tip/arch/xtensa/kernel/Makefile         |    2 
 tip/init/Makefile                       |    4 +
 tip/init/init_task.c                    |   24 ++++++++++
 tip/kernel/fork.c                       |    6 +-
 tip/kernel/sched/Makefile               |    2 
 77 files changed, 117 insertions(+), 1009 deletions(-)



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

* [patch V2 02/31] frv: Use core allocator for task_struct
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 01/31] frv: Use correct size for task_struct allocation Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:47   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines Thomas Gleixner
                   ` (30 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: David Howells

[-- Attachment #1: frv-use-core-allocator-for-task-struct.patch --]
[-- Type: text/plain, Size: 1265 bytes --]

There is no point having a copy of the core allocator.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Howells <dhowells@redhat.com>
---
 arch/frv/include/asm/thread_info.h |    2 --
 arch/frv/kernel/process.c          |   10 ----------
 2 files changed, 12 deletions(-)

Index: tip/arch/frv/include/asm/thread_info.h
===================================================================
--- tip.orig/arch/frv/include/asm/thread_info.h
+++ tip/arch/frv/include/asm/thread_info.h
@@ -21,8 +21,6 @@
 
 #define THREAD_SIZE		8192
 
-#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
-
 /*
  * low level task data that entry.S needs immediate access to
  * - this struct should fit entirely inside of one cache line
Index: tip/arch/frv/kernel/process.c
===================================================================
--- tip.orig/arch/frv/kernel/process.c
+++ tip/arch/frv/kernel/process.c
@@ -43,16 +43,6 @@ asmlinkage void ret_from_fork(void);
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
 
-struct task_struct *alloc_task_struct_node(int node)
-{
-	return kmalloc_node(sizeof(task_struct), GFP_KERNEL, node);
-}
-
-void free_task_struct(struct task_struct *p)
-{
-	kfree(p);
-}
-
 static void core_sleep_idle(void)
 {
 #ifdef LED_DEBUG_SLEEP



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

* [patch V2 01/31] frv: Use correct size for task_struct allocation
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:46   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 02/31] frv: Use core allocator for task_struct Thomas Gleixner
                   ` (31 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: David Howells

[-- Attachment #1: frv-use-correct-size-for-task-struct-allocation.patch --]
[-- Type: text/plain, Size: 1114 bytes --]

alloc_task_struct_node() allocates THREAD_SIZE and maintains some
weird refcount in the allocated memory. This never blew up as
task_struct size on 32bit machines was always less than THREAD_SIZE

Allocate just sizeof(struct task_struct) and get rid of the magic
refcounting.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Howells <dhowells@redhat.com>

---
 arch/frv/kernel/process.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Index: tip/arch/frv/kernel/process.c
===================================================================
--- tip.orig/arch/frv/kernel/process.c
+++ tip/arch/frv/kernel/process.c
@@ -45,17 +45,12 @@ EXPORT_SYMBOL(pm_power_off);
 
 struct task_struct *alloc_task_struct_node(int node)
 {
-	struct task_struct *p = kmalloc_node(THREAD_SIZE, GFP_KERNEL, node);
-
-	if (p)
-		atomic_set((atomic_t *)(p+1), 1);
-	return p;
+	return kmalloc_node(sizeof(task_struct), GFP_KERNEL, node);
 }
 
 void free_task_struct(struct task_struct *p)
 {
-	if (atomic_dec_and_test((atomic_t *)(p+1)))
-		kfree(p);
+	kfree(p);
 }
 
 static void core_sleep_idle(void)



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

* [patch V2 04/31] init_task: Create generic init_task instance
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (2 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:49   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 05/31] alpha: Use generic init_task Thomas Gleixner
                   ` (28 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML
  Cc: Benjamin Herrenschmidt, Chen Liqin, Chris Metcalf, Chris Zankel,
	David Howells, David S. Miller, Geert Uytterhoeven, Guan Xuetao,
	Haavard Skinnemoen, Hirokazu Takata, James E.J. Bottomley,
	Jesper Nilsson, Jonas Bonn, Mark Salter, Martin Schwidefsky,
	Heiko Carstens, Matt Turner, Michal Simek, Mike Frysinger,
	Paul Mundt, Ralf Baechle, Richard Kuo, Richard Weinberger,
	Russell King, x86, Yoshinori Sato

[-- Attachment #1: init-task-move-common-code-to-core.patch --]
[-- Type: text/plain, Size: 3537 bytes --]

All archs define init_task in the same way (except ia64, but there is
no particular reason why ia64 cannot use the common version). Create a
generic instance so all archs can be converted over.

The config switch is temporary and will be removed when all archs are
converted over.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: x86@kernel.org
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 arch/Kconfig          |    3 +++
 init/Makefile         |    1 +
 init/init_task.c      |   24 ++++++++++++++++++++++++
 kernel/sched/Makefile |    2 --
 4 files changed, 28 insertions(+), 2 deletions(-)

Index: tip/arch/Kconfig
===================================================================
--- tip.orig/arch/Kconfig
+++ tip/arch/Kconfig
@@ -148,6 +148,9 @@ config USE_GENERIC_SMP_HELPERS
 config GENERIC_SMP_IDLE_THREAD
        bool
 
+config HAVE_GENERIC_INIT_TASK
+       bool
+
 config HAVE_REGS_AND_STACK_ACCESS_API
 	bool
 	help
Index: tip/init/Makefile
===================================================================
--- tip.orig/init/Makefile
+++ tip/init/Makefile
@@ -9,6 +9,7 @@ else
 obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
 endif
 obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
+obj-$(CONFIG_HAVE_GENERIC_INIT_TASK) += init_task.o
 
 mounts-y			:= do_mounts.o
 mounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o
Index: tip/init/init_task.c
===================================================================
--- /dev/null
+++ tip/init/init_task.c
@@ -0,0 +1,24 @@
+#include <linux/init_task.h>
+#include <linux/module.h>
+#include <linux/mqueue.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
+
+static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
+static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+
+/* Initial task structure */
+struct task_struct init_task = INIT_TASK(init_task);
+EXPORT_SYMBOL(init_task);
+
+/*
+ * Initial thread structure. Alignment of this is handled by a special
+ * linker map entry.
+ */
+union thread_union init_thread_union __init_task_data =
+	{ INIT_THREAD_INFO(init_task) };
Index: tip/kernel/sched/Makefile
===================================================================
--- tip.orig/kernel/sched/Makefile
+++ tip/kernel/sched/Makefile
@@ -16,5 +16,3 @@ obj-$(CONFIG_SMP) += cpupri.o
 obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
 obj-$(CONFIG_SCHEDSTATS) += stats.o
 obj-$(CONFIG_SCHED_DEBUG) += debug.o
-
-



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

* [patch V2 03/31] task_allocator: Use config switches instead of magic defines
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 01/31] frv: Use correct size for task_struct allocation Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 02/31] frv: Use core allocator for task_struct Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 04/31] init_task: Create generic init_task instance Thomas Gleixner
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: David Howells, Tony Luck

[-- Attachment #1: task-alloc-use-config-switch.patch --]
[-- Type: text/plain, Size: 3941 bytes --]

Replace __HAVE_ARCH_TASK_ALLOCATOR and __HAVE_ARCH_THREAD_ALLOCATOR
with proper config switches.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
---
 arch/Kconfig                        |    6 ++++++
 arch/frv/Kconfig                    |    1 +
 arch/frv/include/asm/thread_info.h  |    2 --
 arch/ia64/Kconfig                   |    2 ++
 arch/ia64/include/asm/thread_info.h |    3 ---
 kernel/fork.c                       |    6 +++---
 6 files changed, 12 insertions(+), 8 deletions(-)

Index: tip/arch/Kconfig
===================================================================
--- tip.orig/arch/Kconfig
+++ tip/arch/Kconfig
@@ -219,4 +219,10 @@ config HAVE_CMPXCHG_DOUBLE
 config ARCH_WANT_OLD_COMPAT_IPC
 	bool
 
+config ARCH_TASK_STRUCT_ALLOCATOR
+	bool
+
+config ARCH_THREAD_INFO_ALLOCATOR
+	bool
+
 source "kernel/gcov/Kconfig"
Index: tip/arch/frv/Kconfig
===================================================================
--- tip.orig/arch/frv/Kconfig
+++ tip/arch/frv/Kconfig
@@ -9,6 +9,7 @@ config FRV
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_CPU_DEVICES
+	select ARCH_THREAD_INFO_ALLOCATOR
 
 config ZONE_DMA
 	bool
Index: tip/arch/frv/include/asm/thread_info.h
===================================================================
--- tip.orig/arch/frv/include/asm/thread_info.h
+++ tip/arch/frv/include/asm/thread_info.h
@@ -80,8 +80,6 @@ register struct thread_info *__current_t
 
 #define current_thread_info() ({ __current_thread_info; })
 
-#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
-
 /* thread information allocation */
 #ifdef CONFIG_DEBUG_STACK_USAGE
 #define alloc_thread_info_node(tsk, node)			\
Index: tip/arch/ia64/Kconfig
===================================================================
--- tip.orig/arch/ia64/Kconfig
+++ tip/arch/ia64/Kconfig
@@ -34,6 +34,8 @@ config IA64
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
+	select ARCH_TASK_STRUCT_ALLOCATOR
+	select ARCH_THREAD_INFO_ALLOCATOR
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
Index: tip/arch/ia64/include/asm/thread_info.h
===================================================================
--- tip.orig/arch/ia64/include/asm/thread_info.h
+++ tip/arch/ia64/include/asm/thread_info.h
@@ -54,8 +54,6 @@ struct thread_info {
 	},					\
 }
 
-#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
-
 #ifndef ASM_OFFSETS_C
 /* how to get the thread information struct from C */
 #define current_thread_info()	((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
@@ -84,7 +82,6 @@ struct thread_info {
 #endif
 #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
 
-#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
 #define alloc_task_struct_node(node)						\
 ({										\
 	struct page *page = alloc_pages_node(node, GFP_KERNEL | __GFP_COMP,	\
Index: tip/kernel/fork.c
===================================================================
--- tip.orig/kernel/fork.c
+++ tip/kernel/fork.c
@@ -111,7 +111,7 @@ int nr_processes(void)
 	return total;
 }
 
-#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
+#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
 # define alloc_task_struct_node(node)		\
 		kmem_cache_alloc_node(task_struct_cachep, GFP_KERNEL, node)
 # define free_task_struct(tsk)			\
@@ -119,7 +119,7 @@ int nr_processes(void)
 static struct kmem_cache *task_struct_cachep;
 #endif
 
-#ifndef __HAVE_ARCH_THREAD_INFO_ALLOCATOR
+#ifndef CONFIG_ARCH_THREAD_INFO_ALLOCATOR
 static struct thread_info *alloc_thread_info_node(struct task_struct *tsk,
 						  int node)
 {
@@ -213,7 +213,7 @@ EXPORT_SYMBOL_GPL(__put_task_struct);
 
 void __init fork_init(unsigned long mempages)
 {
-#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
+#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
 #ifndef ARCH_MIN_TASKALIGN
 #define ARCH_MIN_TASKALIGN	L1_CACHE_BYTES
 #endif



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

* [patch V2 06/31] arm: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (4 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 05/31] alpha: Use generic init_task Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:51   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 07/31] avr32: " Thomas Gleixner
                   ` (26 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Russell King

[-- Attachment #1: arm-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3125 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/Kconfig            |    1 +
 arch/arm/Makefile           |    2 +-
 arch/arm/kernel/Makefile    |    2 +-
 arch/arm/kernel/init_task.c |   37 -------------------------------------
 4 files changed, 3 insertions(+), 39 deletions(-)

Index: tip/arch/arm/Kconfig
===================================================================
--- tip.orig/arch/arm/Kconfig
+++ tip/arch/arm/Kconfig
@@ -35,6 +35,7 @@ config ARM
 	select GENERIC_PCI_IOMAP
 	select HAVE_BPF_JIT if NET
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_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
Index: tip/arch/arm/Makefile
===================================================================
--- tip.orig/arch/arm/Makefile
+++ tip/arch/arm/Makefile
@@ -119,7 +119,7 @@ KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_T
 CHECKFLAGS	+= -D__arm__
 
 #Default value
-head-y		:= arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o
+head-y		:= arch/arm/kernel/head$(MMUEXT).o
 textofs-y	:= 0x00008000
 textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
 # We don't want the htc bootloader to corrupt kernel during resume
Index: tip/arch/arm/kernel/Makefile
===================================================================
--- tip.orig/arch/arm/kernel/Makefile
+++ tip/arch/arm/kernel/Makefile
@@ -81,4 +81,4 @@ head-y			:= head$(MMUEXT).o
 obj-$(CONFIG_DEBUG_LL)	+= debug.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
-extra-y := $(head-y) init_task.o vmlinux.lds
+extra-y := $(head-y) vmlinux.lds
Index: tip/arch/arm/kernel/init_task.c
===================================================================
--- tip.orig/arch/arm/kernel/init_task.c
+++ /dev/null
@@ -1,37 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 05/31] alpha: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (3 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 04/31] init_task: Create generic init_task instance Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:50   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 06/31] arm: " Thomas Gleixner
                   ` (27 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Matt Turner

[-- Attachment #1: alpha-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2028 bytes --]

Identical code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Matt Turner <mattst88@gmail.com>
---
 arch/alpha/Kconfig            |    1 +
 arch/alpha/kernel/Makefile    |    2 +-
 arch/alpha/kernel/init_task.c |   17 -----------------
 3 files changed, 2 insertions(+), 18 deletions(-)

Index: tip/arch/alpha/Kconfig
===================================================================
--- tip.orig/arch/alpha/Kconfig
+++ tip/arch/alpha/Kconfig
@@ -16,6 +16,7 @@ config ALPHA
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
Index: tip/arch/alpha/kernel/Makefile
===================================================================
--- tip.orig/arch/alpha/kernel/Makefile
+++ tip/arch/alpha/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y		:= head.o vmlinux.lds
 asflags-y	:= $(KBUILD_CFLAGS)
 ccflags-y	:= -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
 
Index: tip/arch/alpha/kernel/init_task.c
===================================================================
--- tip.orig/arch/alpha/kernel/init_task.c
+++ /dev/null
@@ -1,17 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
-union thread_union init_thread_union __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };



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

* [patch V2 08/31] blackfin: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (6 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 07/31] avr32: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:52   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 10/31] cris: " Thomas Gleixner
                   ` (24 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Mike Frysinger

[-- Attachment #1: blackfin-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3001 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 arch/blackfin/Kconfig            |    1 +
 arch/blackfin/Makefile           |    2 --
 arch/blackfin/kernel/Makefile    |    2 +-
 arch/blackfin/kernel/init_task.c |   32 --------------------------------
 4 files changed, 2 insertions(+), 35 deletions(-)

Index: tip/arch/blackfin/Kconfig
===================================================================
--- tip.orig/arch/blackfin/Kconfig
+++ tip/arch/blackfin/Kconfig
@@ -38,6 +38,7 @@ config BLACKFIN
 	select IRQ_PER_CPU if SMP
 	select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config GENERIC_CSUM
 	def_bool y
Index: tip/arch/blackfin/Makefile
===================================================================
--- tip.orig/arch/blackfin/Makefile
+++ tip/arch/blackfin/Makefile
@@ -107,8 +107,6 @@ KBUILD_AFLAGS += -mcpu=$(CPU_REV)
 CHECKFLAGS_SILICON = $(shell echo "" | $(CPP) $(KBUILD_CFLAGS) -dD - 2>/dev/null | awk '$$2 == "__SILICON_REVISION__" { print $$3 }')
 CHECKFLAGS += -D__SILICON_REVISION__=$(CHECKFLAGS_SILICON) -D__bfin__
 
-head-y   := arch/$(ARCH)/kernel/init_task.o
-
 core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
 
 # If we have a machine-specific directory, then include it in the build.
Index: tip/arch/blackfin/kernel/Makefile
===================================================================
--- tip.orig/arch/blackfin/kernel/Makefile
+++ tip/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 \
Index: tip/arch/blackfin/kernel/init_task.c
===================================================================
--- tip.orig/arch/blackfin/kernel/init_task.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2004-2009 Analog Devices Inc.
- *
- * Licensed under the GPL-2 or later
- */
-
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/fs.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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
-    __init_task_data = {
-INIT_THREAD_INFO(init_task)};



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

* [patch V2 07/31] avr32: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (5 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 06/31] arm: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:51   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 08/31] blackfin: " Thomas Gleixner
                   ` (25 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Haavard Skinnemoen

[-- Attachment #1: avr32-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2488 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
---
 arch/avr32/Kconfig            |    1 +
 arch/avr32/kernel/Makefile    |    2 +-
 arch/avr32/kernel/init_task.c |   31 -------------------------------
 3 files changed, 2 insertions(+), 32 deletions(-)

Index: tip/arch/avr32/Kconfig
===================================================================
--- tip.orig/arch/avr32/Kconfig
+++ tip/arch/avr32/Kconfig
@@ -12,6 +12,7 @@ config AVR32
 	select HARDIRQS_SW_RESEND
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
+	select HAVE_GENERIC_INIT_TASK
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
Index: tip/arch/avr32/kernel/Makefile
===================================================================
--- tip.orig/arch/avr32/kernel/Makefile
+++ tip/arch/avr32/kernel/Makefile
@@ -8,7 +8,7 @@ obj-$(CONFIG_SUBARCH_AVR32B)	+= entry-av
 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
Index: tip/arch/avr32/kernel/init_task.c
===================================================================
--- tip.orig/arch/avr32/kernel/init_task.c
+++ /dev/null
@@ -1,31 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * Initial thread structure. Must be aligned on an 8192-byte boundary.
- */
-union thread_union init_thread_union __init_task_data =
-	{ 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);



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

* [patch V2 09/31] cx6: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (8 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 10/31] cris: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-03 13:45   ` Mark Salter
  2012-05-05 18:53   ` [tip:smp/hotplug] c6x: " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 11/31] frv: " Thomas Gleixner
                   ` (22 subsequent siblings)
  32 siblings, 2 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Mark Salter

[-- Attachment #1: cx6-use-generic-idle-task.patch --]
[-- Type: text/plain, Size: 1285 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Salter <msalter@redhat.com>
---
 arch/c6x/Kconfig          |    1 +
 arch/c6x/kernel/process.c |   16 ----------------
 2 files changed, 1 insertion(+), 16 deletions(-)

Index: tip/arch/c6x/Kconfig
===================================================================
--- tip.orig/arch/c6x/Kconfig
+++ tip/arch/c6x/Kconfig
@@ -15,6 +15,7 @@ config TMS320C6X
 	select IRQ_DOMAIN
 	select OF
 	select OF_EARLY_FLATTREE
+	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	def_bool n
Index: tip/arch/c6x/kernel/process.c
===================================================================
--- tip.orig/arch/c6x/kernel/process.c
+++ tip/arch/c6x/kernel/process.c
@@ -26,22 +26,6 @@ void	(*c6x_halt)(void);
 
 extern asmlinkage void ret_from_fork(void);
 
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * Initial thread structure.
- */
-union thread_union init_thread_union __init_task_data =	{
-	INIT_THREAD_INFO(init_task)
-};
-
-/*
- * Initial task structure.
- */
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
 /*
  * power off function, if any
  */



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

* [patch V2 10/31] cris: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (7 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 08/31] blackfin: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:54   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 09/31] cx6: " Thomas Gleixner
                   ` (23 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Jesper Nilsson

[-- Attachment #1: cris-use-generic-idle-task.patch --]
[-- Type: text/plain, Size: 1925 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
---
 arch/cris/Kconfig          |    1 +
 arch/cris/kernel/process.c |   28 ----------------------------
 2 files changed, 1 insertion(+), 28 deletions(-)

Index: tip/arch/cris/Kconfig
===================================================================
--- tip.orig/arch/cris/Kconfig
+++ tip/arch/cris/Kconfig
@@ -50,6 +50,7 @@ config CRIS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
+	select HAVE_GENERIC_INIT_TASK
 
 config HZ
 	int
Index: tip/arch/cris/kernel/process.c
===================================================================
--- tip.orig/arch/cris/kernel/process.c
+++ tip/arch/cris/kernel/process.c
@@ -29,34 +29,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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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] 69+ messages in thread

* [patch V2 11/31] frv: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (9 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 09/31] cx6: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:55   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 12/31] h8300: " Thomas Gleixner
                   ` (21 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: David Howells

[-- Attachment #1: frv-use-generic-idle-task.patch --]
[-- Type: text/plain, Size: 2862 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Howells <dhowells@redhat.com>
---
 arch/frv/Kconfig            |    1 +
 arch/frv/Makefile           |    2 +-
 arch/frv/kernel/Makefile    |    2 +-
 arch/frv/kernel/init_task.c |   32 --------------------------------
 4 files changed, 3 insertions(+), 34 deletions(-)

Index: tip/arch/frv/Kconfig
===================================================================
--- tip.orig/arch/frv/Kconfig
+++ tip/arch/frv/Kconfig
@@ -10,6 +10,7 @@ config FRV
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_CPU_DEVICES
 	select ARCH_THREAD_INFO_ALLOCATOR
+	select HAVE_GENERIC_INIT_TASK
 
 config ZONE_DMA
 	bool
Index: tip/arch/frv/Makefile
===================================================================
--- tip.orig/arch/frv/Makefile
+++ tip/arch/frv/Makefile
@@ -81,7 +81,7 @@ ifdef CONFIG_DEBUG_INFO
 KBUILD_AFLAGS	+= -Wa,--gdwarf2
 endif
 
-head-y		:= arch/frv/kernel/head.o arch/frv/kernel/init_task.o
+head-y		:= arch/frv/kernel/head.o
 
 core-y		+= arch/frv/kernel/ arch/frv/mm/
 libs-y		+= arch/frv/lib/
Index: tip/arch/frv/kernel/Makefile
===================================================================
--- tip.orig/arch/frv/kernel/Makefile
+++ tip/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 \
Index: tip/arch/frv/kernel/init_task.c
===================================================================
--- tip.orig/arch/frv/kernel/init_task.c
+++ /dev/null
@@ -1,32 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 12/31] h8300: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (10 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 11/31] frv: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:56   ` [tip:smp/hotplug] h8300-use-generic-init_task tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 14/31] m32r: Use generic init_task Thomas Gleixner
                   ` (20 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Yoshinori Sato

[-- Attachment #1: h8300-use-generic-idle-task.patch --]
[-- Type: text/plain, Size: 2281 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 arch/h8300/Kconfig            |    1 +
 arch/h8300/kernel/Makefile    |    2 +-
 arch/h8300/kernel/init_task.c |   36 ------------------------------------
 3 files changed, 2 insertions(+), 37 deletions(-)

Index: tip/arch/h8300/Kconfig
===================================================================
--- tip.orig/arch/h8300/Kconfig
+++ tip/arch/h8300/Kconfig
@@ -5,6 +5,7 @@ config H8300
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
+	select HAVE_GENERIC_INIT_TASK
 
 config SYMBOL_PREFIX
 	string
Index: tip/arch/h8300/kernel/Makefile
===================================================================
--- tip.orig/arch/h8300/kernel/Makefile
+++ tip/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 
Index: tip/arch/h8300/kernel/init_task.c
===================================================================
--- tip.orig/arch/h8300/kernel/init_task.c
+++ /dev/null
@@ -1,36 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };
-



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

* [patch V2 13/31] hexagon: Use generic idle_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (12 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 14/31] m32r: Use generic init_task Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:56   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 15/31] m68k: Use generic init_task Thomas Gleixner
                   ` (18 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML

[-- Attachment #1: hexagon-use-generic-idle-task.patch --]
[-- Type: text/plain, Size: 3834 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-and-tested-by: Richard Kuo <rkuo@codeaurora.org>
---
 arch/hexagon/Kconfig            |    1 
 arch/hexagon/Makefile           |    3 --
 arch/hexagon/kernel/Makefile    |    2 -
 arch/hexagon/kernel/init_task.c |   54 ----------------------------------------
 4 files changed, 3 insertions(+), 57 deletions(-)

Index: tip/arch/hexagon/Kconfig
===================================================================
--- tip.orig/arch/hexagon/Kconfig
+++ tip/arch/hexagon/Kconfig
@@ -28,6 +28,7 @@ config HEXAGON
 	select NO_IOPORT
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 	# mostly generic routines, with some accelerated ones
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
Index: tip/arch/hexagon/Makefile
===================================================================
--- tip.orig/arch/hexagon/Makefile
+++ tip/arch/hexagon/Makefile
@@ -45,8 +45,7 @@ KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_
 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 libs-y += $(LIBGCC)
 
-head-y := arch/hexagon/kernel/head.o \
-	arch/hexagon/kernel/init_task.o
+head-y := arch/hexagon/kernel/head.o
 
 core-y += arch/hexagon/kernel/ \
 	arch/hexagon/mm/ \
Index: tip/arch/hexagon/kernel/Makefile
===================================================================
--- tip.orig/arch/hexagon/kernel/Makefile
+++ tip/arch/hexagon/kernel/Makefile
@@ -1,4 +1,4 @@
-extra-y := head.o vmlinux.lds init_task.o
+extra-y := head.o vmlinux.lds
 
 obj-$(CONFIG_SMP) += smp.o topology.o
 
Index: tip/arch/hexagon/kernel/init_task.c
===================================================================
--- tip.orig/arch/hexagon/kernel/init_task.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Init task definition
- *
- * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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.
- */
-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);



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

* [patch V2 15/31] m68k: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (13 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 13/31] hexagon: Use generic idle_task Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:58   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 16/31] microblaze: " Thomas Gleixner
                   ` (17 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Geert Uytterhoeven

[-- Attachment #1: m68k-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2367 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/Kconfig            |    1 +
 arch/m68k/kernel/Makefile    |    2 +-
 arch/m68k/kernel/init_task.c |   35 -----------------------------------
 3 files changed, 2 insertions(+), 36 deletions(-)

Index: tip/arch/m68k/Kconfig
===================================================================
--- tip.orig/arch/m68k/Kconfig
+++ tip/arch/m68k/Kconfig
@@ -8,6 +8,7 @@ config M68K
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
 	select GENERIC_CPU_DEVICES
 	select FPU if MMU
+	select HAVE_GENERIC_INIT_TASK
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
Index: tip/arch/m68k/kernel/Makefile
===================================================================
--- tip.orig/arch/m68k/kernel/Makefile
+++ tip/arch/m68k/kernel/Makefile
@@ -13,7 +13,7 @@ extra-$(CONFIG_SUN3X)	:= head.o
 extra-$(CONFIG_SUN3)	:= sun3-head.o
 extra-y			+= vmlinux.lds
 
-obj-y	:= entry.o init_task.o irq.o m68k_ksyms.o module.o process.o ptrace.o
+obj-y	:= entry.o irq.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_MOTOROLA) += ints.o vectors.o
Index: tip/arch/m68k/kernel/init_task.c
===================================================================
--- tip.orig/arch/m68k/kernel/init_task.c
+++ /dev/null
@@ -1,35 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 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 __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };
-



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

* [patch V2 14/31] m32r: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (11 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 12/31] h8300: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:57   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 13/31] hexagon: Use generic idle_task Thomas Gleixner
                   ` (19 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Hirokazu Takata

[-- Attachment #1: m32r-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2810 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
---
 arch/m32r/Kconfig            |    1 +
 arch/m32r/Makefile           |    2 +-
 arch/m32r/kernel/Makefile    |    2 +-
 arch/m32r/kernel/init_task.c |   34 ----------------------------------
 4 files changed, 3 insertions(+), 36 deletions(-)

Index: tip/arch/m32r/Kconfig
===================================================================
--- tip.orig/arch/m32r/Kconfig
+++ tip/arch/m32r/Kconfig
@@ -11,6 +11,7 @@ config M32R
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
 	select GENERIC_ATOMIC64
+	select HAVE_GENERIC_INIT_TASK
 
 config SBUS
 	bool
Index: tip/arch/m32r/Makefile
===================================================================
--- tip.orig/arch/m32r/Makefile
+++ tip/arch/m32r/Makefile
@@ -31,7 +31,7 @@ KBUILD_AFLAGS += $(aflags-y)
 
 CHECKFLAGS	+= -D__m32r__ -D__BIG_ENDIAN__=1
 
-head-y	:= arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
+head-y	:= arch/m32r/kernel/head.o
 
 LIBGCC	:= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
Index: tip/arch/m32r/kernel/Makefile
===================================================================
--- tip.orig/arch/m32r/kernel/Makefile
+++ tip/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
Index: tip/arch/m32r/kernel/init_task.c
===================================================================
--- tip.orig/arch/m32r/kernel/init_task.c
+++ /dev/null
@@ -1,34 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);
-



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

* [patch V2 16/31] microblaze: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (14 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 15/31] m68k: Use generic init_task Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 18:59   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 17/31] mips: " Thomas Gleixner
                   ` (16 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Michal Simek

[-- Attachment #1: microblaze-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2183 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/Kconfig            |    1 +
 arch/microblaze/kernel/Makefile    |    2 +-
 arch/microblaze/kernel/init_task.c |   26 --------------------------
 3 files changed, 2 insertions(+), 27 deletions(-)

Index: tip/arch/microblaze/Kconfig
===================================================================
--- tip.orig/arch/microblaze/Kconfig
+++ tip/arch/microblaze/Kconfig
@@ -22,6 +22,7 @@ config MICROBLAZE
 	select GENERIC_PCI_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
+	select HAVE_GENERIC_INIT_TASK
 
 config SWAP
 	def_bool n
Index: tip/arch/microblaze/kernel/Makefile
===================================================================
--- tip.orig/arch/microblaze/kernel/Makefile
+++ tip/arch/microblaze/kernel/Makefile
@@ -16,7 +16,7 @@ endif
 extra-y := head.o vmlinux.lds
 
 obj-y += dma.o exceptions.o \
-	hw_exception_handler.o init_task.o intc.o irq.o \
+	hw_exception_handler.o intc.o irq.o \
 	process.o prom.o prom_parse.o ptrace.o \
 	reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
 
Index: tip/arch/microblaze/kernel/init_task.c
===================================================================
--- tip.orig/arch/microblaze/kernel/init_task.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
- * Copyright (C) 2009 PetaLogix
- * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * 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.
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/pgtable.h>
-
-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 =
-	{ INIT_THREAD_INFO(init_task) };
-
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);



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

* [patch V2 17/31] mips: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (15 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 16/31] microblaze: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:00   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 19/31] openrisc: " Thomas Gleixner
                   ` (15 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Ralf Baechle

[-- Attachment #1: mips-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3575 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Make the linker script align the task on THREAD_SIZE and not on
PAGE_SIZE, as PAGE_SIZE might be smaller than THREAD_SIZE.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
 arch/mips/Kconfig              |    1 +
 arch/mips/Makefile             |    2 +-
 arch/mips/kernel/Makefile      |    2 +-
 arch/mips/kernel/init_task.c   |   35 -----------------------------------
 arch/mips/kernel/vmlinux.lds.S |    2 +-
 5 files changed, 4 insertions(+), 38 deletions(-)

Index: tip/arch/mips/Kconfig
===================================================================
--- tip.orig/arch/mips/Kconfig
+++ tip/arch/mips/Kconfig
@@ -30,6 +30,7 @@ config MIPS
 	select HAVE_MEMBLOCK_NODE_MAP
 	select ARCH_DISCARD_MEMBLOCK
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 menu "Machine selection"
 
Index: tip/arch/mips/Makefile
===================================================================
--- tip.orig/arch/mips/Makefile
+++ tip/arch/mips/Makefile
@@ -235,7 +235,7 @@ endif
 
 OBJCOPYFLAGS		+= --remove-section=.reginfo
 
-head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
+head-y := arch/mips/kernel/head.o
 
 libs-y			+= arch/mips/lib/
 
Index: tip/arch/mips/kernel/Makefile
===================================================================
--- tip.orig/arch/mips/kernel/Makefile
+++ tip/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 \
Index: tip/arch/mips/kernel/init_task.c
===================================================================
--- tip.orig/arch/mips/kernel/init_task.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <linux/mm.h>
-#include <linux/export.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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data
-	__attribute__((__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);
Index: tip/arch/mips/kernel/vmlinux.lds.S
===================================================================
--- tip.orig/arch/mips/kernel/vmlinux.lds.S
+++ tip/arch/mips/kernel/vmlinux.lds.S
@@ -72,7 +72,7 @@ SECTIONS
 	.data : {	/* Data */
 		. = . + DATAOFFSET;		/* for CONFIG_MAPPED_KERNEL */
 
-		INIT_TASK_DATA(PAGE_SIZE)
+		INIT_TASK_DATA(THREAD_SIZE)
 		NOSAVE_DATA
 		CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
 		READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)



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

* [patch V2 18/31] mn10300: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (17 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 19/31] openrisc: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:01   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 21/31] powerpc: " Thomas Gleixner
                   ` (13 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: David Howells

[-- Attachment #1: mn10300-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3210 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Howells <dhowells@redhat.com>
---
 arch/mn10300/Kconfig            |    1 +
 arch/mn10300/Makefile           |    2 +-
 arch/mn10300/kernel/Makefile    |    2 +-
 arch/mn10300/kernel/init_task.c |   39 ---------------------------------------
 4 files changed, 3 insertions(+), 41 deletions(-)

Index: tip/arch/mn10300/Kconfig
===================================================================
--- tip.orig/arch/mn10300/Kconfig
+++ tip/arch/mn10300/Kconfig
@@ -6,6 +6,7 @@ config MN10300
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_KGDB
 	select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
+	select HAVE_GENERIC_INIT_TASK
 
 config AM33_2
 	def_bool n
Index: tip/arch/mn10300/Makefile
===================================================================
--- tip.orig/arch/mn10300/Makefile
+++ tip/arch/mn10300/Makefile
@@ -51,7 +51,7 @@ UNIT		:= asb2364
 endif
 
 
-head-y		:= arch/mn10300/kernel/head.o arch/mn10300/kernel/init_task.o
+head-y		:= arch/mn10300/kernel/head.o
 
 core-y		+= arch/mn10300/kernel/ arch/mn10300/mm/
 
Index: tip/arch/mn10300/kernel/Makefile
===================================================================
--- tip.orig/arch/mn10300/kernel/Makefile
+++ tip/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
 
 fpu-obj-y := fpu-nofpu.o fpu-nofpu-low.o
 fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o
Index: tip/arch/mn10300/kernel/init_task.c
===================================================================
--- tip.orig/arch/mn10300/kernel/init_task.c
+++ /dev/null
@@ -1,39 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 19/31] openrisc: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (16 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 17/31] mips: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:01   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-08  9:37   ` [patch V2 19/31] " Jonas Bonn
  2012-05-03  9:02 ` [patch V2 18/31] mn10300: " Thomas Gleixner
                   ` (14 subsequent siblings)
  32 siblings, 2 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Jonas Bonn

[-- Attachment #1: openrisc-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3338 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jonas Bonn <jonas@southpole.se>
---
 arch/openrisc/Kconfig            |    1 
 arch/openrisc/Makefile           |    2 -
 arch/openrisc/kernel/Makefile    |    2 -
 arch/openrisc/kernel/init_task.c |   42 ---------------------------------------
 4 files changed, 3 insertions(+), 44 deletions(-)

Index: tip/arch/openrisc/Kconfig
===================================================================
--- tip.orig/arch/openrisc/Kconfig
+++ tip/arch/openrisc/Kconfig
@@ -17,6 +17,7 @@ config OPENRISC
 	select GENERIC_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
+	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	def_bool y
Index: tip/arch/openrisc/Makefile
===================================================================
--- tip.orig/arch/openrisc/Makefile
+++ tip/arch/openrisc/Makefile
@@ -38,7 +38,7 @@ else
 	KBUILD_CFLAGS += $(call cc-option,-msoft-div)
 endif
 
-head-y 		:= arch/openrisc/kernel/head.o arch/openrisc/kernel/init_task.o
+head-y 		:= arch/openrisc/kernel/head.o
 
 core-y		+= arch/openrisc/lib/ \
 		   arch/openrisc/kernel/ \
Index: tip/arch/openrisc/kernel/Makefile
===================================================================
--- tip.orig/arch/openrisc/kernel/Makefile
+++ tip/arch/openrisc/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y	:= head.o vmlinux.lds init_task.o
+extra-y	:= head.o vmlinux.lds
 
 obj-y	:= setup.o idle.o or32_ksyms.o process.o dma.o \
 	   traps.o time.o irq.o entry.o ptrace.o signal.o sys_or32.o \
Index: tip/arch/openrisc/kernel/init_task.c
===================================================================
--- tip.orig/arch/openrisc/kernel/init_task.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * OpenRISC init_task.c
- *
- * Linux architectural port borrowing liberally from similar works of
- * others.  All original copyrights apply as per the original source
- * declaration.
- *
- * Modifications for the OpenRISC architecture:
- * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
- * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
- *
- *      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.
- */
-
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/export.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data = {
-	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);



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

* [patch V2 21/31] powerpc: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (18 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 18/31] mn10300: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:03   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 20/31] parisc: " Thomas Gleixner
                   ` (12 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Benjamin Herrenschmidt

[-- Attachment #1: powerpc-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2268 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/Kconfig            |    1 +
 arch/powerpc/kernel/Makefile    |    2 +-
 arch/powerpc/kernel/init_task.c |   29 -----------------------------
 3 files changed, 2 insertions(+), 30 deletions(-)

Index: tip/arch/powerpc/Kconfig
===================================================================
--- tip.orig/arch/powerpc/Kconfig
+++ tip/arch/powerpc/Kconfig
@@ -145,6 +145,7 @@ config PPC
 	select HAVE_ARCH_JUMP_LABEL
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config EARLY_PRINTK
 	bool
Index: tip/arch/powerpc/kernel/Makefile
===================================================================
--- tip.orig/arch/powerpc/kernel/Makefile
+++ tip/arch/powerpc/kernel/Makefile
@@ -28,7 +28,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 cacheinfo.o time.o \
 				   prom.o traps.o setup-common.o \
 				   udbg.o misc.o io.o dma.o \
Index: tip/arch/powerpc/kernel/init_task.c
===================================================================
--- tip.orig/arch/powerpc/kernel/init_task.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <linux/mm.h>
-#include <linux/export.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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 20/31] parisc: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (19 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 21/31] powerpc: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:02   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 22/31] s390: " Thomas Gleixner
                   ` (11 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: James E.J. Bottomley

[-- Attachment #1: parisc-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 5058 bytes --]

Same code, except: The alignment of init_thread_union is handled via
the linker script, so no point to have it with the data structure. The
extra asm(".data") looks like a leftover from an asm to C conversion
and is pointless.

Use the generic version.

Move the page table data to parisc/mm/init.c and get rid of
parisc/../init_task.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
---
 arch/parisc/Kconfig            |    1 
 arch/parisc/kernel/init_task.c |   70 -----------------------------------------
 arch/parisc/mm/init.c          |   12 +++++++
 3 files changed, 13 insertions(+), 70 deletions(-)

Index: tip/arch/parisc/Kconfig
===================================================================
--- tip.orig/arch/parisc/Kconfig
+++ tip/arch/parisc/Kconfig
@@ -18,6 +18,7 @@ config PARISC
 	select IRQ_PER_CPU
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
Index: tip/arch/parisc/kernel/init_task.c
===================================================================
--- tip.orig/arch/parisc/kernel/init_task.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* 
- *    Static declaration of "init" task data structure.
- *
- *    Copyright (C) 2000 Paul Bame <bame at parisc-linux.org>
- *    Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
- *    Copyright (C) 2001 Helge Deller <deller @ parisc-linux.org>
- *    Copyright (C) 2002 Matthew Wilcox <willy with parisc-linux.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, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-#include <asm/pgalloc.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data
-	__attribute__((aligned(128))) =
-		{ 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
- * guarantee that global objects will be laid out in memory in the same order 
- * as the order of declaration, so put these in different sections and use
- * the linker script to order them. */
-pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE)));
-#endif
-
-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);
Index: tip/arch/parisc/mm/init.c
===================================================================
--- tip.orig/arch/parisc/mm/init.c
+++ tip/arch/parisc/mm/init.c
@@ -33,6 +33,18 @@
 
 extern int  data_start;
 
+#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
+ * guarantee that global objects will be laid out in memory in the same order
+ * as the order of declaration, so put these in different sections and use
+ * the linker script to order them. */
+pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE)));
+#endif
+
+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)));
+
 #ifdef CONFIG_DISCONTIGMEM
 struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
 unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;



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

* [patch V2 23/31] score: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (21 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 22/31] s390: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:05   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 26/31] tile: " Thomas Gleixner
                   ` (9 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Chen Liqin

[-- Attachment #1: score-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2903 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
---
 arch/score/Kconfig            |    1 
 arch/score/kernel/Makefile    |    2 -
 arch/score/kernel/init_task.c |   46 ------------------------------------------
 3 files changed, 2 insertions(+), 47 deletions(-)

Index: tip/arch/score/Kconfig
===================================================================
--- tip.orig/arch/score/Kconfig
+++ tip/arch/score/Kconfig
@@ -9,6 +9,7 @@ config SCORE
        select HAVE_MEMBLOCK_NODE_MAP
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_CPU_DEVICES
+       select HAVE_GENERIC_INIT_TASK
 
 choice
 	prompt "System type"
Index: tip/arch/score/kernel/Makefile
===================================================================
--- tip.orig/arch/score/kernel/Makefile
+++ tip/arch/score/kernel/Makefile
@@ -4,7 +4,7 @@
 
 extra-y	:= head.o vmlinux.lds
 
-obj-y += entry.o init_task.o irq.o process.o ptrace.o \
+obj-y += entry.o irq.o process.o ptrace.o \
 	setup.o signal.o sys_score.o time.o traps.o \
 	sys_call_table.o
 
Index: tip/arch/score/kernel/init_task.c
===================================================================
--- tip.orig/arch/score/kernel/init_task.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * arch/score/kernel/init_task.c
- *
- * Score Processor version.
- *
- * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
- *
- * 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/init_task.h>
-#include <linux/mqueue.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 22/31] s390: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (20 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 20/31] parisc: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-03 10:00   ` Heiko Carstens
  2012-05-05 19:04   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 23/31] score: " Thomas Gleixner
                   ` (10 subsequent siblings)
  32 siblings, 2 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Martin Schwidefsky, Heiko Carstens

[-- Attachment #1: s390-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3105 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/Kconfig            |    1 +
 arch/s390/Makefile           |    1 -
 arch/s390/kernel/Makefile    |    2 +-
 arch/s390/kernel/init_task.c |   38 --------------------------------------
 4 files changed, 2 insertions(+), 40 deletions(-)

Index: tip/arch/s390/Kconfig
===================================================================
--- tip.orig/arch/s390/Kconfig
+++ tip/arch/s390/Kconfig
@@ -123,6 +123,7 @@ config S390
 	select ARCH_INLINE_WRITE_UNLOCK_IRQ
 	select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
Index: tip/arch/s390/Makefile
===================================================================
--- tip.orig/arch/s390/Makefile
+++ tip/arch/s390/Makefile
@@ -91,7 +91,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head.o
 head-y		+= arch/s390/kernel/$(if $(CONFIG_64BIT),head64.o,head31.o)
-head-y		+= arch/s390/kernel/init_task.o
 
 # See arch/s390/Kbuild for content of core part of the kernel
 core-y		+= arch/s390/
Index: tip/arch/s390/kernel/Makefile
===================================================================
--- tip.orig/arch/s390/kernel/Makefile
+++ tip/arch/s390/kernel/Makefile
@@ -28,7 +28,7 @@ obj-y	:=  bitmap.o traps.o time.o proces
 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
 extra-y				+= $(if $(CONFIG_64BIT),head64.o,head31.o)
 
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
Index: tip/arch/s390/kernel/init_task.c
===================================================================
--- tip.orig/arch/s390/kernel/init_task.c
+++ /dev/null
@@ -1,38 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 26/31] tile: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (22 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 23/31] score: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:07   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 24/31] sh: " Thomas Gleixner
                   ` (8 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Chris Metcalf

[-- Attachment #1: tile-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 4420 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Metcalf <cmetcalf@tilera.com>
---
 arch/tile/Kconfig            |    1 
 arch/tile/kernel/Makefile    |    2 -
 arch/tile/kernel/init_task.c |   59 -------------------------------------------
 arch/tile/kernel/setup.c     |   16 +++++++++++
 4 files changed, 18 insertions(+), 60 deletions(-)

Index: tip/arch/tile/Kconfig
===================================================================
--- tip.orig/arch/tile/Kconfig
+++ tip/arch/tile/Kconfig
@@ -13,6 +13,7 @@ config TILE
 	select GENERIC_IRQ_SHOW
 	select SYS_HYPERVISOR
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
+	select HAVE_GENERIC_INIT_TASK
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
Index: tip/arch/tile/kernel/Makefile
===================================================================
--- tip.orig/arch/tile/kernel/Makefile
+++ tip/arch/tile/kernel/Makefile
@@ -3,7 +3,7 @@
 #
 
 extra-y := vmlinux.lds head_$(BITS).o
-obj-y := backtrace.o entry.o init_task.o irq.o messaging.o \
+obj-y := backtrace.o entry.o irq.o messaging.o \
 	pci-dma.o proc.o process.o ptrace.o reboot.o \
 	setup.o signal.o single_step.o stack.o sys.o sysfs.o time.o traps.o \
 	intvec_$(BITS).o regs_$(BITS).o tile-desc_$(BITS).o
Index: tip/arch/tile/kernel/init_task.c
===================================================================
--- tip.orig/arch/tile/kernel/init_task.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010 Tilera Corporation. All Rights Reserved.
- *
- *   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, version 2.
- *
- *   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, GOOD TITLE or
- *   NON INFRINGEMENT.  See the GNU General Public License for
- *   more details.
- */
-
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/module.h>
-#include <linux/start_kernel.h>
-#include <linux/uaccess.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data = {
-	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 stack and boot info.
- */
-DEFINE_PER_CPU(unsigned long, boot_sp) =
-	(unsigned long)init_stack + THREAD_SIZE;
-
-#ifdef CONFIG_SMP
-DEFINE_PER_CPU(unsigned long, boot_pc) = (unsigned long)start_kernel;
-#else
-/*
- * The variable must be __initdata since it references __init code.
- * With CONFIG_SMP it is per-cpu data, which is exempt from validation.
- */
-unsigned long __initdata boot_pc = (unsigned long)start_kernel;
-#endif
Index: tip/arch/tile/kernel/setup.c
===================================================================
--- tip.orig/arch/tile/kernel/setup.c
+++ tip/arch/tile/kernel/setup.c
@@ -61,6 +61,22 @@ unsigned long __initdata node_free_pfn[M
 
 static unsigned long __initdata node_percpu[MAX_NUMNODES];
 
+/*
+ * per-CPU stack and boot info.
+ */
+DEFINE_PER_CPU(unsigned long, boot_sp) =
+	(unsigned long)init_stack + THREAD_SIZE;
+
+#ifdef CONFIG_SMP
+DEFINE_PER_CPU(unsigned long, boot_pc) = (unsigned long)start_kernel;
+#else
+/*
+ * The variable must be __initdata since it references __init code.
+ * With CONFIG_SMP it is per-cpu data, which is exempt from validation.
+ */
+unsigned long __initdata boot_pc = (unsigned long)start_kernel;
+#endif
+
 #ifdef CONFIG_HIGHMEM
 /* Page frame index of end of lowmem on each controller. */
 unsigned long __cpuinitdata node_lowmem_end_pfn[MAX_NUMNODES];



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

* [patch V2 24/31] sh: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (23 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 26/31] tile: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:06   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:02 ` [patch V2 25/31] sparc: " Thomas Gleixner
                   ` (7 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: Paul Mundt

[-- Attachment #1: sh-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2867 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
---
 arch/sh/Kconfig            |    1 +
 arch/sh/Makefile           |    2 +-
 arch/sh/kernel/Makefile    |    2 +-
 arch/sh/kernel/init_task.c |   30 ------------------------------
 4 files changed, 3 insertions(+), 32 deletions(-)

Index: tip/arch/sh/Kconfig
===================================================================
--- tip.orig/arch/sh/Kconfig
+++ tip/arch/sh/Kconfig
@@ -29,6 +29,7 @@ config SUPERH
 	select GENERIC_ATOMIC64
 	select GENERIC_IRQ_SHOW
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_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
Index: tip/arch/sh/Makefile
===================================================================
--- tip.orig/arch/sh/Makefile
+++ tip/arch/sh/Makefile
@@ -124,7 +124,7 @@ endif
 
 export ld-bfd BITS
 
-head-y	:= arch/sh/kernel/init_task.o arch/sh/kernel/head_$(BITS).o
+head-y	:= arch/sh/kernel/head_$(BITS).o
 
 core-y				+= arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/
 core-$(CONFIG_SH_FPU_EMU)	+= arch/sh/math-emu/
Index: tip/arch/sh/kernel/Makefile
===================================================================
--- tip.orig/arch/sh/kernel/Makefile
+++ tip/arch/sh/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the Linux/SuperH kernel.
 #
 
-extra-y	:= head_$(BITS).o init_task.o vmlinux.lds
+extra-y	:= head_$(BITS).o vmlinux.lds
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
Index: tip/arch/sh/kernel/init_task.c
===================================================================
--- tip.orig/arch/sh/kernel/init_task.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/fs.h>
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-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;
-/*
- * 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 __init_task_data =
-	{ 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);



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

* [patch V2 25/31] sparc: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (24 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 24/31] sh: " Thomas Gleixner
@ 2012-05-03  9:02 ` Thomas Gleixner
  2012-05-05 19:06   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:03 ` [patch V2 27/31] um: " Thomas Gleixner
                   ` (6 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:02 UTC (permalink / raw)
  To: LKML; +Cc: David S. Miller, Sam Ravnborg

[-- Attachment #1: sparc-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2596 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/sparc/Kconfig            |    1 +
 arch/sparc/Makefile           |    1 -
 arch/sparc/kernel/Makefile    |    1 -
 arch/sparc/kernel/init_task.c |   22 ----------------------
 4 files changed, 1 insertion(+), 24 deletions(-)

Index: tip/arch/sparc/Kconfig
===================================================================
--- tip.orig/arch/sparc/Kconfig
+++ tip/arch/sparc/Kconfig
@@ -31,6 +31,7 @@ config SPARC
 	select GENERIC_PCI_IOMAP
 	select HAVE_NMI_WATCHDOG if SPARC64
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config SPARC32
 	def_bool !64BIT
Index: tip/arch/sparc/Makefile
===================================================================
--- tip.orig/arch/sparc/Makefile
+++ tip/arch/sparc/Makefile
@@ -62,7 +62,6 @@ endif
 endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
-head-y                 += arch/sparc/kernel/init_task.o
 
 core-y                 += arch/sparc/kernel/
 core-y                 += arch/sparc/mm/ arch/sparc/math-emu/
Index: tip/arch/sparc/kernel/Makefile
===================================================================
--- tip.orig/arch/sparc/kernel/Makefile
+++ tip/arch/sparc/kernel/Makefile
@@ -6,7 +6,6 @@ asflags-y := -ansi
 ccflags-y := -Werror
 
 extra-y     := head_$(BITS).o
-extra-y     += init_task.o
 
 # Undefine sparc when processing vmlinux.lds - it is used
 # And teach CPP we are doing $(BITS) builds (for this case)
Index: tip/arch/sparc/kernel/init_task.c
===================================================================
--- tip.orig/arch/sparc/kernel/init_task.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#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/pgtable.h>
-#include <asm/uaccess.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
-/* .text section in head.S is aligned at 8k boundary and this gets linked
- * right after that so that the init_thread_union is aligned properly as well.
- * If this is not aligned on a 8k boundary, then you should change code
- * in etrap.S which assumes it.
- */
-union thread_union init_thread_union __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };



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

* [patch V2 28/31] unicore32: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (26 preceding siblings ...)
  2012-05-03  9:03 ` [patch V2 27/31] um: " Thomas Gleixner
@ 2012-05-03  9:03 ` Thomas Gleixner
  2012-05-05 19:08   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:03 ` [patch V2 29/31] x86: " Thomas Gleixner
                   ` (4 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:03 UTC (permalink / raw)
  To: LKML; +Cc: Guan Xuetao

[-- Attachment #1: unicore-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3324 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
---
 arch/unicore32/Kconfig            |    1 
 arch/unicore32/Makefile           |    1 
 arch/unicore32/kernel/Makefile    |    2 -
 arch/unicore32/kernel/init_task.c |   44 --------------------------------------
 4 files changed, 2 insertions(+), 46 deletions(-)

Index: tip/arch/unicore32/Kconfig
===================================================================
--- tip.orig/arch/unicore32/Kconfig
+++ tip/arch/unicore32/Kconfig
@@ -13,6 +13,7 @@ config UNICORE32
 	select GENERIC_IRQ_SHOW
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
+	select HAVE_GENERIC_INIT_TASK
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
Index: tip/arch/unicore32/Makefile
===================================================================
--- tip.orig/arch/unicore32/Makefile
+++ tip/arch/unicore32/Makefile
@@ -33,7 +33,6 @@ endif
 CHECKFLAGS		+= -D__unicore32__
 
 head-y			:= arch/unicore32/kernel/head.o
-head-y			+= arch/unicore32/kernel/init_task.o
 
 core-y			+= arch/unicore32/kernel/
 core-y			+= arch/unicore32/mm/
Index: tip/arch/unicore32/kernel/Makefile
===================================================================
--- tip.orig/arch/unicore32/kernel/Makefile
+++ tip/arch/unicore32/kernel/Makefile
@@ -29,4 +29,4 @@ obj-$(CONFIG_PUV3_NB0916)	+= puv3-nb0916
 head-y				:= head.o
 obj-$(CONFIG_DEBUG_LL)		+= debug.o
 
-extra-y				:= $(head-y) init_task.o vmlinux.lds
+extra-y				:= $(head-y) vmlinux.lds
Index: tip/arch/unicore32/kernel/init_task.c
===================================================================
--- tip.orig/arch/unicore32/kernel/init_task.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * linux/arch/unicore32/kernel/init_task.c
- *
- * Code specific to PKUnity SoC and UniCore ISA
- *
- * Copyright (C) 2001-2010 GUAN Xue-tao
- *
- * 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/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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data = {
-	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);



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

* [patch V2 27/31] um: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (25 preceding siblings ...)
  2012-05-03  9:02 ` [patch V2 25/31] sparc: " Thomas Gleixner
@ 2012-05-03  9:03 ` Thomas Gleixner
  2012-05-05 19:09   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:03 ` [patch V2 28/31] unicore32: " Thomas Gleixner
                   ` (5 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:03 UTC (permalink / raw)
  To: LKML; +Cc: Richard Weinberger

[-- Attachment #1: um-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 3165 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Richard Weinberger <richard@nod.at>
---
 arch/um/Kconfig.common     |    1 +
 arch/um/kernel/Makefile    |    2 +-
 arch/um/kernel/init_task.c |   38 --------------------------------------
 arch/um/kernel/um_arch.c   |    5 +++++
 4 files changed, 7 insertions(+), 39 deletions(-)

Index: tip/arch/um/Kconfig.common
===================================================================
--- tip.orig/arch/um/Kconfig.common
+++ tip/arch/um/Kconfig.common
@@ -10,6 +10,7 @@ config UML
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IO
+	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	bool
Index: tip/arch/um/kernel/Makefile
===================================================================
--- tip.orig/arch/um/kernel/Makefile
+++ tip/arch/um/kernel/Makefile
@@ -10,7 +10,7 @@ CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_ST
 extra-y := vmlinux.lds
 clean-files :=
 
-obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
+obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
 	physmem.o process.o ptrace.o reboot.o sigio.o \
 	signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o \
 	um_arch.o umid.o skas/
Index: tip/arch/um/kernel/init_task.c
===================================================================
--- tip.orig/arch/um/kernel/init_task.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,intel.linux}.com)
- * Licensed under the GPL
- */
-
-#include "linux/sched.h"
-#include "linux/init_task.h"
-#include "linux/fs.h"
-#include "linux/module.h"
-#include "linux/mqueue.h"
-#include "asm/uaccess.h"
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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..
- */
-
-union thread_union init_thread_union __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };
-
-union thread_union cpu0_irqstack
-	__attribute__((__section__(".data..init_irqstack"))) =
-		{ INIT_THREAD_INFO(init_task) };
Index: tip/arch/um/kernel/um_arch.c
===================================================================
--- tip.orig/arch/um/kernel/um_arch.c
+++ tip/arch/um/kernel/um_arch.c
@@ -10,6 +10,7 @@
 #include <linux/seq_file.h>
 #include <linux/string.h>
 #include <linux/utsname.h>
+#include <linux/sched.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/setup.h>
@@ -47,6 +48,10 @@ struct cpuinfo_um boot_cpu_data = {
 	.ipi_pipe		= { -1, -1 }
 };
 
+union thread_union cpu0_irqstack
+	__attribute__((__section__(".data..init_irqstack"))) =
+		{ INIT_THREAD_INFO(init_task) };
+
 unsigned long thread_saved_pc(struct task_struct *task)
 {
 	/* FIXME: Need to look up userspace_pid by cpu */



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

* [patch V2 29/31] x86: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (27 preceding siblings ...)
  2012-05-03  9:03 ` [patch V2 28/31] unicore32: " Thomas Gleixner
@ 2012-05-03  9:03 ` Thomas Gleixner
  2012-05-05 19:10   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:03 ` [patch V2 30/31] xtensa: " Thomas Gleixner
                   ` (3 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:03 UTC (permalink / raw)
  To: LKML; +Cc: x86

[-- Attachment #1: x86-use-common-init-task.patch --]
[-- Type: text/plain, Size: 4046 bytes --]

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
---
 arch/x86/Kconfig            |    1 +
 arch/x86/Makefile           |    1 -
 arch/x86/kernel/Makefile    |    2 +-
 arch/x86/kernel/init_task.c |   42 ------------------------------------------
 arch/x86/kernel/process.c   |    9 +++++++++
 5 files changed, 11 insertions(+), 44 deletions(-)

Index: tip/arch/x86/Kconfig
===================================================================
--- tip.orig/arch/x86/Kconfig
+++ tip/arch/x86/Kconfig
@@ -83,6 +83,7 @@ config X86
 	select GENERIC_IOMAP
 	select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config INSTRUCTION_DECODER
 	def_bool (KPROBES || PERF_EVENTS)
Index: tip/arch/x86/Makefile
===================================================================
--- tip.orig/arch/x86/Makefile
+++ tip/arch/x86/Makefile
@@ -146,7 +146,6 @@ archheaders:
 head-y := arch/x86/kernel/head_$(BITS).o
 head-y += arch/x86/kernel/head$(BITS).o
 head-y += arch/x86/kernel/head.o
-head-y += arch/x86/kernel/init_task.o
 
 libs-y  += arch/x86/lib/
 
Index: tip/arch/x86/kernel/Makefile
===================================================================
--- tip.orig/arch/x86/kernel/Makefile
+++ tip/arch/x86/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y                := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
+extra-y                := head_$(BITS).o head$(BITS).o head.o vmlinux.lds
 
 CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 
Index: tip/arch/x86/kernel/init_task.c
===================================================================
--- tip.orig/arch/x86/kernel/init_task.c
+++ /dev/null
@@ -1,42 +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>
-#include <asm/desc.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data =
-	{ 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
- * so they are allowed to end up in the .data..cacheline_aligned
- * section. Since TSS's are completely CPU-local, we want them
- * on exact cacheline boundaries, to eliminate cacheline ping-pong.
- */
-DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
-
Index: tip/arch/x86/kernel/process.c
===================================================================
--- tip.orig/arch/x86/kernel/process.c
+++ tip/arch/x86/kernel/process.c
@@ -27,6 +27,15 @@
 #include <asm/debugreg.h>
 #include <asm/nmi.h>
 
+/*
+ * per-CPU TSS segments. Threads are completely 'soft' on Linux,
+ * no more per-task TSS's. The TSS size is kept cacheline-aligned
+ * so they are allowed to end up in the .data..cacheline_aligned
+ * section. Since TSS's are completely CPU-local, we want them
+ * on exact cacheline boundaries, to eliminate cacheline ping-pong.
+ */
+DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
+
 #ifdef CONFIG_X86_64
 static DEFINE_PER_CPU(unsigned char, is_idle);
 static ATOMIC_NOTIFIER_HEAD(idle_notifier);



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

* [patch V2 30/31] xtensa: Use generic init_task
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (28 preceding siblings ...)
  2012-05-03  9:03 ` [patch V2 29/31] x86: " Thomas Gleixner
@ 2012-05-03  9:03 ` Thomas Gleixner
  2012-05-05 19:11   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-03  9:03 ` [patch V2 31/31] init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK Thomas Gleixner
                   ` (2 subsequent siblings)
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:03 UTC (permalink / raw)
  To: LKML; +Cc: Chris Zankel

[-- Attachment #1: xtensa-use-generic-init-task.patch --]
[-- Type: text/plain, Size: 2303 bytes --]

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
---
 arch/xtensa/Kconfig            |    1 +
 arch/xtensa/kernel/Makefile    |    2 +-
 arch/xtensa/kernel/init_task.c |   31 -------------------------------
 3 files changed, 2 insertions(+), 32 deletions(-)

Index: tip/arch/xtensa/Kconfig
===================================================================
--- tip.orig/arch/xtensa/Kconfig
+++ tip/arch/xtensa/Kconfig
@@ -10,6 +10,7 @@ config XTENSA
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
+	select HAVE_GENERIC_INIT_TASK
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
Index: tip/arch/xtensa/kernel/Makefile
===================================================================
--- tip.orig/arch/xtensa/kernel/Makefile
+++ tip/arch/xtensa/kernel/Makefile
@@ -6,7 +6,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
 
 obj-$(CONFIG_KGDB) += xtensa-stub.o
 obj-$(CONFIG_PCI) += pci.o
Index: tip/arch/xtensa/kernel/init_task.c
===================================================================
--- tip.orig/arch/xtensa/kernel/init_task.c
+++ /dev/null
@@ -1,31 +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 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 =
-	{ INIT_THREAD_INFO(init_task) };
-
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);



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

* [patch V2 31/31] init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (29 preceding siblings ...)
  2012-05-03  9:03 ` [patch V2 30/31] xtensa: " Thomas Gleixner
@ 2012-05-03  9:03 ` Thomas Gleixner
  2012-05-05 19:11   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  2012-05-04 17:28 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines David Howells
  2012-05-04 17:30 ` [patch V2 02/31] frv: Use core allocator for task_struct David Howells
  32 siblings, 1 reply; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03  9:03 UTC (permalink / raw)
  To: LKML

[-- Attachment #1: init-task-remove-config.patch --]
[-- Type: text/plain, Size: 12277 bytes --]

Now that all archs except ia64 are converted, replace the config and
let the ia64 select CONFIG_ARCH_INIT_TASK

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/Kconfig            |    2 +-
 arch/alpha/Kconfig      |    1 -
 arch/arm/Kconfig        |    1 -
 arch/avr32/Kconfig      |    1 -
 arch/blackfin/Kconfig   |    1 -
 arch/c6x/Kconfig        |    1 -
 arch/cris/Kconfig       |    1 -
 arch/frv/Kconfig        |    1 -
 arch/h8300/Kconfig      |    1 -
 arch/hexagon/Kconfig    |    1 -
 arch/ia64/Kconfig       |    1 +
 arch/m32r/Kconfig       |    1 -
 arch/m68k/Kconfig       |    1 -
 arch/microblaze/Kconfig |    1 -
 arch/mips/Kconfig       |    1 -
 arch/mn10300/Kconfig    |    1 -
 arch/openrisc/Kconfig   |    1 -
 arch/parisc/Kconfig     |    1 -
 arch/powerpc/Kconfig    |    1 -
 arch/s390/Kconfig       |    1 -
 arch/score/Kconfig      |    1 -
 arch/sh/Kconfig         |    1 -
 arch/sparc/Kconfig      |    1 -
 arch/tile/Kconfig       |    1 -
 arch/um/Kconfig.common  |    1 -
 arch/unicore32/Kconfig  |    1 -
 arch/x86/Kconfig        |    1 -
 arch/xtensa/Kconfig     |    1 -
 init/Makefile           |    5 ++++-
 29 files changed, 6 insertions(+), 28 deletions(-)

Index: tip/arch/Kconfig
===================================================================
--- tip.orig/arch/Kconfig
+++ tip/arch/Kconfig
@@ -148,7 +148,7 @@ config USE_GENERIC_SMP_HELPERS
 config GENERIC_SMP_IDLE_THREAD
        bool
 
-config HAVE_GENERIC_INIT_TASK
+config ARCH_INIT_TASK
        bool
 
 config HAVE_REGS_AND_STACK_ACCESS_API
Index: tip/arch/alpha/Kconfig
===================================================================
--- tip.orig/arch/alpha/Kconfig
+++ tip/arch/alpha/Kconfig
@@ -16,7 +16,6 @@ config ALPHA
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
Index: tip/arch/arm/Kconfig
===================================================================
--- tip.orig/arch/arm/Kconfig
+++ tip/arch/arm/Kconfig
@@ -35,7 +35,6 @@ config ARM
 	select GENERIC_PCI_IOMAP
 	select HAVE_BPF_JIT if NET
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_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
Index: tip/arch/avr32/Kconfig
===================================================================
--- tip.orig/arch/avr32/Kconfig
+++ tip/arch/avr32/Kconfig
@@ -12,7 +12,6 @@ config AVR32
 	select HARDIRQS_SW_RESEND
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
-	select HAVE_GENERIC_INIT_TASK
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
Index: tip/arch/blackfin/Kconfig
===================================================================
--- tip.orig/arch/blackfin/Kconfig
+++ tip/arch/blackfin/Kconfig
@@ -38,7 +38,6 @@ config BLACKFIN
 	select IRQ_PER_CPU if SMP
 	select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config GENERIC_CSUM
 	def_bool y
Index: tip/arch/c6x/Kconfig
===================================================================
--- tip.orig/arch/c6x/Kconfig
+++ tip/arch/c6x/Kconfig
@@ -15,7 +15,6 @@ config TMS320C6X
 	select IRQ_DOMAIN
 	select OF
 	select OF_EARLY_FLATTREE
-	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	def_bool n
Index: tip/arch/cris/Kconfig
===================================================================
--- tip.orig/arch/cris/Kconfig
+++ tip/arch/cris/Kconfig
@@ -50,7 +50,6 @@ config CRIS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
-	select HAVE_GENERIC_INIT_TASK
 
 config HZ
 	int
Index: tip/arch/frv/Kconfig
===================================================================
--- tip.orig/arch/frv/Kconfig
+++ tip/arch/frv/Kconfig
@@ -10,7 +10,6 @@ config FRV
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_CPU_DEVICES
 	select ARCH_THREAD_INFO_ALLOCATOR
-	select HAVE_GENERIC_INIT_TASK
 
 config ZONE_DMA
 	bool
Index: tip/arch/h8300/Kconfig
===================================================================
--- tip.orig/arch/h8300/Kconfig
+++ tip/arch/h8300/Kconfig
@@ -5,7 +5,6 @@ config H8300
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
-	select HAVE_GENERIC_INIT_TASK
 
 config SYMBOL_PREFIX
 	string
Index: tip/arch/hexagon/Kconfig
===================================================================
--- tip.orig/arch/hexagon/Kconfig
+++ tip/arch/hexagon/Kconfig
@@ -28,7 +28,6 @@ config HEXAGON
 	select NO_IOPORT
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 	# mostly generic routines, with some accelerated ones
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
Index: tip/arch/ia64/Kconfig
===================================================================
--- tip.orig/arch/ia64/Kconfig
+++ tip/arch/ia64/Kconfig
@@ -36,6 +36,7 @@ config IA64
 	select GENERIC_SMP_IDLE_THREAD
 	select ARCH_TASK_STRUCT_ALLOCATOR
 	select ARCH_THREAD_INFO_ALLOCATOR
+	select ARCH_INIT_TASK
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
Index: tip/arch/m32r/Kconfig
===================================================================
--- tip.orig/arch/m32r/Kconfig
+++ tip/arch/m32r/Kconfig
@@ -11,7 +11,6 @@ config M32R
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
 	select GENERIC_ATOMIC64
-	select HAVE_GENERIC_INIT_TASK
 
 config SBUS
 	bool
Index: tip/arch/m68k/Kconfig
===================================================================
--- tip.orig/arch/m68k/Kconfig
+++ tip/arch/m68k/Kconfig
@@ -8,7 +8,6 @@ config M68K
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
 	select GENERIC_CPU_DEVICES
 	select FPU if MMU
-	select HAVE_GENERIC_INIT_TASK
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
Index: tip/arch/microblaze/Kconfig
===================================================================
--- tip.orig/arch/microblaze/Kconfig
+++ tip/arch/microblaze/Kconfig
@@ -22,7 +22,6 @@ config MICROBLAZE
 	select GENERIC_PCI_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
-	select HAVE_GENERIC_INIT_TASK
 
 config SWAP
 	def_bool n
Index: tip/arch/mips/Kconfig
===================================================================
--- tip.orig/arch/mips/Kconfig
+++ tip/arch/mips/Kconfig
@@ -30,7 +30,6 @@ config MIPS
 	select HAVE_MEMBLOCK_NODE_MAP
 	select ARCH_DISCARD_MEMBLOCK
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 menu "Machine selection"
 
Index: tip/arch/mn10300/Kconfig
===================================================================
--- tip.orig/arch/mn10300/Kconfig
+++ tip/arch/mn10300/Kconfig
@@ -6,7 +6,6 @@ config MN10300
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_KGDB
 	select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
-	select HAVE_GENERIC_INIT_TASK
 
 config AM33_2
 	def_bool n
Index: tip/arch/openrisc/Kconfig
===================================================================
--- tip.orig/arch/openrisc/Kconfig
+++ tip/arch/openrisc/Kconfig
@@ -17,7 +17,6 @@ config OPENRISC
 	select GENERIC_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
-	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	def_bool y
Index: tip/arch/parisc/Kconfig
===================================================================
--- tip.orig/arch/parisc/Kconfig
+++ tip/arch/parisc/Kconfig
@@ -18,7 +18,6 @@ config PARISC
 	select IRQ_PER_CPU
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
Index: tip/arch/powerpc/Kconfig
===================================================================
--- tip.orig/arch/powerpc/Kconfig
+++ tip/arch/powerpc/Kconfig
@@ -145,7 +145,6 @@ config PPC
 	select HAVE_ARCH_JUMP_LABEL
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config EARLY_PRINTK
 	bool
Index: tip/arch/s390/Kconfig
===================================================================
--- tip.orig/arch/s390/Kconfig
+++ tip/arch/s390/Kconfig
@@ -123,7 +123,6 @@ config S390
 	select ARCH_INLINE_WRITE_UNLOCK_IRQ
 	select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
Index: tip/arch/score/Kconfig
===================================================================
--- tip.orig/arch/score/Kconfig
+++ tip/arch/score/Kconfig
@@ -9,7 +9,6 @@ config SCORE
        select HAVE_MEMBLOCK_NODE_MAP
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_CPU_DEVICES
-       select HAVE_GENERIC_INIT_TASK
 
 choice
 	prompt "System type"
Index: tip/arch/sh/Kconfig
===================================================================
--- tip.orig/arch/sh/Kconfig
+++ tip/arch/sh/Kconfig
@@ -29,7 +29,6 @@ config SUPERH
 	select GENERIC_ATOMIC64
 	select GENERIC_IRQ_SHOW
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_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
Index: tip/arch/sparc/Kconfig
===================================================================
--- tip.orig/arch/sparc/Kconfig
+++ tip/arch/sparc/Kconfig
@@ -31,7 +31,6 @@ config SPARC
 	select GENERIC_PCI_IOMAP
 	select HAVE_NMI_WATCHDOG if SPARC64
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config SPARC32
 	def_bool !64BIT
Index: tip/arch/tile/Kconfig
===================================================================
--- tip.orig/arch/tile/Kconfig
+++ tip/arch/tile/Kconfig
@@ -13,7 +13,6 @@ config TILE
 	select GENERIC_IRQ_SHOW
 	select SYS_HYPERVISOR
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
-	select HAVE_GENERIC_INIT_TASK
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
Index: tip/arch/um/Kconfig.common
===================================================================
--- tip.orig/arch/um/Kconfig.common
+++ tip/arch/um/Kconfig.common
@@ -10,7 +10,6 @@ config UML
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IO
-	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	bool
Index: tip/arch/unicore32/Kconfig
===================================================================
--- tip.orig/arch/unicore32/Kconfig
+++ tip/arch/unicore32/Kconfig
@@ -13,7 +13,6 @@ config UNICORE32
 	select GENERIC_IRQ_SHOW
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
-	select HAVE_GENERIC_INIT_TASK
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
Index: tip/arch/x86/Kconfig
===================================================================
--- tip.orig/arch/x86/Kconfig
+++ tip/arch/x86/Kconfig
@@ -83,7 +83,6 @@ config X86
 	select GENERIC_IOMAP
 	select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config INSTRUCTION_DECODER
 	def_bool (KPROBES || PERF_EVENTS)
Index: tip/arch/xtensa/Kconfig
===================================================================
--- tip.orig/arch/xtensa/Kconfig
+++ tip/arch/xtensa/Kconfig
@@ -10,7 +10,6 @@ config XTENSA
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
-	select HAVE_GENERIC_INIT_TASK
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
Index: tip/init/Makefile
===================================================================
--- tip.orig/init/Makefile
+++ tip/init/Makefile
@@ -9,7 +9,10 @@ else
 obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
 endif
 obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
-obj-$(CONFIG_HAVE_GENERIC_INIT_TASK) += init_task.o
+
+ifneq ($(CONFIG_ARCH_INIT_TASK),y)
+obj-y                          += init_task.o
+endif
 
 mounts-y			:= do_mounts.o
 mounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o



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

* Re: [patch V2 22/31] s390: Use generic init_task
  2012-05-03  9:02 ` [patch V2 22/31] s390: " Thomas Gleixner
@ 2012-05-03 10:00   ` Heiko Carstens
  2012-05-05 19:04   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 69+ messages in thread
From: Heiko Carstens @ 2012-05-03 10:00 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Martin Schwidefsky

On Thu, May 03, 2012 at 09:02:58AM -0000, Thomas Gleixner wrote:
> Same code. Use the generic version. The special Makefile treatment is
> pointless anyway as init_task.o contains only data which is handled by
> the linker script. So no point on being treated like head text.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>

Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>


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

* Re: [patch V2 09/31] cx6: Use generic init_task
  2012-05-03  9:02 ` [patch V2 09/31] cx6: " Thomas Gleixner
@ 2012-05-03 13:45   ` Mark Salter
  2012-05-03 15:25     ` Thomas Gleixner
  2012-05-05 18:53   ` [tip:smp/hotplug] c6x: " tip-bot for Thomas Gleixner
  1 sibling, 1 reply; 69+ messages in thread
From: Mark Salter @ 2012-05-03 13:45 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML

On Thu, 2012-05-03 at 09:02 +0000, Thomas Gleixner wrote:
> Same code. Use the generic version.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mark Salter <msalter@redhat.com>
> ---
>  arch/c6x/Kconfig          |    1 +
>  arch/c6x/kernel/process.c |   16 ----------------
>  2 files changed, 1 insertion(+), 16 deletions(-)
> 
> Index: tip/arch/c6x/Kconfig
> ===================================================================
> --- tip.orig/arch/c6x/Kconfig
> +++ tip/arch/c6x/Kconfig
> @@ -15,6 +15,7 @@ config TMS320C6X
>         select IRQ_DOMAIN
>         select OF
>         select OF_EARLY_FLATTREE
> +       select HAVE_GENERIC_INIT_TASK

I'd like to keep this list in alphabetical order.

Change cx6 to c6x in subject.

It does test okay with no problems on c6x.






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

* Re: [patch V2 09/31] cx6: Use generic init_task
  2012-05-03 13:45   ` Mark Salter
@ 2012-05-03 15:25     ` Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-03 15:25 UTC (permalink / raw)
  To: Mark Salter; +Cc: LKML

On Thu, 3 May 2012, Mark Salter wrote:

> On Thu, 2012-05-03 at 09:02 +0000, Thomas Gleixner wrote:
> > Same code. Use the generic version.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Mark Salter <msalter@redhat.com>
> > ---
> >  arch/c6x/Kconfig          |    1 +
> >  arch/c6x/kernel/process.c |   16 ----------------
> >  2 files changed, 1 insertion(+), 16 deletions(-)
> > 
> > Index: tip/arch/c6x/Kconfig
> > ===================================================================
> > --- tip.orig/arch/c6x/Kconfig
> > +++ tip/arch/c6x/Kconfig
> > @@ -15,6 +15,7 @@ config TMS320C6X
> >         select IRQ_DOMAIN
> >         select OF
> >         select OF_EARLY_FLATTREE
> > +       select HAVE_GENERIC_INIT_TASK
> 
> I'd like to keep this list in alphabetical order.

ok,
 
> Change cx6 to c6x in subject.

Oops
 
> It does test okay with no problems on c6x.

Thanks,

	tglx

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

* Re: [patch V2 03/31] task_allocator: Use config switches instead of magic defines
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (30 preceding siblings ...)
  2012-05-03  9:03 ` [patch V2 31/31] init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK Thomas Gleixner
@ 2012-05-04 17:28 ` David Howells
  2012-05-05 10:54   ` Thomas Gleixner
  2012-05-04 17:30 ` [patch V2 02/31] frv: Use core allocator for task_struct David Howells
  32 siblings, 1 reply; 69+ messages in thread
From: David Howells @ 2012-05-04 17:28 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: dhowells, LKML, Tony Luck

Thomas Gleixner <tglx@linutronix.de> wrote:

> +config ARCH_TASK_STRUCT_ALLOCATOR
> +	bool
> +
> +config ARCH_THREAD_INFO_ALLOCATOR
> +	bool

With comments saying what they mean...

David

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

* Re: [patch V2 02/31] frv: Use core allocator for task_struct
  2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
                   ` (31 preceding siblings ...)
  2012-05-04 17:28 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines David Howells
@ 2012-05-04 17:30 ` David Howells
  32 siblings, 0 replies; 69+ messages in thread
From: David Howells @ 2012-05-04 17:30 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: dhowells, LKML


On the patches you directed my way:

Acked-by: David Howells <dhowells@redhat.com>

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

* Re: [patch V2 03/31] task_allocator: Use config switches instead of magic defines
  2012-05-04 17:28 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines David Howells
@ 2012-05-05 10:54   ` Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: Thomas Gleixner @ 2012-05-05 10:54 UTC (permalink / raw)
  To: David Howells; +Cc: LKML, Tony Luck

On Fri, 4 May 2012, David Howells wrote:

> Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> > +config ARCH_TASK_STRUCT_ALLOCATOR
> > +	bool
> > +
> > +config ARCH_THREAD_INFO_ALLOCATOR
> > +	bool
> 
> With comments saying what they mean...

Right. I dropped that patch anyway as it's incomplete. Next series
will have it proper.

Thanks,

	tglx

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

* [tip:smp/hotplug] frv: Use correct size for task_struct allocation
  2012-05-03  9:02 ` [patch V2 01/31] frv: Use correct size for task_struct allocation Thomas Gleixner
@ 2012-05-05 18:46   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:46 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, dhowells, tglx

Commit-ID:  cce4517f33384c3794c759e206cc8e1bb6df146b
Gitweb:     http://git.kernel.org/tip/cce4517f33384c3794c759e206cc8e1bb6df146b
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:47 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:21 +0200

frv: Use correct size for task_struct allocation

alloc_task_struct_node() allocates THREAD_SIZE and maintains some
weird refcount in the allocated memory. This never blew up as
task_struct size on 32bit machines was always less than THREAD_SIZE

Allocate just sizeof(struct task_struct) and get rid of the magic
refcounting.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120503085033.898475542@linutronix.de

---
 arch/frv/kernel/process.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index d4de48b..1ac84b2 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -45,17 +45,12 @@ EXPORT_SYMBOL(pm_power_off);
 
 struct task_struct *alloc_task_struct_node(int node)
 {
-	struct task_struct *p = kmalloc_node(THREAD_SIZE, GFP_KERNEL, node);
-
-	if (p)
-		atomic_set((atomic_t *)(p+1), 1);
-	return p;
+	return kmalloc_node(sizeof(task_struct), GFP_KERNEL, node);
 }
 
 void free_task_struct(struct task_struct *p)
 {
-	if (atomic_dec_and_test((atomic_t *)(p+1)))
-		kfree(p);
+	kfree(p);
 }
 
 static void core_sleep_idle(void)

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

* [tip:smp/hotplug] frv: Use core allocator for task_struct
  2012-05-03  9:02 ` [patch V2 02/31] frv: Use core allocator for task_struct Thomas Gleixner
@ 2012-05-05 18:47   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, dhowells, tglx

Commit-ID:  c6ae063aaf3786b9db7f19a90bf4ed8aaebb7f90
Gitweb:     http://git.kernel.org/tip/c6ae063aaf3786b9db7f19a90bf4ed8aaebb7f90
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:47 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:21 +0200

frv: Use core allocator for task_struct

There is no point having a copy of the core allocator.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120503085033.967140188@linutronix.de

---
 arch/frv/include/asm/thread_info.h |    2 --
 arch/frv/kernel/process.c          |   10 ----------
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h
index 92d83ea..aaea388 100644
--- a/arch/frv/include/asm/thread_info.h
+++ b/arch/frv/include/asm/thread_info.h
@@ -21,8 +21,6 @@
 
 #define THREAD_SIZE		8192
 
-#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
-
 /*
  * low level task data that entry.S needs immediate access to
  * - this struct should fit entirely inside of one cache line
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 1ac84b2..ed09e9e 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -43,16 +43,6 @@ asmlinkage void ret_from_fork(void);
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
 
-struct task_struct *alloc_task_struct_node(int node)
-{
-	return kmalloc_node(sizeof(task_struct), GFP_KERNEL, node);
-}
-
-void free_task_struct(struct task_struct *p)
-{
-	kfree(p);
-}
-
 static void core_sleep_idle(void)
 {
 #ifdef LED_DEBUG_SLEEP

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

* [tip:smp/hotplug] init_task: Create generic init_task instance
  2012-05-03  9:02 ` [patch V2 04/31] init_task: Create generic init_task instance Thomas Gleixner
@ 2012-05-05 18:49   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:49 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, jesper.nilsson, schwidefsky, cmetcalf, chris, hskinnemoen,
	linux, ralf, monstr, vapier, heiko.carstens, gxt, tglx,
	linux-kernel, hpa, richard, lethal, msalter, davem, liqin.chen,
	dhowells, benh, geert, mattst88, jejb, takata, jonas, ysato,
	rkuo

Commit-ID:  a4a2eb490e38aaff61eafcb8cde6725ad1be22ab
Gitweb:     http://git.kernel.org/tip/a4a2eb490e38aaff61eafcb8cde6725ad1be22ab
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:48 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:21 +0200

init_task: Create generic init_task instance

All archs define init_task in the same way (except ia64, but there is
no particular reason why ia64 cannot use the common version). Create a
generic instance so all archs can be converted over.

The config switch is temporary and will be removed when all archs are
converted over.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/20120503085034.092585287@linutronix.de
---
 arch/Kconfig                            |    3 +++
 init/Makefile                           |    1 +
 {arch/alpha/kernel => init}/init_task.c |   17 ++++++++++++-----
 kernel/sched/Makefile                   |    2 --
 4 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 4f0d0f7..2dd8fdd 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -148,6 +148,9 @@ config USE_GENERIC_SMP_HELPERS
 config GENERIC_SMP_IDLE_THREAD
        bool
 
+config HAVE_GENERIC_INIT_TASK
+       bool
+
 config HAVE_REGS_AND_STACK_ACCESS_API
 	bool
 	help
diff --git a/init/Makefile b/init/Makefile
index 0bf677a..c55eac9 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -9,6 +9,7 @@ else
 obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
 endif
 obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
+obj-$(CONFIG_HAVE_GENERIC_INIT_TASK) += init_task.o
 
 mounts-y			:= do_mounts.o
 mounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o
diff --git a/arch/alpha/kernel/init_task.c b/init/init_task.c
similarity index 73%
copy from arch/alpha/kernel/init_task.c
copy to init/init_task.c
index 6f80ca4..8b2f399 100644
--- a/arch/alpha/kernel/init_task.c
+++ b/init/init_task.c
@@ -1,17 +1,24 @@
-#include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/init_task.h>
+#include <linux/export.h>
+#include <linux/mqueue.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 <linux/mm.h>
 
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+
+/* Initial task structure */
 struct task_struct init_task = INIT_TASK(init_task);
 EXPORT_SYMBOL(init_task);
 
+/*
+ * Initial thread structure. Alignment of this is handled by a special
+ * linker map entry.
+ */
 union thread_union init_thread_union __init_task_data =
 	{ INIT_THREAD_INFO(init_task) };
diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
index 9a7dd35..173ea52 100644
--- a/kernel/sched/Makefile
+++ b/kernel/sched/Makefile
@@ -16,5 +16,3 @@ obj-$(CONFIG_SMP) += cpupri.o
 obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
 obj-$(CONFIG_SCHEDSTATS) += stats.o
 obj-$(CONFIG_SCHED_DEBUG) += debug.o
-
-

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

* [tip:smp/hotplug] alpha: Use generic init_task
  2012-05-03  9:02 ` [patch V2 05/31] alpha: Use generic init_task Thomas Gleixner
@ 2012-05-05 18:50   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:50 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, mattst88, tglx

Commit-ID:  5dced29d71c2ad9b6e69a4af360bd2fd1b3c4950
Gitweb:     http://git.kernel.org/tip/5dced29d71c2ad9b6e69a4af360bd2fd1b3c4950
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:50 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:21 +0200

alpha: Use generic init_task

Identical code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Matt Turner <mattst88@gmail.com>
Link: http://lkml.kernel.org/r/20120503085034.162634519@linutronix.de

---
 arch/alpha/Kconfig            |    1 +
 arch/alpha/kernel/Makefile    |    2 +-
 arch/alpha/kernel/init_task.c |   17 -----------------
 3 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 991b8bb..74d0004 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -16,6 +16,7 @@ config ALPHA
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_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 7a6d908..84ec46b 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y		:= head.o vmlinux.lds
 asflags-y	:= $(KBUILD_CFLAGS)
 ccflags-y	:= -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 6f80ca4..0000000
--- a/arch/alpha/kernel/init_task.c
+++ /dev/null
@@ -1,17 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
-union thread_union init_thread_union __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };

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

* [tip:smp/hotplug] arm: Use generic init_task
  2012-05-03  9:02 ` [patch V2 06/31] arm: " Thomas Gleixner
@ 2012-05-05 18:51   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:51 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, linux, tglx

Commit-ID:  5290dc292915aaed6ae71ec3db5d4aa3285e7d51
Gitweb:     http://git.kernel.org/tip/5290dc292915aaed6ae71ec3db5d4aa3285e7d51
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:50 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:22 +0200

arm: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Russell King <linux@arm.linux.org.uk>
Link: http://lkml.kernel.org/r/20120503085034.221811388@linutronix.de
---
 arch/arm/Kconfig            |    1 +
 arch/arm/Makefile           |    2 +-
 arch/arm/kernel/Makefile    |    2 +-
 arch/arm/kernel/init_task.c |   37 -------------------------------------
 4 files changed, 3 insertions(+), 39 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cb253ce..8b36535 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -35,6 +35,7 @@ config ARM
 	select GENERIC_PCI_IOMAP
 	select HAVE_BPF_JIT if NET
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_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/Makefile b/arch/arm/Makefile
index 047a207..cf94509 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -119,7 +119,7 @@ KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/
 CHECKFLAGS	+= -D__arm__
 
 #Default value
-head-y		:= arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o
+head-y		:= arch/arm/kernel/head$(MMUEXT).o
 textofs-y	:= 0x00008000
 textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
 # We don't want the htc bootloader to corrupt kernel during resume
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 7b787d6..369985e 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -81,4 +81,4 @@ head-y			:= head$(MMUEXT).o
 obj-$(CONFIG_DEBUG_LL)	+= debug.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.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 e7cbb50..0000000
--- a/arch/arm/kernel/init_task.c
+++ /dev/null
@@ -1,37 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] avr32: Use generic init_task
  2012-05-03  9:02 ` [patch V2 07/31] avr32: " Thomas Gleixner
@ 2012-05-05 18:51   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:51 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, hskinnemoen, tglx

Commit-ID:  29b2501bd8bb55822dcdd0b1ad82fe44d44eaa73
Gitweb:     http://git.kernel.org/tip/29b2501bd8bb55822dcdd0b1ad82fe44d44eaa73
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:51 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:22 +0200

avr32: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Link: http://lkml.kernel.org/r/20120503085034.281527118@linutronix.de
---
 arch/avr32/Kconfig            |    1 +
 arch/avr32/kernel/Makefile    |    2 +-
 arch/avr32/kernel/init_task.c |   31 -------------------------------
 3 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 3dea7231..f4289ca 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -12,6 +12,7 @@ config AVR32
 	select HARDIRQS_SW_RESEND
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
+	select HAVE_GENERIC_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 6b2343e..0000000
--- a/arch/avr32/kernel/init_task.c
+++ /dev/null
@@ -1,31 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * Initial thread structure. Must be aligned on an 8192-byte boundary.
- */
-union thread_union init_thread_union __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] blackfin: Use generic init_task
  2012-05-03  9:02 ` [patch V2 08/31] blackfin: " Thomas Gleixner
@ 2012-05-05 18:52   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:52 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, vapier, tglx

Commit-ID:  6e3e84499a84cd37fd72f1d920aa8ac7f3502cd4
Gitweb:     http://git.kernel.org/tip/6e3e84499a84cd37fd72f1d920aa8ac7f3502cd4
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:51 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:22 +0200

blackfin: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Link: http://lkml.kernel.org/r/20120503085034.350246420@linutronix.de
---
 arch/blackfin/Kconfig            |    1 +
 arch/blackfin/Makefile           |    2 --
 arch/blackfin/kernel/Makefile    |    2 +-
 arch/blackfin/kernel/init_task.c |   32 --------------------------------
 4 files changed, 2 insertions(+), 35 deletions(-)

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 779b9c8..8570d6e 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -38,6 +38,7 @@ config BLACKFIN
 	select IRQ_PER_CPU if SMP
 	select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 46f42b2..2909496 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -107,8 +107,6 @@ KBUILD_AFLAGS += -mcpu=$(CPU_REV)
 CHECKFLAGS_SILICON = $(shell echo "" | $(CPP) $(KBUILD_CFLAGS) -dD - 2>/dev/null | awk '$$2 == "__SILICON_REVISION__" { print $$3 }')
 CHECKFLAGS += -D__SILICON_REVISION__=$(CHECKFLAGS_SILICON) -D__bfin__
 
-head-y   := arch/$(ARCH)/kernel/init_task.o
-
 core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
 
 # If we have a machine-specific directory, then include it in the build.
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile
index 9a0d6d7..08e6625 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 d3970e8..0000000
--- a/arch/blackfin/kernel/init_task.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2004-2009 Analog Devices Inc.
- *
- * Licensed under the GPL-2 or later
- */
-
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/fs.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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
-    __init_task_data = {
-INIT_THREAD_INFO(init_task)};

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

* [tip:smp/hotplug] c6x: Use generic init_task
  2012-05-03  9:02 ` [patch V2 09/31] cx6: " Thomas Gleixner
  2012-05-03 13:45   ` Mark Salter
@ 2012-05-05 18:53   ` tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:53 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, msalter

Commit-ID:  0c4f6d6bd17bbcf165a2439b59b9e8212c19f645
Gitweb:     http://git.kernel.org/tip/0c4f6d6bd17bbcf165a2439b59b9e8212c19f645
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:52 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:22 +0200

c6x: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-and-tested-by: Mark Salter <msalter@redhat.com>
Link: http://lkml.kernel.org/r/20120503085034.412398724@linutronix.de
---
 arch/c6x/Kconfig          |    1 +
 arch/c6x/kernel/process.c |   16 ----------------
 2 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 1c3ccd4..4189fb5 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -10,6 +10,7 @@ config TMS320C6X
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_DMA_API_DEBUG
 	select HAVE_GENERIC_HARDIRQS
+	select HAVE_GENERIC_INIT_TASK
 	select HAVE_MEMBLOCK
 	select SPARSE_IRQ
 	select IRQ_DOMAIN
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c
index 7ca8c41..45e924a 100644
--- a/arch/c6x/kernel/process.c
+++ b/arch/c6x/kernel/process.c
@@ -26,22 +26,6 @@ void	(*c6x_halt)(void);
 
 extern asmlinkage void ret_from_fork(void);
 
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * Initial thread structure.
- */
-union thread_union init_thread_union __init_task_data =	{
-	INIT_THREAD_INFO(init_task)
-};
-
-/*
- * Initial task structure.
- */
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
 /*
  * power off function, if any
  */

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

* [tip:smp/hotplug] cris: Use generic init_task
  2012-05-03  9:02 ` [patch V2 10/31] cris: " Thomas Gleixner
@ 2012-05-05 18:54   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:54 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, jesper.nilsson, tglx

Commit-ID:  c172ede404d4eda55ed2c0df1c4c11df9311b299
Gitweb:     http://git.kernel.org/tip/c172ede404d4eda55ed2c0df1c4c11df9311b299
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:52 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:22 +0200

cris: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Link: http://lkml.kernel.org/r/20120503085034.475552133@linutronix.de

---
 arch/cris/Kconfig          |    1 +
 arch/cris/kernel/process.c |   28 ----------------------------
 2 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 2995035..15e30a7 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -50,6 +50,7 @@ config CRIS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
+	select HAVE_GENERIC_INIT_TASK
 
 config HZ
 	int
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 891dad8..66fd017 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -29,34 +29,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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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 related	[flat|nested] 69+ messages in thread

* [tip:smp/hotplug] frv: Use generic init_task
  2012-05-03  9:02 ` [patch V2 11/31] frv: " Thomas Gleixner
@ 2012-05-05 18:55   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:55 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, dhowells, tglx

Commit-ID:  cb0fcba283a98f8438ca69b76b0dcb92cce5a951
Gitweb:     http://git.kernel.org/tip/cb0fcba283a98f8438ca69b76b0dcb92cce5a951
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:53 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:23 +0200

frv: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120503085034.546687215@linutronix.de
---
 arch/frv/Kconfig            |    1 +
 arch/frv/Makefile           |    2 +-
 arch/frv/kernel/Makefile    |    2 +-
 arch/frv/kernel/init_task.c |   32 --------------------------------
 4 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index a685910..ed6dbd2 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -9,6 +9,7 @@ config FRV
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_CPU_DEVICES
+	select HAVE_GENERIC_INIT_TASK
 
 config ZONE_DMA
 	bool
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 7ff8457..4d1b1e9 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -81,7 +81,7 @@ ifdef CONFIG_DEBUG_INFO
 KBUILD_AFLAGS	+= -Wa,--gdwarf2
 endif
 
-head-y		:= arch/frv/kernel/head.o arch/frv/kernel/init_task.o
+head-y		:= arch/frv/kernel/head.o
 
 core-y		+= arch/frv/kernel/ arch/frv/mm/
 libs-y		+= arch/frv/lib/
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 3c3e0b3..0000000
--- a/arch/frv/kernel/init_task.c
+++ /dev/null
@@ -1,32 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] h8300-use-generic-init_task
  2012-05-03  9:02 ` [patch V2 12/31] h8300: " Thomas Gleixner
@ 2012-05-05 18:56   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:56 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, ysato

Commit-ID:  a3b3aa3d9d5d482ac68477c69fc08cadbc43e074
Gitweb:     http://git.kernel.org/tip/a3b3aa3d9d5d482ac68477c69fc08cadbc43e074
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:53 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:23 +0200

h8300-use-generic-init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/20120503085034.623666760@linutronix.de
---
 arch/h8300/Kconfig            |    1 +
 arch/h8300/kernel/Makefile    |    2 +-
 arch/h8300/kernel/init_task.c |   36 ------------------------------------
 3 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 56e890d..5fac425 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -5,6 +5,7 @@ config H8300
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
+	select HAVE_GENERIC_INIT_TASK
 
 config SYMBOL_PREFIX
 	string
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 54c1062..0000000
--- a/arch/h8300/kernel/init_task.c
+++ /dev/null
@@ -1,36 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };
-

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

* [tip:smp/hotplug] hexagon: Use generic idle_task
  2012-05-03  9:02 ` [patch V2 13/31] hexagon: Use generic idle_task Thomas Gleixner
@ 2012-05-05 18:56   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:56 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, rkuo

Commit-ID:  e336e05bca1909faf6d7c033702a71bdb5c79d18
Gitweb:     http://git.kernel.org/tip/e336e05bca1909faf6d7c033702a71bdb5c79d18
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:54 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:23 +0200

hexagon: Use generic idle_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120503085034.692078846@linutronix.de
Acked-and-tested-by: Richard Kuo <rkuo@codeaurora.org>
---
 arch/hexagon/Kconfig            |    1 +
 arch/hexagon/Makefile           |    3 +-
 arch/hexagon/kernel/Makefile    |    2 +-
 arch/hexagon/kernel/init_task.c |   54 ---------------------------------------
 4 files changed, 3 insertions(+), 57 deletions(-)

diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index d2e4a33..6ee5488 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -28,6 +28,7 @@ config HEXAGON
 	select NO_IOPORT
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 	# mostly generic routines, with some accelerated ones
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile
index 0c4de87..e27d030 100644
--- a/arch/hexagon/Makefile
+++ b/arch/hexagon/Makefile
@@ -45,8 +45,7 @@ KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 libs-y += $(LIBGCC)
 
-head-y := arch/hexagon/kernel/head.o \
-	arch/hexagon/kernel/init_task.o
+head-y := arch/hexagon/kernel/head.o
 
 core-y += arch/hexagon/kernel/ \
 	arch/hexagon/mm/ \
diff --git a/arch/hexagon/kernel/Makefile b/arch/hexagon/kernel/Makefile
index 3689f37..536aec0 100644
--- a/arch/hexagon/kernel/Makefile
+++ b/arch/hexagon/kernel/Makefile
@@ -1,4 +1,4 @@
-extra-y := head.o vmlinux.lds init_task.o
+extra-y := head.o vmlinux.lds
 
 obj-$(CONFIG_SMP) += smp.o topology.o
 
diff --git a/arch/hexagon/kernel/init_task.c b/arch/hexagon/kernel/init_task.c
deleted file mode 100644
index 73283d3..0000000
--- a/arch/hexagon/kernel/init_task.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Init task definition
- *
- * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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.
- */
-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);

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

* [tip:smp/hotplug] m32r: Use generic init_task
  2012-05-03  9:02 ` [patch V2 14/31] m32r: Use generic init_task Thomas Gleixner
@ 2012-05-05 18:57   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, takata, tglx

Commit-ID:  7433c5cf4f69e0b9e648bfb59d65ffe39220e86c
Gitweb:     http://git.kernel.org/tip/7433c5cf4f69e0b9e648bfb59d65ffe39220e86c
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:54 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:23 +0200

m32r: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Link: http://lkml.kernel.org/r/20120503085034.756332161@linutronix.de
---
 arch/m32r/Kconfig            |    1 +
 arch/m32r/Makefile           |    2 +-
 arch/m32r/kernel/Makefile    |    2 +-
 arch/m32r/kernel/init_task.c |   34 ----------------------------------
 4 files changed, 3 insertions(+), 36 deletions(-)

diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index ef80a65..8b8bd7f 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -11,6 +11,7 @@ config M32R
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
 	select GENERIC_ATOMIC64
+	select HAVE_GENERIC_INIT_TASK
 
 config SBUS
 	bool
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index 8ff5ba0..def8dd0 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -31,7 +31,7 @@ KBUILD_AFLAGS += $(aflags-y)
 
 CHECKFLAGS	+= -D__m32r__ -D__BIG_ENDIAN__=1
 
-head-y	:= arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
+head-y	:= arch/m32r/kernel/head.o
 
 LIBGCC	:= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile
index b1a4b60..0c09dad 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 6c42d5f..0000000
--- a/arch/m32r/kernel/init_task.c
+++ /dev/null
@@ -1,34 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);
-

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

* [tip:smp/hotplug] m68k: Use generic init_task
  2012-05-03  9:02 ` [patch V2 15/31] m68k: Use generic init_task Thomas Gleixner
@ 2012-05-05 18:58   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:58 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, geert, tglx

Commit-ID:  ab5fc1ffb97e670226166f31e61a2cdc51dd2edc
Gitweb:     http://git.kernel.org/tip/ab5fc1ffb97e670226166f31e61a2cdc51dd2edc
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:54 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:23 +0200

m68k: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Link: http://lkml.kernel.org/r/20120503085034.816195285@linutronix.de
---
 arch/m68k/Kconfig            |    1 +
 arch/m68k/kernel/Makefile    |    2 +-
 arch/m68k/kernel/init_task.c |   35 -----------------------------------
 3 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index d318c60..1891127 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -8,6 +8,7 @@ config M68K
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
 	select GENERIC_CPU_DEVICES
 	select FPU if MMU
+	select HAVE_GENERIC_INIT_TASK
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
index 40d29a78..5c7070e 100644
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -13,7 +13,7 @@ extra-$(CONFIG_SUN3X)	:= head.o
 extra-$(CONFIG_SUN3)	:= sun3-head.o
 extra-y			+= vmlinux.lds
 
-obj-y	:= entry.o init_task.o irq.o m68k_ksyms.o module.o process.o ptrace.o
+obj-y	:= entry.o irq.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_MOTOROLA) += ints.o vectors.o
diff --git a/arch/m68k/kernel/init_task.c b/arch/m68k/kernel/init_task.c
deleted file mode 100644
index c744cfc..0000000
--- a/arch/m68k/kernel/init_task.c
+++ /dev/null
@@ -1,35 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 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 __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };
-

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

* [tip:smp/hotplug] microblaze: Use generic init_task
  2012-05-03  9:02 ` [patch V2 16/31] microblaze: " Thomas Gleixner
@ 2012-05-05 18:59   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 18:59 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, monstr, tglx

Commit-ID:  16caadb8c8f8461b853bd3a310d7730cf5a0aec4
Gitweb:     http://git.kernel.org/tip/16caadb8c8f8461b853bd3a310d7730cf5a0aec4
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:55 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:24 +0200

microblaze: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Michal Simek <monstr@monstr.eu>
Link: http://lkml.kernel.org/r/20120503085034.881532838@linutronix.de
---
 arch/microblaze/Kconfig            |    1 +
 arch/microblaze/kernel/Makefile    |    2 +-
 arch/microblaze/kernel/init_task.c |   26 --------------------------
 3 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index ac22dc7..21ccba6 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -22,6 +22,7 @@ config MICROBLAZE
 	select GENERIC_PCI_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
+	select HAVE_GENERIC_INIT_TASK
 
 config SWAP
 	def_bool n
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
index 494b63b..928c950 100644
--- a/arch/microblaze/kernel/Makefile
+++ b/arch/microblaze/kernel/Makefile
@@ -16,7 +16,7 @@ endif
 extra-y := head.o vmlinux.lds
 
 obj-y += dma.o exceptions.o \
-	hw_exception_handler.o init_task.o intc.o irq.o \
+	hw_exception_handler.o intc.o irq.o \
 	process.o prom.o prom_parse.o ptrace.o \
 	reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
 
diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c
deleted file mode 100644
index b5d711f..0000000
--- a/arch/microblaze/kernel/init_task.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
- * Copyright (C) 2009 PetaLogix
- * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * 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.
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/fs.h>
-#include <linux/mqueue.h>
-
-#include <asm/pgtable.h>
-
-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 =
-	{ INIT_THREAD_INFO(init_task) };
-
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);

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

* [tip:smp/hotplug] mips: Use generic init_task
  2012-05-03  9:02 ` [patch V2 17/31] mips: " Thomas Gleixner
@ 2012-05-05 19:00   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, ralf, tglx

Commit-ID:  957b369c3d35d73e1d0c3e9d21db791e58984cbb
Gitweb:     http://git.kernel.org/tip/957b369c3d35d73e1d0c3e9d21db791e58984cbb
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:55 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:24 +0200

mips: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Make the linker script align the task on THREAD_SIZE and not on
PAGE_SIZE, as PAGE_SIZE might be smaller than THREAD_SIZE.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20120503085034.941344764@linutronix.de
---
 arch/mips/Kconfig              |    1 +
 arch/mips/Makefile             |    2 +-
 arch/mips/kernel/Makefile      |    2 +-
 arch/mips/kernel/init_task.c   |   35 -----------------------------------
 arch/mips/kernel/vmlinux.lds.S |    2 +-
 5 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 186fc8c..d6c7890 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -30,6 +30,7 @@ config MIPS
 	select HAVE_MEMBLOCK_NODE_MAP
 	select ARCH_DISCARD_MEMBLOCK
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 menu "Machine selection"
 
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 4fedf5a..76017c2 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -235,7 +235,7 @@ endif
 
 OBJCOPYFLAGS		+= --remove-section=.reginfo
 
-head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
+head-y := arch/mips/kernel/head.o
 
 libs-y			+= arch/mips/lib/
 
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 0c6877e..fdaf65e 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 5f9a762..0000000
--- a/arch/mips/kernel/init_task.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <linux/mm.h>
-#include <linux/export.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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data
-	__attribute__((__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);
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 924da5e..e6772f2 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -72,7 +72,7 @@ SECTIONS
 	.data : {	/* Data */
 		. = . + DATAOFFSET;		/* for CONFIG_MAPPED_KERNEL */
 
-		INIT_TASK_DATA(PAGE_SIZE)
+		INIT_TASK_DATA(THREAD_SIZE)
 		NOSAVE_DATA
 		CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
 		READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)

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

* [tip:smp/hotplug] mn10300: Use generic init_task
  2012-05-03  9:02 ` [patch V2 18/31] mn10300: " Thomas Gleixner
@ 2012-05-05 19:01   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:01 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, dhowells, tglx

Commit-ID:  fe285f523bc13185da6d4c740655b2c27c75cf13
Gitweb:     http://git.kernel.org/tip/fe285f523bc13185da6d4c740655b2c27c75cf13
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:56 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:24 +0200

mn10300: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120503085035.011270394@linutronix.de
---
 arch/mn10300/Kconfig            |    1 +
 arch/mn10300/Makefile           |    2 +-
 arch/mn10300/kernel/Makefile    |    2 +-
 arch/mn10300/kernel/init_task.c |   39 ---------------------------------------
 4 files changed, 3 insertions(+), 41 deletions(-)

diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 3aa3de0..d28b6eb 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -6,6 +6,7 @@ config MN10300
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_KGDB
 	select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
+	select HAVE_GENERIC_INIT_TASK
 
 config AM33_2
 	def_bool n
diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile
index 7120282..33188b6 100644
--- a/arch/mn10300/Makefile
+++ b/arch/mn10300/Makefile
@@ -51,7 +51,7 @@ UNIT		:= asb2364
 endif
 
 
-head-y		:= arch/mn10300/kernel/head.o arch/mn10300/kernel/init_task.o
+head-y		:= arch/mn10300/kernel/head.o
 
 core-y		+= arch/mn10300/kernel/ arch/mn10300/mm/
 
diff --git a/arch/mn10300/kernel/Makefile b/arch/mn10300/kernel/Makefile
index 47ed30f..d067491 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
 
 fpu-obj-y := fpu-nofpu.o fpu-nofpu-low.o
 fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o
diff --git a/arch/mn10300/kernel/init_task.c b/arch/mn10300/kernel/init_task.c
deleted file mode 100644
index a481b04..0000000
--- a/arch/mn10300/kernel/init_task.c
+++ /dev/null
@@ -1,39 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] openrisc: Use generic init_task
  2012-05-03  9:02 ` [patch V2 19/31] openrisc: " Thomas Gleixner
@ 2012-05-05 19:01   ` tip-bot for Thomas Gleixner
  2012-05-08  9:37   ` [patch V2 19/31] " Jonas Bonn
  1 sibling, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:01 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, jonas, tglx

Commit-ID:  cf5e6def83fabdf10a05dc5a5981eda1672cb79c
Gitweb:     http://git.kernel.org/tip/cf5e6def83fabdf10a05dc5a5981eda1672cb79c
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:56 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:24 +0200

openrisc: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jonas Bonn <jonas@southpole.se>
Link: http://lkml.kernel.org/r/20120503085035.083343435@linutronix.de
---
 arch/openrisc/Kconfig            |    1 +
 arch/openrisc/Makefile           |    2 +-
 arch/openrisc/kernel/Makefile    |    2 +-
 arch/openrisc/kernel/init_task.c |   42 --------------------------------------
 4 files changed, 3 insertions(+), 44 deletions(-)

diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index a478719..6d92193 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -17,6 +17,7 @@ config OPENRISC
 	select GENERIC_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
+	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	def_bool y
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 158ae4c..966886c 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -38,7 +38,7 @@ else
 	KBUILD_CFLAGS += $(call cc-option,-msoft-div)
 endif
 
-head-y 		:= arch/openrisc/kernel/head.o arch/openrisc/kernel/init_task.o
+head-y 		:= arch/openrisc/kernel/head.o
 
 core-y		+= arch/openrisc/lib/ \
 		   arch/openrisc/kernel/ \
diff --git a/arch/openrisc/kernel/Makefile b/arch/openrisc/kernel/Makefile
index 9a4c270..e1ee0fa 100644
--- a/arch/openrisc/kernel/Makefile
+++ b/arch/openrisc/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y	:= head.o vmlinux.lds init_task.o
+extra-y	:= head.o vmlinux.lds
 
 obj-y	:= setup.o idle.o or32_ksyms.o process.o dma.o \
 	   traps.o time.o irq.o entry.o ptrace.o signal.o sys_or32.o \
diff --git a/arch/openrisc/kernel/init_task.c b/arch/openrisc/kernel/init_task.c
deleted file mode 100644
index ca53408..0000000
--- a/arch/openrisc/kernel/init_task.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * OpenRISC init_task.c
- *
- * Linux architectural port borrowing liberally from similar works of
- * others.  All original copyrights apply as per the original source
- * declaration.
- *
- * Modifications for the OpenRISC architecture:
- * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
- * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
- *
- *      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.
- */
-
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/export.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data = {
-	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);

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

* [tip:smp/hotplug] parisc: Use generic init_task
  2012-05-03  9:02 ` [patch V2 20/31] parisc: " Thomas Gleixner
@ 2012-05-05 19:02   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:02 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, jejb, tglx

Commit-ID:  c39f52a9edc5e0687cbb54c08bcd78cf7fe26b62
Gitweb:     http://git.kernel.org/tip/c39f52a9edc5e0687cbb54c08bcd78cf7fe26b62
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:57 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:24 +0200

parisc: Use generic init_task

Same code, except: The alignment of init_thread_union is handled via
the linker script, so no point to have it with the data structure. The
extra asm(".data") looks like a leftover from an asm to C conversion
and is pointless.

Use the generic version.

Move the page table data to parisc/mm/init.c and get rid of
parisc/../init_task.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Link: http://lkml.kernel.org/r/20120503085035.150896946@linutronix.de
---
 arch/parisc/Kconfig            |    1 +
 arch/parisc/kernel/init_task.c |   70 ----------------------------------------
 arch/parisc/mm/init.c          |   12 +++++++
 3 files changed, 13 insertions(+), 70 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index ddb8b24..4c6ca0d 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -18,6 +18,7 @@ config PARISC
 	select IRQ_PER_CPU
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
deleted file mode 100644
index 4a91e43..0000000
--- a/arch/parisc/kernel/init_task.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* 
- *    Static declaration of "init" task data structure.
- *
- *    Copyright (C) 2000 Paul Bame <bame at parisc-linux.org>
- *    Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
- *    Copyright (C) 2001 Helge Deller <deller @ parisc-linux.org>
- *    Copyright (C) 2002 Matthew Wilcox <willy with parisc-linux.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, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-#include <asm/pgalloc.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data
-	__attribute__((aligned(128))) =
-		{ 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
- * guarantee that global objects will be laid out in memory in the same order 
- * as the order of declaration, so put these in different sections and use
- * the linker script to order them. */
-pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE)));
-#endif
-
-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);
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 82f364e..3ac462d 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -33,6 +33,18 @@
 
 extern int  data_start;
 
+#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
+ * guarantee that global objects will be laid out in memory in the same order
+ * as the order of declaration, so put these in different sections and use
+ * the linker script to order them. */
+pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE)));
+#endif
+
+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)));
+
 #ifdef CONFIG_DISCONTIGMEM
 struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
 unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;

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

* [tip:smp/hotplug] powerpc: Use generic init_task
  2012-05-03  9:02 ` [patch V2 21/31] powerpc: " Thomas Gleixner
@ 2012-05-05 19:03   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:03 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, benh, tglx

Commit-ID:  b0ce50aa89edd82aaadc57e8c774f714ede6101d
Gitweb:     http://git.kernel.org/tip/b0ce50aa89edd82aaadc57e8c774f714ede6101d
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:57 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:25 +0200

powerpc: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Link: http://lkml.kernel.org/r/20120503085035.211123184@linutronix.de
---
 arch/powerpc/Kconfig            |    1 +
 arch/powerpc/kernel/Makefile    |    2 +-
 arch/powerpc/kernel/init_task.c |   29 -----------------------------
 3 files changed, 2 insertions(+), 30 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index c815535..946e881 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -145,6 +145,7 @@ config PPC
 	select HAVE_ARCH_JUMP_LABEL
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config EARLY_PRINTK
 	bool
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index f5808a3..83afacd 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -28,7 +28,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 cacheinfo.o time.o \
 				   prom.o traps.o setup-common.o \
 				   udbg.o misc.o io.o dma.o \
diff --git a/arch/powerpc/kernel/init_task.c b/arch/powerpc/kernel/init_task.c
deleted file mode 100644
index d076d46..0000000
--- a/arch/powerpc/kernel/init_task.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <linux/mm.h>
-#include <linux/export.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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] s390: Use generic init_task
  2012-05-03  9:02 ` [patch V2 22/31] s390: " Thomas Gleixner
  2012-05-03 10:00   ` Heiko Carstens
@ 2012-05-05 19:04   ` tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:04 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, schwidefsky, heiko.carstens, tglx

Commit-ID:  edd813bb35227f19e9d7f808165c0c4e95e03149
Gitweb:     http://git.kernel.org/tip/edd813bb35227f19e9d7f808165c0c4e95e03149
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:58 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:25 +0200

s390: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Link: http://lkml.kernel.org/r/20120503085035.271439530@linutronix.de
---
 arch/s390/Kconfig            |    1 +
 arch/s390/Makefile           |    1 -
 arch/s390/kernel/Makefile    |    2 +-
 arch/s390/kernel/init_task.c |   38 --------------------------------------
 4 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 15cab3e..6c0eb21 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -123,6 +123,7 @@ config S390
 	select ARCH_INLINE_WRITE_UNLOCK_IRQ
 	select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 0ad2f1e..49e76e8 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -91,7 +91,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head.o
 head-y		+= arch/s390/kernel/$(if $(CONFIG_64BIT),head64.o,head31.o)
-head-y		+= arch/s390/kernel/init_task.o
 
 # See arch/s390/Kbuild for content of core part of the kernel
 core-y		+= arch/s390/
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index 884b18a..9733b3f 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -28,7 +28,7 @@ obj-y	:=  bitmap.o traps.o time.o process.o base.o early.o setup.o vtime.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
 extra-y				+= $(if $(CONFIG_64BIT),head64.o,head31.o)
 
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
deleted file mode 100644
index 4d1c9fb..0000000
--- a/arch/s390/kernel/init_task.c
+++ /dev/null
@@ -1,38 +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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] score: Use generic init_task
  2012-05-03  9:02 ` [patch V2 23/31] score: " Thomas Gleixner
@ 2012-05-05 19:05   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:05 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, liqin.chen, hpa, mingo, tglx

Commit-ID:  842d7b1ccaefb6668cad193dcc894959ad756f3f
Gitweb:     http://git.kernel.org/tip/842d7b1ccaefb6668cad193dcc894959ad756f3f
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:58 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:25 +0200

score: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Link: http://lkml.kernel.org/r/20120503085035.332320547@linutronix.de

---
 arch/score/Kconfig            |    1 +
 arch/score/kernel/Makefile    |    2 +-
 arch/score/kernel/init_task.c |   46 -----------------------------------------
 3 files changed, 2 insertions(+), 47 deletions(-)

diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 4b28577..c760bcc 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -9,6 +9,7 @@ config SCORE
        select HAVE_MEMBLOCK_NODE_MAP
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_CPU_DEVICES
+       select HAVE_GENERIC_INIT_TASK
 
 choice
 	prompt "System type"
diff --git a/arch/score/kernel/Makefile b/arch/score/kernel/Makefile
index f218673..fb1802b 100644
--- a/arch/score/kernel/Makefile
+++ b/arch/score/kernel/Makefile
@@ -4,7 +4,7 @@
 
 extra-y	:= head.o vmlinux.lds
 
-obj-y += entry.o init_task.o irq.o process.o ptrace.o \
+obj-y += entry.o irq.o process.o ptrace.o \
 	setup.o signal.o sys_score.o time.o traps.o \
 	sys_call_table.o
 
diff --git a/arch/score/kernel/init_task.c b/arch/score/kernel/init_task.c
deleted file mode 100644
index baa03ee..0000000
--- a/arch/score/kernel/init_task.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * arch/score/kernel/init_task.c
- *
- * Score Processor version.
- *
- * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
- *
- * 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/init_task.h>
-#include <linux/mqueue.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] sh: Use generic init_task
  2012-05-03  9:02 ` [patch V2 24/31] sh: " Thomas Gleixner
@ 2012-05-05 19:06   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, lethal, tglx

Commit-ID:  41fe22f6553d1384fbef20b195b8c61ed6e768a1
Gitweb:     http://git.kernel.org/tip/41fe22f6553d1384fbef20b195b8c61ed6e768a1
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:59 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:25 +0200

sh: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Link: http://lkml.kernel.org/r/20120503085035.398257169@linutronix.de

---
 arch/sh/Kconfig            |    1 +
 arch/sh/Makefile           |    2 +-
 arch/sh/kernel/Makefile    |    2 +-
 arch/sh/kernel/init_task.c |   30 ------------------------------
 4 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 244cfd0..a0cd70b 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -29,6 +29,7 @@ config SUPERH
 	select GENERIC_ATOMIC64
 	select GENERIC_IRQ_SHOW
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_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/Makefile b/arch/sh/Makefile
index 3fc0f41..e14a676 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -124,7 +124,7 @@ endif
 
 export ld-bfd BITS
 
-head-y	:= arch/sh/kernel/init_task.o arch/sh/kernel/head_$(BITS).o
+head-y	:= arch/sh/kernel/head_$(BITS).o
 
 core-y				+= arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/
 core-$(CONFIG_SH_FPU_EMU)	+= arch/sh/math-emu/
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index 77f7ae1..88571ff 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the Linux/SuperH kernel.
 #
 
-extra-y	:= head_$(BITS).o init_task.o vmlinux.lds
+extra-y	:= head_$(BITS).o vmlinux.lds
 
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c
deleted file mode 100644
index 11f2ea5..0000000
--- a/arch/sh/kernel/init_task.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/fs.h>
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-
-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;
-/*
- * 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 __init_task_data =
-	{ 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);

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

* [tip:smp/hotplug] sparc: Use generic init_task
  2012-05-03  9:02 ` [patch V2 25/31] sparc: " Thomas Gleixner
@ 2012-05-05 19:06   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, sam, tglx, davem

Commit-ID:  3f149aa226e39e7f29ca7bb22f8e5bf304206a8f
Gitweb:     http://git.kernel.org/tip/3f149aa226e39e7f29ca7bb22f8e5bf304206a8f
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:59 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:25 +0200

sparc: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: http://lkml.kernel.org/r/20120503085035.463573011@linutronix.de

---
 arch/sparc/Kconfig            |    1 +
 arch/sparc/Makefile           |    1 -
 arch/sparc/kernel/Makefile    |    1 -
 arch/sparc/kernel/init_task.c |   22 ----------------------
 4 files changed, 1 insertions(+), 24 deletions(-)

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index e417f35..99aad7c 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -31,6 +31,7 @@ config SPARC
 	select GENERIC_PCI_IOMAP
 	select HAVE_NMI_WATCHDOG if SPARC64
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config SPARC32
 	def_bool !64BIT
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index eddcfb3..cf39aaf 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -62,7 +62,6 @@ endif
 endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
-head-y                 += arch/sparc/kernel/init_task.o
 
 core-y                 += arch/sparc/kernel/
 core-y                 += arch/sparc/mm/ arch/sparc/math-emu/
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index cb85458..9c74bdc 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -6,7 +6,6 @@ asflags-y := -ansi
 ccflags-y := -Werror
 
 extra-y     := head_$(BITS).o
-extra-y     += init_task.o
 
 # Undefine sparc when processing vmlinux.lds - it is used
 # And teach CPP we are doing $(BITS) builds (for this case)
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
deleted file mode 100644
index 35f141a..0000000
--- a/arch/sparc/kernel/init_task.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#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/pgtable.h>
-#include <asm/uaccess.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct task_struct init_task = INIT_TASK(init_task);
-EXPORT_SYMBOL(init_task);
-
-/* .text section in head.S is aligned at 8k boundary and this gets linked
- * right after that so that the init_thread_union is aligned properly as well.
- * If this is not aligned on a 8k boundary, then you should change code
- * in etrap.S which assumes it.
- */
-union thread_union init_thread_union __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };

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

* [tip:smp/hotplug] tile: Use generic init_task
  2012-05-03  9:02 ` [patch V2 26/31] tile: " Thomas Gleixner
@ 2012-05-05 19:07   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:07 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, cmetcalf, tglx

Commit-ID:  293ef7b8288da79112276ddd53902aff75ce7494
Gitweb:     http://git.kernel.org/tip/293ef7b8288da79112276ddd53902aff75ce7494
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:02:59 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:26 +0200

tile: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Link: http://lkml.kernel.org/r/20120503085035.528129988@linutronix.de
---
 arch/tile/Kconfig            |    1 +
 arch/tile/kernel/Makefile    |    2 +-
 arch/tile/kernel/init_task.c |   59 ------------------------------------------
 arch/tile/kernel/setup.c     |   16 +++++++++++
 4 files changed, 18 insertions(+), 60 deletions(-)

diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 96033e2..4fa3ff5 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -13,6 +13,7 @@ config TILE
 	select GENERIC_IRQ_SHOW
 	select SYS_HYPERVISOR
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
+	select HAVE_GENERIC_INIT_TASK
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
diff --git a/arch/tile/kernel/Makefile b/arch/tile/kernel/Makefile
index b4dbc05..0d826fa 100644
--- a/arch/tile/kernel/Makefile
+++ b/arch/tile/kernel/Makefile
@@ -3,7 +3,7 @@
 #
 
 extra-y := vmlinux.lds head_$(BITS).o
-obj-y := backtrace.o entry.o init_task.o irq.o messaging.o \
+obj-y := backtrace.o entry.o irq.o messaging.o \
 	pci-dma.o proc.o process.o ptrace.o reboot.o \
 	setup.o signal.o single_step.o stack.o sys.o sysfs.o time.o traps.o \
 	intvec_$(BITS).o regs_$(BITS).o tile-desc_$(BITS).o
diff --git a/arch/tile/kernel/init_task.c b/arch/tile/kernel/init_task.c
deleted file mode 100644
index 928b318..0000000
--- a/arch/tile/kernel/init_task.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010 Tilera Corporation. All Rights Reserved.
- *
- *   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, version 2.
- *
- *   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, GOOD TITLE or
- *   NON INFRINGEMENT.  See the GNU General Public License for
- *   more details.
- */
-
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-#include <linux/module.h>
-#include <linux/start_kernel.h>
-#include <linux/uaccess.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data = {
-	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 stack and boot info.
- */
-DEFINE_PER_CPU(unsigned long, boot_sp) =
-	(unsigned long)init_stack + THREAD_SIZE;
-
-#ifdef CONFIG_SMP
-DEFINE_PER_CPU(unsigned long, boot_pc) = (unsigned long)start_kernel;
-#else
-/*
- * The variable must be __initdata since it references __init code.
- * With CONFIG_SMP it is per-cpu data, which is exempt from validation.
- */
-unsigned long __initdata boot_pc = (unsigned long)start_kernel;
-#endif
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
index bff23f4..98d80eb 100644
--- a/arch/tile/kernel/setup.c
+++ b/arch/tile/kernel/setup.c
@@ -61,6 +61,22 @@ unsigned long __initdata node_free_pfn[MAX_NUMNODES];
 
 static unsigned long __initdata node_percpu[MAX_NUMNODES];
 
+/*
+ * per-CPU stack and boot info.
+ */
+DEFINE_PER_CPU(unsigned long, boot_sp) =
+	(unsigned long)init_stack + THREAD_SIZE;
+
+#ifdef CONFIG_SMP
+DEFINE_PER_CPU(unsigned long, boot_pc) = (unsigned long)start_kernel;
+#else
+/*
+ * The variable must be __initdata since it references __init code.
+ * With CONFIG_SMP it is per-cpu data, which is exempt from validation.
+ */
+unsigned long __initdata boot_pc = (unsigned long)start_kernel;
+#endif
+
 #ifdef CONFIG_HIGHMEM
 /* Page frame index of end of lowmem on each controller. */
 unsigned long __cpuinitdata node_lowmem_end_pfn[MAX_NUMNODES];

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

* [tip:smp/hotplug] unicore32: Use generic init_task
  2012-05-03  9:03 ` [patch V2 28/31] unicore32: " Thomas Gleixner
@ 2012-05-05 19:08   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, gxt, tglx

Commit-ID:  d0b691dffaee89a4c9e1890694d0c77201d7a9b1
Gitweb:     http://git.kernel.org/tip/d0b691dffaee89a4c9e1890694d0c77201d7a9b1
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:03:00 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:26 +0200

unicore32: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Link: http://lkml.kernel.org/r/20120503085035.669622065@linutronix.de
---
 arch/unicore32/Kconfig            |    1 +
 arch/unicore32/Makefile           |    1 -
 arch/unicore32/kernel/Makefile    |    2 +-
 arch/unicore32/kernel/init_task.c |   44 -------------------------------------
 4 files changed, 2 insertions(+), 46 deletions(-)

diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index eeb8054..e24ca398 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -13,6 +13,7 @@ config UNICORE32
 	select GENERIC_IRQ_SHOW
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
+	select HAVE_GENERIC_INIT_TASK
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
diff --git a/arch/unicore32/Makefile b/arch/unicore32/Makefile
index 6af4bc4..b6f5c4c 100644
--- a/arch/unicore32/Makefile
+++ b/arch/unicore32/Makefile
@@ -33,7 +33,6 @@ endif
 CHECKFLAGS		+= -D__unicore32__
 
 head-y			:= arch/unicore32/kernel/head.o
-head-y			+= arch/unicore32/kernel/init_task.o
 
 core-y			+= arch/unicore32/kernel/
 core-y			+= arch/unicore32/mm/
diff --git a/arch/unicore32/kernel/Makefile b/arch/unicore32/kernel/Makefile
index aeb0f18..3240101 100644
--- a/arch/unicore32/kernel/Makefile
+++ b/arch/unicore32/kernel/Makefile
@@ -29,4 +29,4 @@ obj-$(CONFIG_PUV3_NB0916)	+= puv3-nb0916.o
 head-y				:= head.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/unicore32/kernel/init_task.c b/arch/unicore32/kernel/init_task.c
deleted file mode 100644
index a35a1e5..0000000
--- a/arch/unicore32/kernel/init_task.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * linux/arch/unicore32/kernel/init_task.c
- *
- * Code specific to PKUnity SoC and UniCore ISA
- *
- * Copyright (C) 2001-2010 GUAN Xue-tao
- *
- * 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/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 signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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 __init_task_data = {
-	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);

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

* [tip:smp/hotplug] um: Use generic init_task
  2012-05-03  9:03 ` [patch V2 27/31] um: " Thomas Gleixner
@ 2012-05-05 19:09   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, richard, tglx

Commit-ID:  5b408241e99bd3f670122d4e6142b69cc6c24098
Gitweb:     http://git.kernel.org/tip/5b408241e99bd3f670122d4e6142b69cc6c24098
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:03:00 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:26 +0200

um: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/20120503085035.592937512@linutronix.de

---
 arch/um/Kconfig.common     |    1 +
 arch/um/kernel/Makefile    |    2 +-
 arch/um/kernel/init_task.c |   38 --------------------------------------
 arch/um/kernel/um_arch.c   |    5 +++++
 4 files changed, 7 insertions(+), 39 deletions(-)

diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 20a49ba..f03473c 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -10,6 +10,7 @@ config UML
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IO
+	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 65a1c3d..babe218 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -10,7 +10,7 @@ CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START)		\
 extra-y := vmlinux.lds
 clean-files :=
 
-obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
+obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
 	physmem.o process.o ptrace.o reboot.o sigio.o \
 	signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o \
 	um_arch.o umid.o skas/
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
deleted file mode 100644
index ddc9698..0000000
--- a/arch/um/kernel/init_task.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,intel.linux}.com)
- * Licensed under the GPL
- */
-
-#include "linux/sched.h"
-#include "linux/init_task.h"
-#include "linux/fs.h"
-#include "linux/module.h"
-#include "linux/mqueue.h"
-#include "asm/uaccess.h"
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-/*
- * 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..
- */
-
-union thread_union init_thread_union __init_task_data =
-	{ INIT_THREAD_INFO(init_task) };
-
-union thread_union cpu0_irqstack
-	__attribute__((__section__(".data..init_irqstack"))) =
-		{ INIT_THREAD_INFO(init_task) };
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index ba00eae..4db8770 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -10,6 +10,7 @@
 #include <linux/seq_file.h>
 #include <linux/string.h>
 #include <linux/utsname.h>
+#include <linux/sched.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/setup.h>
@@ -47,6 +48,10 @@ struct cpuinfo_um boot_cpu_data = {
 	.ipi_pipe		= { -1, -1 }
 };
 
+union thread_union cpu0_irqstack
+	__attribute__((__section__(".data..init_irqstack"))) =
+		{ INIT_THREAD_INFO(init_task) };
+
 unsigned long thread_saved_pc(struct task_struct *task)
 {
 	/* FIXME: Need to look up userspace_pid by cpu */

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

* [tip:smp/hotplug] x86: Use generic init_task
  2012-05-03  9:03 ` [patch V2 29/31] x86: " Thomas Gleixner
@ 2012-05-05 19:10   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:10 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx

Commit-ID:  45046892ef89c1e0caad66a03c8c1e14ad478d23
Gitweb:     http://git.kernel.org/tip/45046892ef89c1e0caad66a03c8c1e14ad478d23
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:03:01 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:26 +0200

x86: Use generic init_task

Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120503085035.739963562@linutronix.de
Cc: x86@kernel.org
---
 arch/x86/Kconfig            |    1 +
 arch/x86/Makefile           |    1 -
 arch/x86/kernel/Makefile    |    2 +-
 arch/x86/kernel/init_task.c |   42 ------------------------------------------
 arch/x86/kernel/process.c   |    9 +++++++++
 5 files changed, 11 insertions(+), 44 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 046bf4b..2246959 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -83,6 +83,7 @@ config X86
 	select GENERIC_IOMAP
 	select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 
 config INSTRUCTION_DECODER
 	def_bool (KPROBES || PERF_EVENTS)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 41a7237..3e48b26 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -146,7 +146,6 @@ archheaders:
 head-y := arch/x86/kernel/head_$(BITS).o
 head-y += arch/x86/kernel/head$(BITS).o
 head-y += arch/x86/kernel/head.o
-head-y += arch/x86/kernel/init_task.o
 
 libs-y  += arch/x86/lib/
 
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 532d2e0..56ebd1f 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y                := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
+extra-y                := head_$(BITS).o head$(BITS).o head.o vmlinux.lds
 
 CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
deleted file mode 100644
index 43e9ccf..0000000
--- a/arch/x86/kernel/init_task.c
+++ /dev/null
@@ -1,42 +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>
-#include <asm/desc.h>
-
-static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-/*
- * 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 __init_task_data =
-	{ 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
- * so they are allowed to end up in the .data..cacheline_aligned
- * section. Since TSS's are completely CPU-local, we want them
- * on exact cacheline boundaries, to eliminate cacheline ping-pong.
- */
-DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
-
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 1d92a5a..8aa532f 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -27,6 +27,15 @@
 #include <asm/debugreg.h>
 #include <asm/nmi.h>
 
+/*
+ * per-CPU TSS segments. Threads are completely 'soft' on Linux,
+ * no more per-task TSS's. The TSS size is kept cacheline-aligned
+ * so they are allowed to end up in the .data..cacheline_aligned
+ * section. Since TSS's are completely CPU-local, we want them
+ * on exact cacheline boundaries, to eliminate cacheline ping-pong.
+ */
+DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
+
 #ifdef CONFIG_X86_64
 static DEFINE_PER_CPU(unsigned char, is_idle);
 static ATOMIC_NOTIFIER_HEAD(idle_notifier);

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

* [tip:smp/hotplug] xtensa: Use generic init_task
  2012-05-03  9:03 ` [patch V2 30/31] xtensa: " Thomas Gleixner
@ 2012-05-05 19:11   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:11 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, chris, tglx

Commit-ID:  e4d59621923ba6c42f30a9d74c7c78d101c2f7aa
Gitweb:     http://git.kernel.org/tip/e4d59621923ba6c42f30a9d74c7c78d101c2f7aa
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:03:01 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:26 +0200

xtensa: Use generic init_task

Same code. Use the generic version.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
Link: http://lkml.kernel.org/r/20120503085035.804059531@linutronix.de
---
 arch/xtensa/Kconfig            |    1 +
 arch/xtensa/kernel/Makefile    |    2 +-
 arch/xtensa/kernel/init_task.c |   31 -------------------------------
 3 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 8a3f835..d0ab5bb 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -10,6 +10,7 @@ config XTENSA
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
+	select HAVE_GENERIC_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 2d2728b..59fc3fe 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -6,7 +6,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
 
 obj-$(CONFIG_KGDB) += xtensa-stub.o
 obj-$(CONFIG_PCI) += pci.o
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
deleted file mode 100644
index cd122fb..0000000
--- a/arch/xtensa/kernel/init_task.c
+++ /dev/null
@@ -1,31 +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 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 =
-	{ INIT_THREAD_INFO(init_task) };
-
-struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_task);

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

* [tip:smp/hotplug] init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK
  2012-05-03  9:03 ` [patch V2 31/31] init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK Thomas Gleixner
@ 2012-05-05 19:11   ` tip-bot for Thomas Gleixner
  0 siblings, 0 replies; 69+ messages in thread
From: tip-bot for Thomas Gleixner @ 2012-05-05 19:11 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx

Commit-ID:  a6359d1eec43d1fd6ffbac958149844873e0084f
Gitweb:     http://git.kernel.org/tip/a6359d1eec43d1fd6ffbac958149844873e0084f
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 3 May 2012 09:03:02 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 5 May 2012 13:00:46 +0200

init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK

Now that all archs except ia64 are converted, replace the config and
let the ia64 select CONFIG_ARCH_INIT_TASK

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120503085035.867948914@linutronix.de

---
 arch/Kconfig            |    3 ++-
 arch/alpha/Kconfig      |    1 -
 arch/arm/Kconfig        |    1 -
 arch/avr32/Kconfig      |    1 -
 arch/blackfin/Kconfig   |    1 -
 arch/c6x/Kconfig        |    1 -
 arch/cris/Kconfig       |    1 -
 arch/frv/Kconfig        |    1 -
 arch/h8300/Kconfig      |    1 -
 arch/hexagon/Kconfig    |    1 -
 arch/ia64/Kconfig       |    1 +
 arch/m32r/Kconfig       |    1 -
 arch/m68k/Kconfig       |    1 -
 arch/microblaze/Kconfig |    1 -
 arch/mips/Kconfig       |    1 -
 arch/mn10300/Kconfig    |    1 -
 arch/openrisc/Kconfig   |    1 -
 arch/parisc/Kconfig     |    1 -
 arch/powerpc/Kconfig    |    1 -
 arch/s390/Kconfig       |    1 -
 arch/score/Kconfig      |    1 -
 arch/sh/Kconfig         |    1 -
 arch/sparc/Kconfig      |    1 -
 arch/tile/Kconfig       |    1 -
 arch/um/Kconfig.common  |    1 -
 arch/unicore32/Kconfig  |    1 -
 arch/x86/Kconfig        |    1 -
 arch/xtensa/Kconfig     |    1 -
 init/Makefile           |    5 ++++-
 29 files changed, 7 insertions(+), 28 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 2dd8fdd..597b132 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -148,7 +148,8 @@ config USE_GENERIC_SMP_HELPERS
 config GENERIC_SMP_IDLE_THREAD
        bool
 
-config HAVE_GENERIC_INIT_TASK
+# Select if arch init_task initializer is different to init/init_task.c
+config ARCH_INIT_TASK
        bool
 
 config HAVE_REGS_AND_STACK_ACCESS_API
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 74d0004..991b8bb 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -16,7 +16,6 @@ config ALPHA
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_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 8b36535..cb253ce 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -35,7 +35,6 @@ config ARM
 	select GENERIC_PCI_IOMAP
 	select HAVE_BPF_JIT if NET
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_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 f4289ca..3dea7231 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -12,7 +12,6 @@ config AVR32
 	select HARDIRQS_SW_RESEND
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
-	select HAVE_GENERIC_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 8570d6e..779b9c8 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -38,7 +38,6 @@ config BLACKFIN
 	select IRQ_PER_CPU if SMP
 	select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 4189fb5..1c3ccd4 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -10,7 +10,6 @@ config TMS320C6X
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_DMA_API_DEBUG
 	select HAVE_GENERIC_HARDIRQS
-	select HAVE_GENERIC_INIT_TASK
 	select HAVE_MEMBLOCK
 	select SPARSE_IRQ
 	select IRQ_DOMAIN
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 15e30a7..2995035 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -50,7 +50,6 @@ config CRIS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
-	select HAVE_GENERIC_INIT_TASK
 
 config HZ
 	int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index ed6dbd2..a685910 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -9,7 +9,6 @@ config FRV
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_CPU_DEVICES
-	select HAVE_GENERIC_INIT_TASK
 
 config ZONE_DMA
 	bool
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 5fac425..56e890d 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -5,7 +5,6 @@ config H8300
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
-	select HAVE_GENERIC_INIT_TASK
 
 config SYMBOL_PREFIX
 	string
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 6ee5488..d2e4a33 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -28,7 +28,6 @@ config HEXAGON
 	select NO_IOPORT
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 	# mostly generic routines, with some accelerated ones
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 1197547..022ea3a 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -34,6 +34,7 @@ config IA64
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
+	select 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 8b8bd7f..ef80a65 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -11,7 +11,6 @@ config M32R
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
 	select GENERIC_ATOMIC64
-	select HAVE_GENERIC_INIT_TASK
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 1891127..d318c60 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -8,7 +8,6 @@ config M68K
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
 	select GENERIC_CPU_DEVICES
 	select FPU if MMU
-	select HAVE_GENERIC_INIT_TASK
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 21ccba6..ac22dc7 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -22,7 +22,6 @@ config MICROBLAZE
 	select GENERIC_PCI_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
-	select HAVE_GENERIC_INIT_TASK
 
 config SWAP
 	def_bool n
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d6c7890..186fc8c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -30,7 +30,6 @@ config MIPS
 	select HAVE_MEMBLOCK_NODE_MAP
 	select ARCH_DISCARD_MEMBLOCK
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 menu "Machine selection"
 
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index d28b6eb..3aa3de0 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -6,7 +6,6 @@ config MN10300
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_KGDB
 	select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
-	select HAVE_GENERIC_INIT_TASK
 
 config AM33_2
 	def_bool n
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 6d92193..a478719 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -17,7 +17,6 @@ config OPENRISC
 	select GENERIC_IOMAP
 	select GENERIC_CPU_DEVICES
 	select GENERIC_ATOMIC64
-	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 4c6ca0d..ddb8b24 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -18,7 +18,6 @@ config PARISC
 	select IRQ_PER_CPU
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 946e881..c815535 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -145,7 +145,6 @@ config PPC
 	select HAVE_ARCH_JUMP_LABEL
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config EARLY_PRINTK
 	bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 6c0eb21..15cab3e 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -123,7 +123,6 @@ config S390
 	select ARCH_INLINE_WRITE_UNLOCK_IRQ
 	select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index c760bcc..4b28577 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -9,7 +9,6 @@ config SCORE
        select HAVE_MEMBLOCK_NODE_MAP
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_CPU_DEVICES
-       select HAVE_GENERIC_INIT_TASK
 
 choice
 	prompt "System type"
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index a0cd70b..244cfd0 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -29,7 +29,6 @@ config SUPERH
 	select GENERIC_ATOMIC64
 	select GENERIC_IRQ_SHOW
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_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 99aad7c..e417f35 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -31,7 +31,6 @@ config SPARC
 	select GENERIC_PCI_IOMAP
 	select HAVE_NMI_WATCHDOG if SPARC64
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config SPARC32
 	def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 4fa3ff5..96033e2 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -13,7 +13,6 @@ config TILE
 	select GENERIC_IRQ_SHOW
 	select SYS_HYPERVISOR
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
-	select HAVE_GENERIC_INIT_TASK
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index f03473c..20a49ba 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -10,7 +10,6 @@ config UML
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IO
-	select HAVE_GENERIC_INIT_TASK
 
 config MMU
 	bool
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index e24ca398..eeb8054 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -13,7 +13,6 @@ config UNICORE32
 	select GENERIC_IRQ_SHOW
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
-	select HAVE_GENERIC_INIT_TASK
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2246959..046bf4b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -83,7 +83,6 @@ config X86
 	select GENERIC_IOMAP
 	select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 
 config INSTRUCTION_DECODER
 	def_bool (KPROBES || PERF_EVENTS)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index d0ab5bb..8a3f835 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -10,7 +10,6 @@ config XTENSA
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
-	select HAVE_GENERIC_INIT_TASK
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
diff --git a/init/Makefile b/init/Makefile
index c55eac9..7bc47ee 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -9,7 +9,10 @@ else
 obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
 endif
 obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
-obj-$(CONFIG_HAVE_GENERIC_INIT_TASK) += init_task.o
+
+ifneq ($(CONFIG_ARCH_INIT_TASK),y)
+obj-y                          += init_task.o
+endif
 
 mounts-y			:= do_mounts.o
 mounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o

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

* Re: [patch V2 19/31] openrisc: Use generic init_task
  2012-05-03  9:02 ` [patch V2 19/31] openrisc: " Thomas Gleixner
  2012-05-05 19:01   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
@ 2012-05-08  9:37   ` Jonas Bonn
  1 sibling, 0 replies; 69+ messages in thread
From: Jonas Bonn @ 2012-05-08  9:37 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML


Looks good; nice cleanup and everything still works!  Sorry for the
delay in responding.

Acked-by: Jonas Bonn <jonas@southpole.se>

/Jonas

On Thu, 2012-05-03 at 09:02 +0000, Thomas Gleixner wrote:
> plain text document attachment (openrisc-use-generic-init-task.patch)
> Same code. Use the generic version. The special Makefile treatment is
> pointless anyway as init_task.o contains only data which is handled by
> the linker script. So no point on being treated like head text.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jonas Bonn <jonas@southpole.se>
> ---
>  arch/openrisc/Kconfig            |    1 
>  arch/openrisc/Makefile           |    2 -
>  arch/openrisc/kernel/Makefile    |    2 -
>  arch/openrisc/kernel/init_task.c |   42 ---------------------------------------
>  4 files changed, 3 insertions(+), 44 deletions(-)
> 
> Index: tip/arch/openrisc/Kconfig
> ===================================================================
> --- tip.orig/arch/openrisc/Kconfig
> +++ tip/arch/openrisc/Kconfig
> @@ -17,6 +17,7 @@ config OPENRISC
>  	select GENERIC_IOMAP
>  	select GENERIC_CPU_DEVICES
>  	select GENERIC_ATOMIC64
> +	select HAVE_GENERIC_INIT_TASK
>  
>  config MMU
>  	def_bool y
> Index: tip/arch/openrisc/Makefile
> ===================================================================
> --- tip.orig/arch/openrisc/Makefile
> +++ tip/arch/openrisc/Makefile
> @@ -38,7 +38,7 @@ else
>  	KBUILD_CFLAGS += $(call cc-option,-msoft-div)
>  endif
>  
> -head-y 		:= arch/openrisc/kernel/head.o arch/openrisc/kernel/init_task.o
> +head-y 		:= arch/openrisc/kernel/head.o
>  
>  core-y		+= arch/openrisc/lib/ \
>  		   arch/openrisc/kernel/ \
> Index: tip/arch/openrisc/kernel/Makefile
> ===================================================================
> --- tip.orig/arch/openrisc/kernel/Makefile
> +++ tip/arch/openrisc/kernel/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for the linux kernel.
>  #
>  
> -extra-y	:= head.o vmlinux.lds init_task.o
> +extra-y	:= head.o vmlinux.lds
>  
>  obj-y	:= setup.o idle.o or32_ksyms.o process.o dma.o \
>  	   traps.o time.o irq.o entry.o ptrace.o signal.o sys_or32.o \
> Index: tip/arch/openrisc/kernel/init_task.c
> ===================================================================
> --- tip.orig/arch/openrisc/kernel/init_task.c
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -/*
> - * OpenRISC init_task.c
> - *
> - * Linux architectural port borrowing liberally from similar works of
> - * others.  All original copyrights apply as per the original source
> - * declaration.
> - *
> - * Modifications for the OpenRISC architecture:
> - * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
> - * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
> - *
> - *      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.
> - */
> -
> -#include <linux/init_task.h>
> -#include <linux/mqueue.h>
> -#include <linux/export.h>
> -
> -static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
> -static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
> -
> -/*
> - * 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 __init_task_data = {
> -	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);
> 
> 



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

end of thread, other threads:[~2012-05-08  9:37 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-03  9:02 [patch V2 00/31] init_task: Use a generic init_task variant Thomas Gleixner
2012-05-03  9:02 ` [patch V2 01/31] frv: Use correct size for task_struct allocation Thomas Gleixner
2012-05-05 18:46   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 02/31] frv: Use core allocator for task_struct Thomas Gleixner
2012-05-05 18:47   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines Thomas Gleixner
2012-05-03  9:02 ` [patch V2 04/31] init_task: Create generic init_task instance Thomas Gleixner
2012-05-05 18:49   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 05/31] alpha: Use generic init_task Thomas Gleixner
2012-05-05 18:50   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 06/31] arm: " Thomas Gleixner
2012-05-05 18:51   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 07/31] avr32: " Thomas Gleixner
2012-05-05 18:51   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 08/31] blackfin: " Thomas Gleixner
2012-05-05 18:52   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 10/31] cris: " Thomas Gleixner
2012-05-05 18:54   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 09/31] cx6: " Thomas Gleixner
2012-05-03 13:45   ` Mark Salter
2012-05-03 15:25     ` Thomas Gleixner
2012-05-05 18:53   ` [tip:smp/hotplug] c6x: " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 11/31] frv: " Thomas Gleixner
2012-05-05 18:55   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 12/31] h8300: " Thomas Gleixner
2012-05-05 18:56   ` [tip:smp/hotplug] h8300-use-generic-init_task tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 14/31] m32r: Use generic init_task Thomas Gleixner
2012-05-05 18:57   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 13/31] hexagon: Use generic idle_task Thomas Gleixner
2012-05-05 18:56   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 15/31] m68k: Use generic init_task Thomas Gleixner
2012-05-05 18:58   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 16/31] microblaze: " Thomas Gleixner
2012-05-05 18:59   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 17/31] mips: " Thomas Gleixner
2012-05-05 19:00   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 19/31] openrisc: " Thomas Gleixner
2012-05-05 19:01   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-08  9:37   ` [patch V2 19/31] " Jonas Bonn
2012-05-03  9:02 ` [patch V2 18/31] mn10300: " Thomas Gleixner
2012-05-05 19:01   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 21/31] powerpc: " Thomas Gleixner
2012-05-05 19:03   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 20/31] parisc: " Thomas Gleixner
2012-05-05 19:02   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 22/31] s390: " Thomas Gleixner
2012-05-03 10:00   ` Heiko Carstens
2012-05-05 19:04   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 23/31] score: " Thomas Gleixner
2012-05-05 19:05   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 26/31] tile: " Thomas Gleixner
2012-05-05 19:07   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 24/31] sh: " Thomas Gleixner
2012-05-05 19:06   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:02 ` [patch V2 25/31] sparc: " Thomas Gleixner
2012-05-05 19:06   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:03 ` [patch V2 27/31] um: " Thomas Gleixner
2012-05-05 19:09   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:03 ` [patch V2 28/31] unicore32: " Thomas Gleixner
2012-05-05 19:08   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:03 ` [patch V2 29/31] x86: " Thomas Gleixner
2012-05-05 19:10   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:03 ` [patch V2 30/31] xtensa: " Thomas Gleixner
2012-05-05 19:11   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-03  9:03 ` [patch V2 31/31] init_task: Replace CONFIG_HAVE_GENERIC_INIT_TASK Thomas Gleixner
2012-05-05 19:11   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-04 17:28 ` [patch V2 03/31] task_allocator: Use config switches instead of magic defines David Howells
2012-05-05 10:54   ` Thomas Gleixner
2012-05-04 17:30 ` [patch V2 02/31] frv: Use core allocator for task_struct David Howells

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).