Skip to contentSkip to conversation

init_task: Use a generic init_task variant

PATCH Superseded Thomas Gleixner 11 participants 48 messages Apr 30, 2012 – May 6, 2012

Subsystems (17)
Arm (32-bit) x86 PowerPC MIPS +13 more subsystems

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover init_task: Use a generic init_task variant

All architectures do roughly the same to initialize init_task. The only architecture which deviates is ia64, but I could not figure out why it couldn't use the same setup as all other architectures.

The following series converts all archs to a generic version.

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/ia64/kernel/init_task.c        |   42 ---------------------
 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/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/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/Makefile               |    2 -
 tip/arch/frv/kernel/Makefile        |    2 -
 tip/arch/h8300/kernel/Makefile      |    2 -
 tip/arch/hexagon/Makefile           |    3 -
 tip/arch/hexagon/kernel/Makefile    |    2 -
 tip/arch/ia64/Makefile              |    2 -
 tip/arch/ia64/kernel/Makefile       |    2 -
 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/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/kernel/sched/Makefile           |    4 --
 tip/kernel/sched/init_task.c        |   24 ++++++++++++
 69 files changed, 100 insertions(+), 981 deletions(-)
#1 lore raw

PATCH 2/29 alpha: Use generic init_task

Identical code. Use the generic version.

---
 arch/alpha/Kconfig            |    1 +
 arch/alpha/kernel/Makefile    |    2 +-
 arch/alpha/kernel/init_task.c |   17 -----------------
 3 files changed, 2 insertions(+), 18 deletions(-)
arch/alpha/Kconfig +1 -0
Index: 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,
arch/alpha/kernel/Makefile +1 -1
Index: 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
 
arch/alpha/kernel/init_task.c deleted +0 -17
Index: tip/arch/alpha/kernel/init_task.c
===================================================================
@@ -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) };
#3 lore raw

PATCH 4/29 avr32: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

Cc Haavard Skinnemoen <[email protected]>
---
 arch/avr32/Kconfig            |    1 +
 arch/avr32/kernel/Makefile    |    2 +-
 arch/avr32/kernel/init_task.c |   31 -------------------------------
 3 files changed, 2 insertions(+), 32 deletions(-)
arch/avr32/Kconfig +1 -0
Index: 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
arch/avr32/kernel/Makefile +1 -1
Index: 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
arch/avr32/kernel/init_task.c deleted +0 -31
Index: tip/arch/avr32/kernel/init_task.c
===================================================================
@@ -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);
#2 lore raw

PATCH 3/29 arm: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/arm/Kconfig +1 -0
Index: 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
arch/arm/Makefile +1 -1
Index: 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
arch/arm/kernel/Makefile +1 -1
Index: 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
arch/arm/kernel/init_task.c deleted +0 -37
Index: tip/arch/arm/kernel/init_task.c
===================================================================
@@ -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);
#4 lore raw

PATCH 5/29 blackfin: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/blackfin/Kconfig +1 -0
Index: 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
arch/blackfin/Makefile +0 -2
Index: 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.
arch/blackfin/kernel/Makefile +1 -1
Index: 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 \
arch/blackfin/kernel/init_task.c deleted +0 -32
Index: tip/arch/blackfin/kernel/init_task.c
===================================================================
@@ -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)};
#6 lore raw

PATCH 6/29 cx6: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

---
 arch/c6x/Kconfig          |    1 +
 arch/c6x/kernel/process.c |   16 ----------------
 2 files changed, 1 insertion(+), 16 deletions(-)
arch/c6x/Kconfig +1 -0
Index: 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
arch/c6x/kernel/process.c +0 -16
Index: 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
  */
#7 lore raw

PATCH 7/29 cris: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

---
 arch/cris/Kconfig          |    1 +
 arch/cris/kernel/process.c |   28 ----------------------------
 2 files changed, 1 insertion(+), 28 deletions(-)
arch/cris/Kconfig +1 -0
Index: 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
arch/cris/kernel/process.c +0 -28
Index: 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
#10 lore raw

PATCH 9/29 h8300: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

---
 arch/h8300/Kconfig            |    1 +
 arch/h8300/kernel/Makefile    |    2 +-
 arch/h8300/kernel/init_task.c |   36 ------------------------------------
 3 files changed, 2 insertions(+), 37 deletions(-)
arch/h8300/Kconfig +1 -0
Index: 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
arch/h8300/kernel/Makefile +1 -1
Index: 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 
arch/h8300/kernel/init_task.c deleted +0 -36
Index: tip/arch/h8300/kernel/init_task.c
===================================================================
@@ -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) };
-
#11 lore raw

PATCH 10/29 hexagon: Use generic idle_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/hexagon/Kconfig +1 -0
Index: 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
arch/hexagon/Makefile +1 -2
Index: 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/ \
arch/hexagon/kernel/Makefile +1 -1
Index: 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
 
arch/hexagon/kernel/init_task.c deleted +0 -54

54 lines not on this page · raw message

#9 lore raw

PATCH 8/29 frv: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/frv/Kconfig +1 -0
Index: 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 HAVE_GENERIC_INIT_TASK
 
 config ZONE_DMA
 	bool
arch/frv/Makefile +1 -1
Index: 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/
arch/frv/kernel/Makefile +1 -1
Index: 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 \
arch/frv/kernel/init_task.c deleted +0 -32
Index: tip/arch/frv/kernel/init_task.c
===================================================================
@@ -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);
#14 lore raw

PATCH 12/29 m32r: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/m32r/Kconfig +1 -0
Index: 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
arch/m32r/Makefile +1 -1
Index: 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)
 
arch/m32r/kernel/Makefile +1 -1
Index: 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
arch/m32r/kernel/init_task.c deleted +0 -34
Index: tip/arch/m32r/kernel/init_task.c
===================================================================
@@ -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);
-
#13 lore raw

PATCH 11/29 ia64: Use generic init_task

In reply to Thomas Gleixner

IA64 has a special crafted version of init_task, but I could not figure out why it couldn't work with the generic one.

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

---
 arch/ia64/Kconfig            |    1 +
 arch/ia64/Makefile           |    2 +-
 arch/ia64/kernel/Makefile    |    2 +-
 arch/ia64/kernel/init_task.c |   42 ------------------------------------------
 4 files changed, 3 insertions(+), 44 deletions(-)
arch/ia64/Kconfig +1 -0
Index: tip/arch/ia64/Kconfig
===================================================================
@@ -34,6 +34,7 @@ config IA64
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
+	select HAVE_GENERIC_INIT_TASK
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
arch/ia64/Makefile +1 -1
Index: tip/arch/ia64/Makefile
===================================================================
@@ -42,7 +42,7 @@ $(error Sorry, you need a newer version 
 endif
 
 KBUILD_CFLAGS += $(cflags-y)
-head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
+head-y := arch/ia64/kernel/head.o
 
 libs-y				+= arch/ia64/lib/
 core-y				+= arch/ia64/kernel/ arch/ia64/mm/
arch/ia64/kernel/Makefile +1 -1
Index: tip/arch/ia64/kernel/Makefile
===================================================================
@@ -6,7 +6,7 @@ ifdef CONFIG_DYNAMIC_FTRACE
 CFLAGS_REMOVE_ftrace.o = -pg
 endif
 
-extra-y	:= head.o init_task.o vmlinux.lds
+extra-y	:= head.o vmlinux.lds
 
 obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 	 irq_lsapic.o ivt.o machvec.o pal.o paravirt_patchlist.o patch.o process.o perfmon.o ptrace.o sal.o		\
arch/ia64/kernel/init_task.c deleted +0 -42

42 lines not on this page · raw message

#15 lore raw

PATCH 13/29 m68k: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

Cc Geert Uytterhoeven <[email protected]>
---
 arch/m68k/Kconfig            |    1 +
 arch/m68k/kernel/Makefile    |    2 +-
 arch/m68k/kernel/init_task.c |   35 -----------------------------------
 3 files changed, 2 insertions(+), 36 deletions(-)
arch/m68k/Kconfig +1 -0
Index: 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
arch/m68k/kernel/Makefile +1 -1
Index: 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
arch/m68k/kernel/init_task.c deleted +0 -35
Index: tip/arch/m68k/kernel/init_task.c
===================================================================
@@ -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) };
-
#16 lore raw

PATCH 14/29 microblaze: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

---
 arch/microblaze/Kconfig            |    1 +
 arch/microblaze/kernel/Makefile    |    2 +-
 arch/microblaze/kernel/init_task.c |   26 --------------------------
 3 files changed, 2 insertions(+), 27 deletions(-)
arch/microblaze/Kconfig +1 -0
Index: 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
arch/microblaze/kernel/Makefile +1 -1
Index: 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
 
arch/microblaze/kernel/init_task.c deleted +0 -26
Index: tip/arch/microblaze/kernel/init_task.c
===================================================================
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2009 Michal Simek <[email protected]>
- * 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);
#17 lore raw

PATCH 15/29 mips: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/mips/Kconfig +1 -0
Index: 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"
 
arch/mips/Makefile +1 -1
Index: 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/
 
arch/mips/kernel/Makefile +1 -1
Index: 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 \
arch/mips/kernel/init_task.c deleted +0 -35
Index: tip/arch/mips/kernel/init_task.c
===================================================================
@@ -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);
arch/mips/kernel/vmlinux.lds.S +1 -1
Index: 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)
#18 lore raw

PATCH 16/29 mn10300: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/mn10300/Kconfig +1 -0
Index: 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
arch/mn10300/Makefile +1 -1
Index: 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/
 
arch/mn10300/kernel/Makefile +1 -1
Index: 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
arch/mn10300/kernel/init_task.c deleted +0 -39
Index: tip/arch/mn10300/kernel/init_task.c
===================================================================
@@ -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);
#19 lore raw

PATCH 17/29 openrisc: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/openrisc/Kconfig +1 -0
Index: 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
arch/openrisc/Makefile +1 -1
Index: 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/ \
arch/openrisc/kernel/Makefile +1 -1
Index: 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 \
arch/openrisc/kernel/init_task.c deleted +0 -42

42 lines not on this page · raw message

#21 lore raw

PATCH 19/29 powerpc: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

Cc Benjamin Herrenschmidt <[email protected]>
---
 arch/powerpc/Kconfig            |    1 +
 arch/powerpc/kernel/Makefile    |    2 +-
 arch/powerpc/kernel/init_task.c |   29 -----------------------------
 3 files changed, 2 insertions(+), 30 deletions(-)
arch/powerpc/Kconfig +1 -0
Index: 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
arch/powerpc/kernel/Makefile +1 -1
Index: 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 \
arch/powerpc/kernel/init_task.c deleted +0 -29
Index: tip/arch/powerpc/kernel/init_task.c
===================================================================
@@ -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);
#23 lore raw

PATCH 20/29 s390: Use generic init_task

In reply to Thomas Gleixner

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.

Cc Martin Schwidefsky <[email protected]>
---
 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(-)
arch/s390/Kconfig +1 -0
Index: 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
arch/s390/Makefile +0 -1
Index: 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/
arch/s390/kernel/Makefile +1 -1
Index: 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
arch/s390/kernel/init_task.c deleted +0 -38
Index: tip/arch/s390/kernel/init_task.c
===================================================================
@@ -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);
#20 lore raw

PATCH 18/29 parisc: Use generic init_task

In reply to Thomas Gleixner

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

Cc "James E.J. Bottomley" <[email protected]>
---
 arch/parisc/Kconfig            |    1 
 arch/parisc/kernel/init_task.c |   70 -----------------------------------------
 arch/parisc/mm/init.c          |   12 +++++++
 3 files changed, 13 insertions(+), 70 deletions(-)
arch/parisc/Kconfig +1 -0
Index: 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
arch/parisc/kernel/init_task.c deleted +0 -70

70 lines not on this page · raw message

arch/parisc/mm/init.c +12 -0
Index: 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;
#24 lore raw

PATCH 21/29 score: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

---
 arch/score/Kconfig         |    1 +
 arch/score/kernel/Makefile |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/score/Kconfig +1 -0
Index: 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"
arch/score/kernel/Makefile +1 -1
Index: 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
 
#31 lore raw

PATCH 23/29 sparc: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

Cc "David S. Miller" <[email protected]>
---
 arch/sparc/Kconfig            |    1 +
 arch/sparc/kernel/init_task.c |   22 ----------------------
 2 files changed, 1 insertion(+), 22 deletions(-)
arch/sparc/Kconfig +1 -0
Index: 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
arch/sparc/kernel/init_task.c deleted +0 -22
Index: tip/arch/sparc/kernel/init_task.c
===================================================================
@@ -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) };
#37 lore raw

PATCH 24/29 tile: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/tile/Kconfig +1 -0
Index: 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
arch/tile/kernel/Makefile +1 -1
Index: 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
arch/tile/kernel/init_task.c deleted +0 -59

59 lines not on this page · raw message

arch/tile/kernel/setup.c +16 -0
Index: 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];
#29 lore raw

PATCH 22/29 sh: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/sh/Kconfig +1 -0
Index: 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
arch/sh/Makefile +1 -1
Index: 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/
arch/sh/kernel/Makefile +1 -1
Index: 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
arch/sh/kernel/init_task.c deleted +0 -30
Index: tip/arch/sh/kernel/init_task.c
===================================================================
@@ -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);
#40 lore raw

PATCH 26/29 unicore32: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/unicore32/Kconfig +1 -0
Index: 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
arch/unicore32/Makefile +0 -1
Index: 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/
arch/unicore32/kernel/Makefile +1 -1
Index: 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
arch/unicore32/kernel/init_task.c deleted +0 -44

44 lines not on this page · raw message

#38 lore raw

PATCH 25/29 um: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

Cc Richard Weinberger <[email protected]>
---
 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(-)
arch/um/Kconfig.common +1 -0
Index: 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
arch/um/kernel/Makefile +1 -1
Index: 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/
arch/um/kernel/init_task.c deleted +0 -38
Index: tip/arch/um/kernel/init_task.c
===================================================================
@@ -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) };
arch/um/kernel/um_arch.c +5 -0
Index: 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 */
#41 lore raw

PATCH 27/29 x86: Use generic init_task

In reply to Thomas Gleixner

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.

---
 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(-)
arch/x86/Kconfig +1 -0
Index: 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)
arch/x86/Makefile +0 -1
Index: 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/
 
arch/x86/kernel/Makefile +1 -1
Index: 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)
 
arch/x86/kernel/init_task.c deleted +0 -42

42 lines not on this page · raw message

arch/x86/kernel/process.c +9 -0
Index: 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);
#43 lore raw

PATCH 29/29 init_task: Remove CONFIG_HAVE_GENERIC_INIT_TASK

In reply to Thomas Gleixner

Now that all archs are converted, remove the config and compile kernel/sched/init_task.c unconditionally.

---
 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 -
 kernel/sched/Makefile   |    3 +--
 29 files changed, 1 insertion(+), 32 deletions(-)
arch/Kconfig +0 -3
Index: tip/arch/Kconfig
===================================================================
@@ -148,9 +148,6 @@ 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
arch/alpha/Kconfig +0 -1
Index: 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,
arch/arm/Kconfig +0 -1
Index: 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
arch/avr32/Kconfig +0 -1
Index: 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
arch/blackfin/Kconfig +0 -1
Index: 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
arch/c6x/Kconfig +0 -1
Index: 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
arch/cris/Kconfig +0 -1
Index: 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
arch/frv/Kconfig +0 -1
Index: tip/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
arch/h8300/Kconfig +0 -1
Index: 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
arch/hexagon/Kconfig +0 -1
Index: 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
arch/ia64/Kconfig +0 -1
Index: tip/arch/ia64/Kconfig
===================================================================
@@ -34,7 +34,6 @@ config IA64
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
-	select HAVE_GENERIC_INIT_TASK
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
arch/m32r/Kconfig +0 -1
Index: 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
arch/m68k/Kconfig +0 -1
Index: 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
arch/microblaze/Kconfig +0 -1
Index: 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
arch/mips/Kconfig +0 -1
Index: 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"
 
arch/mn10300/Kconfig +0 -1
Index: 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
arch/openrisc/Kconfig +0 -1
Index: 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
arch/parisc/Kconfig +0 -1
Index: 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
arch/powerpc/Kconfig +0 -1
Index: 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
arch/s390/Kconfig +0 -1
Index: 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
arch/score/Kconfig +0 -1
Index: 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"
arch/sh/Kconfig +0 -1
Index: 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
arch/sparc/Kconfig +0 -1
Index: 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
arch/tile/Kconfig +0 -1
Index: 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
arch/um/Kconfig.common +0 -1
Index: 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
arch/unicore32/Kconfig +0 -1
Index: 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
arch/x86/Kconfig +0 -1
Index: 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)
arch/xtensa/Kconfig +0 -1
Index: 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
kernel/sched/Makefile +1 -2
Index: tip/kernel/sched/Makefile
===================================================================
@@ -11,9 +11,8 @@ ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER
 CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
 endif
 
-obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o
+obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o init_task.o
 obj-$(CONFIG_SMP) += cpupri.o
 obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
 obj-$(CONFIG_SCHEDSTATS) += stats.o
 obj-$(CONFIG_SCHED_DEBUG) += debug.o
-obj-$(CONFIG_HAVE_GENERIC_INIT_TASK) += init_task.o
#42 lore raw

PATCH 28/29 xtensa: Use generic init_task

In reply to Thomas Gleixner

Same code. Use the generic version.

---
 arch/xtensa/Kconfig            |    1 +
 arch/xtensa/kernel/Makefile    |    2 +-
 arch/xtensa/kernel/init_task.c |   31 -------------------------------
 3 files changed, 2 insertions(+), 32 deletions(-)
arch/xtensa/Kconfig +1 -0
Index: 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
arch/xtensa/kernel/Makefile +1 -1
Index: 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
arch/xtensa/kernel/init_task.c deleted +0 -31
Index: tip/arch/xtensa/kernel/init_task.c
===================================================================
@@ -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 <[email protected]>
- */
-
-#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);
#25 lore raw

Re: [patch 21/29] score: Use generic init_task

In reply to Thomas Gleixner
Quoted 26 lines · Thomas Gleixner

Same code. Use the generic version.

---
  arch/score/Kconfig         |    1 +
  arch/score/kernel/Makefile |    2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)

Index: tip/arch/score/Kconfig
===================================================================

arch/score/Kconfig +1 -0
@@ -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
===================================================================

arch/score/kernel/Makefile line 9

Quoted 7 lines
arch/score/kernel/Makefile +1 -1
@@ -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

Almost patches delete arch specific init-task. But this patch doesn't. Is this really intentional?

#32 lore raw

Re: [patch 23/29] sparc: Use generic init_task

In reply to Thomas Gleixner

arch/sparc/kernel/init_task.c

Quoted 25 lines · Thomas Gleixner

Same code. Use the generic version.

Cc "David S. Miller" <[email protected]>
---
 arch/sparc/Kconfig            |    1 +
 arch/sparc/kernel/init_task.c |   22 ----------------------
 2 files changed, 1 insertion(+), 22 deletions(-)

Index: tip/arch/sparc/Kconfig
===================================================================

arch/sparc/Kconfig +1 -0
@@ -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/kernel/init_task.c
===================================================================

arch/sparc/kernel/init_task.c deleted +0 -0

This breaks sparc build as it has the following in arch/sparc/Makefile:

    head-y                 += arch/sparc/kernel/init_task.o

And this patch deletes that file.
So at least you need to delete said line in this patch too.

Sam

#44 lore raw
In reply to Thomas Gleixner
Quoted 9 lines · Thomas Gleixner

All architectures do roughly the same to initialize init_task. The only architecture which deviates is ia64, but I could not figure out why it couldn't use the same setup as all other architectures.

The following series converts all archs to a generic version.

Thanks,

tglx

Quoted 14 lines
---
 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/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/kernel/sched/Makefile           |    4 --
 tip/kernel/sched/init_task.c        |   24 ++++++++++++

Diffstat looks funny. Some tip stuff sneaked in.
Also I am missing patch 1..

Sam

#26 lore raw

Re: [patch 21/29] score: Use generic init_task

In reply to KOSAKI Motohiro
Quoted 30 lines · KOSAKI Motohiro
Quoted 29 lines · Thomas Gleixner

Same code. Use the generic version.

---
  arch/score/Kconfig         |    1 +
  arch/score/kernel/Makefile |    2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)

Index: tip/arch/score/Kconfig
===================================================================

arch/score/Kconfig +1 -0
@@ -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
===================================================================

arch/score/kernel/Makefile +0 -0
@@ -4,7 +4,7 @@
 
  extra-y	:= head.o vmlinux.lds
 
Quoted 7 lines

arch/score/kernel/Makefile line 9

Quoted 4 lines
arch/score/kernel/Makefile +1 -1
-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

Almost patches delete arch specific init-task. But this patch doesn't. Is this really intentional?

Not really. I missed it :( Will fix.

Thanks,

tglx

#33 lore raw

Re: [patch 23/29] sparc: Use generic init_task

In reply to Sam Ravnborg
Quoted 29 lines · Sam Ravnborg

arch/sparc/kernel/init_task.c

Quoted 25 lines · Thomas Gleixner

Same code. Use the generic version.

Cc "David S. Miller" <[email protected]>
---
 arch/sparc/Kconfig            |    1 +
 arch/sparc/kernel/init_task.c |   22 ----------------------
 2 files changed, 1 insertion(+), 22 deletions(-)

Index: tip/arch/sparc/Kconfig
===================================================================

arch/sparc/Kconfig +1 -0
@@ -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/kernel/init_task.c
===================================================================

arch/sparc/kernel/init_task.c deleted +0 -0

This breaks sparc build as it has the following in arch/sparc/Makefile:

Quoted 1 line
    head-y                 += arch/sparc/kernel/init_task.o

Hrmm, I thought I had catched all of this nonsense.

#45 lore raw
In reply to Sam Ravnborg
Quoted 25 lines · Sam Ravnborg
Quoted 9 lines · Thomas Gleixner

All architectures do roughly the same to initialize init_task. The only architecture which deviates is ia64, but I could not figure out why it couldn't use the same setup as all other architectures.

The following series converts all archs to a generic version.

Thanks,

tglx

Quoted 14 lines
---
 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/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/kernel/sched/Makefile           |    4 --
 tip/kernel/sched/init_task.c        |   24 ++++++++++++
Quoted 1 line

Diffstat looks funny. Some tip stuff sneaked in.

Nah. That's diffstat madness. It does not add the prefix to the deleted files, but for the modified ones it keeps it.

Quoted 1 line

Also I am missing patch 1..

I've got all of them sent back by vger ...

Thanks,

tglx

#27 lore raw

Re: [patch 21/29] score: Use generic init_task

In reply to Thomas Gleixner
Quoted 5 lines · Thomas Gleixner
Quoted 2 lines · KOSAKI Motohiro

Almost patches delete arch specific init-task. But this patch doesn't. Is this really intentional?

Not really. I missed it :( Will fix.

Here is the updated one.

Thanks,

tglx

-------------->

Subject: score: Use generic init_task
From: Thomas Gleixner <[email protected]>
Date: Mon, 30 Apr 2012 16:46:03 +0200

Same code. Use the generic version.

---
 arch/score/Kconfig            |    1 
 arch/score/kernel/Makefile    |    2 -
 arch/score/kernel/init_task.c |   46 ------------------------------------------
 3 files changed, 2 insertions(+), 47 deletions(-)
arch/score/Kconfig +1 -0
Index: 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"
arch/score/kernel/Makefile +1 -1
Index: 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
 
arch/score/kernel/init_task.c deleted +0 -46

46 lines not on this page · raw message

#34 lore raw

Re: [patch 23/29] sparc: Use generic init_task

In reply to Thomas Gleixner
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · Sam Ravnborg

This breaks sparc build as it has the following in arch/sparc/Makefile:

    head-y                 += arch/sparc/kernel/init_task.o

Hrmm, I thought I had catched all of this nonsense.

Updated version below.

Thanks,

tglx

-------------------->
Subject: sparc: Use generic init_task
From: Thomas Gleixner <[email protected]>
Date: Mon, 30 Apr 2012 16:48:55 +0200

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.

Cc "David S. Miller" <[email protected]>
---
 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(-)
arch/sparc/Kconfig +1 -0
Index: 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
arch/sparc/Makefile +0 -1
Index: 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/
arch/sparc/kernel/Makefile +0 -1
Index: 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)
arch/sparc/kernel/init_task.c deleted +0 -22
Index: tip/arch/sparc/kernel/init_task.c
===================================================================
@@ -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) };
Acked-by
#35 lore raw

Re: [patch 23/29] sparc: Use generic init_task

Quoted 19 lines · Thomas Gleixner
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · Sam Ravnborg

This breaks sparc build as it has the following in arch/sparc/Makefile:

    head-y                 += arch/sparc/kernel/init_task.o

Hrmm, I thought I had catched all of this nonsense.

Updated version below.

Thanks,

tglx

-------------------->
Subject: sparc: Use generic init_task
From: Thomas Gleixner <[email protected]>
Date: Mon, 30 Apr 2012 16:48:55 +0200

Quoted 6 lines

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.

Cc "David S. Miller" <[email protected]>
Acked-by on v1 19/29
#22 lore raw

Re: [patch 19/29] powerpc: Use generic init_task

In reply to Thomas Gleixner
Quoted 4 lines · Thomas Gleixner

plain text document attachment (powerpc-use-generic-init-task.patch) Same code. Use the generic version.

Quoted 66 lines
---
 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
===================================================================

arch/powerpc/Kconfig +1 -0
@@ -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
===================================================================

arch/powerpc/kernel/Makefile +1 -1
@@ -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
===================================================================

arch/powerpc/kernel/init_task.c deleted +0 -29
@@ -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);
Acked-by on v1 22/29
#30 lore raw

Re: [patch 22/29] sh: Use generic init_task

In reply to Thomas Gleixner
Quoted 6 lines · Thomas Gleixner

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.

maintainer Acked-by
#36 lore raw

Re: [patch 23/29] sparc: Use generic init_task

In reply to Sam Ravnborg

From: Sam Ravnborg <[email protected]>
Date: Mon, 30 Apr 2012 23:10:54 +0200

Quoted 20 lines · Thomas Gleixner
Quoted 19 lines · Thomas Gleixner
Quoted 6 lines · Sam Ravnborg
Quoted 3 lines

This breaks sparc build as it has the following in arch/sparc/Makefile:

    head-y                 += arch/sparc/kernel/init_task.o

Hrmm, I thought I had catched all of this nonsense.

Updated version below.

Thanks,

tglx

-------------------->
Subject: sparc: Use generic init_task
From: Thomas Gleixner <[email protected]>
Date: Mon, 30 Apr 2012 16:48:55 +0200

Quoted 7 lines
Quoted 6 lines

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.

Cc "David S. Miller" <[email protected]>
#28 lore raw

Re: [patch 21/29] score: Use generic init_task

In reply to Thomas Gleixner
Quoted 10 lines · Thomas Gleixner
Quoted 5 lines · Thomas Gleixner
Quoted 2 lines · KOSAKI Motohiro

Almost patches delete arch specific init-task. But this patch doesn't. Is this really intentional?

Not really. I missed it :( Will fix.

Here is the updated one.

Thanks,

Seems good. (but obviously I'm not score expert, don't believe me).

Thanks.

#47 lore raw
Quoted 7 lines · Sam Ravnborg
Quoted 4 lines
Quoted 2 lines

Also I am missing patch 1..

I've got all of them sent back by vger ...

No sign of it yet?!?!?

Too many cc's?

Same here, patch 1 never arrived nor could I find it on three different archives.
Could you please resend that one?

Acked-by on v1 7/29
#8 lore raw

Re: [patch 07/29] cris: Use generic init_task

In reply to Thomas Gleixner
Quoted 3 lines · Thomas Gleixner

Same code. Use the generic version.

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

Index: tip/arch/cris/Kconfig
===================================================================

arch/cris/Kconfig +1 -0
@@ -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
===================================================================

arch/cris/kernel/process.c +0 -21
@@ -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.
- *

arch/cris/kernel/process.c line 34

Quoted 10 lines
arch/cris/kernel/process.c +0 -7
- * 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

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#12 lore raw

Re: [patch 10/29] hexagon: Use generic idle_task

In reply to Thomas Gleixner
Quoted 100 lines · Thomas Gleixner

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.

---
 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
===================================================================

arch/hexagon/Kconfig +1 -0
@@ -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
===================================================================

arch/hexagon/Makefile +1 -2
@@ -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
===================================================================

arch/hexagon/kernel/Makefile +1 -1
@@ -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
===================================================================

arch/hexagon/kernel/init_task.c deleted +0 -44
@@ -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))) = {

arch/hexagon/kernel/init_task.c line 54

Quoted 10 lines
arch/hexagon/kernel/init_task.c deleted +0 -10
-			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);
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Acked-by on v1 5/29
#5 lore raw

Re: [patch 05/29] blackfin: Use generic init_task

In reply to Thomas Gleixner
Quoted 3 lines · On Monday 30 April 2012 16:15:54 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.

thanks !

-mike