aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/Makefile1
-rw-r--r--arch/s390/include/asm/smp.h2
-rw-r--r--arch/s390/kernel/Makefile2
-rw-r--r--arch/s390/kernel/init_task.c38
-rw-r--r--arch/s390/kernel/smp.c35
6 files changed, 6 insertions, 73 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index b42f2866594b..e16390c0bca8 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -122,6 +122,7 @@ config S390
122 select ARCH_INLINE_WRITE_UNLOCK_BH 122 select ARCH_INLINE_WRITE_UNLOCK_BH
123 select ARCH_INLINE_WRITE_UNLOCK_IRQ 123 select ARCH_INLINE_WRITE_UNLOCK_IRQ
124 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE 124 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
125 select GENERIC_SMP_IDLE_THREAD
125 126
126config SCHED_OMIT_FRAME_POINTER 127config SCHED_OMIT_FRAME_POINTER
127 def_bool y 128 def_bool y
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 0ad2f1e1ce9e..49e76e8b477d 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -91,7 +91,6 @@ OBJCOPYFLAGS := -O binary
91 91
92head-y := arch/s390/kernel/head.o 92head-y := arch/s390/kernel/head.o
93head-y += arch/s390/kernel/$(if $(CONFIG_64BIT),head64.o,head31.o) 93head-y += arch/s390/kernel/$(if $(CONFIG_64BIT),head64.o,head31.o)
94head-y += arch/s390/kernel/init_task.o
95 94
96# See arch/s390/Kbuild for content of core part of the kernel 95# See arch/s390/Kbuild for content of core part of the kernel
97core-y += arch/s390/ 96core-y += arch/s390/
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index c77c6de6f6c0..0b6f586c1383 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -16,7 +16,7 @@
16extern struct mutex smp_cpu_state_mutex; 16extern struct mutex smp_cpu_state_mutex;
17extern struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; 17extern struct save_area *zfcpdump_save_areas[NR_CPUS + 1];
18 18
19extern int __cpu_up(unsigned int cpu); 19extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
20 20
21extern void arch_send_call_function_single_ipi(int cpu); 21extern void arch_send_call_function_single_ipi(int cpu);
22extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 22extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index 884b18afc864..9733b3f0eb6d 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -28,7 +28,7 @@ obj-y := bitmap.o traps.o time.o process.o base.o early.o setup.o vtime.o \
28obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o) 28obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
29obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o) 29obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
30 30
31extra-y += head.o init_task.o vmlinux.lds 31extra-y += head.o vmlinux.lds
32extra-y += $(if $(CONFIG_64BIT),head64.o,head31.o) 32extra-y += $(if $(CONFIG_64BIT),head64.o,head31.o)
33 33
34obj-$(CONFIG_MODULES) += s390_ksyms.o module.o 34obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
deleted file mode 100644
index 4d1c9fb0b540..000000000000
--- a/arch/s390/kernel/init_task.c
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * arch/s390/kernel/init_task.c
3 *
4 * S390 version
5 *
6 * Derived from "arch/i386/kernel/init_task.c"
7 */
8
9#include <linux/mm.h>
10#include <linux/fs.h>
11#include <linux/module.h>
12#include <linux/sched.h>
13#include <linux/init_task.h>
14#include <linux/mqueue.h>
15
16#include <asm/uaccess.h>
17#include <asm/pgtable.h>
18
19static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
20static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
21/*
22 * Initial thread structure.
23 *
24 * We need to make sure that this is THREAD_SIZE aligned due to the
25 * way process stacks are handled. This is done by having a special
26 * "init_task" linker map entry..
27 */
28union thread_union init_thread_union __init_task_data =
29 { INIT_THREAD_INFO(init_task) };
30
31/*
32 * Initial task structure.
33 *
34 * All other task structs will be allocated on slabs in fork.c
35 */
36struct task_struct init_task = INIT_TASK(init_task);
37
38EXPORT_SYMBOL(init_task);
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index e505458c6899..647ba9425893 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -85,7 +85,6 @@ enum {
85 85
86struct pcpu { 86struct pcpu {
87 struct cpu cpu; 87 struct cpu cpu;
88 struct task_struct *idle; /* idle process for the cpu */
89 struct _lowcore *lowcore; /* lowcore page(s) for the cpu */ 88 struct _lowcore *lowcore; /* lowcore page(s) for the cpu */
90 unsigned long async_stack; /* async stack for the cpu */ 89 unsigned long async_stack; /* async stack for the cpu */
91 unsigned long panic_stack; /* panic stack for the cpu */ 90 unsigned long panic_stack; /* panic stack for the cpu */
@@ -725,26 +724,9 @@ static void __cpuinit smp_start_secondary(void *cpuvoid)
725 cpu_idle(); 724 cpu_idle();
726} 725}
727 726
728struct create_idle {
729 struct work_struct work;
730 struct task_struct *idle;
731 struct completion done;
732 int cpu;
733};
734
735static void __cpuinit smp_fork_idle(struct work_struct *work)
736{
737 struct create_idle *c_idle;
738
739 c_idle = container_of(work, struct create_idle, work);
740 c_idle->idle = fork_idle(c_idle->cpu);
741 complete(&c_idle->done);
742}
743
744/* Upping and downing of CPUs */ 727/* Upping and downing of CPUs */
745int __cpuinit __cpu_up(unsigned int cpu) 728int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
746{ 729{
747 struct create_idle c_idle;
748 struct pcpu *pcpu; 730 struct pcpu *pcpu;
749 int rc; 731 int rc;
750 732
@@ -754,22 +736,12 @@ int __cpuinit __cpu_up(unsigned int cpu)
754 if (pcpu_sigp_retry(pcpu, sigp_initial_cpu_reset, 0) != 736 if (pcpu_sigp_retry(pcpu, sigp_initial_cpu_reset, 0) !=
755 sigp_order_code_accepted) 737 sigp_order_code_accepted)
756 return -EIO; 738 return -EIO;
757 if (!pcpu->idle) { 739
758 c_idle.done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done);
759 INIT_WORK_ONSTACK(&c_idle.work, smp_fork_idle);
760 c_idle.cpu = cpu;
761 schedule_work(&c_idle.work);
762 wait_for_completion(&c_idle.done);
763 if (IS_ERR(c_idle.idle))
764 return PTR_ERR(c_idle.idle);
765 pcpu->idle = c_idle.idle;
766 }
767 init_idle(pcpu->idle, cpu);
768 rc = pcpu_alloc_lowcore(pcpu, cpu); 740 rc = pcpu_alloc_lowcore(pcpu, cpu);
769 if (rc) 741 if (rc)
770 return rc; 742 return rc;
771 pcpu_prepare_secondary(pcpu, cpu); 743 pcpu_prepare_secondary(pcpu, cpu);
772 pcpu_attach_task(pcpu, pcpu->idle); 744 pcpu_attach_task(pcpu, tidle);
773 pcpu_start_fn(pcpu, smp_start_secondary, NULL); 745 pcpu_start_fn(pcpu, smp_start_secondary, NULL);
774 while (!cpu_online(cpu)) 746 while (!cpu_online(cpu))
775 cpu_relax(); 747 cpu_relax();
@@ -856,7 +828,6 @@ void __init smp_prepare_boot_cpu(void)
856 struct pcpu *pcpu = pcpu_devices; 828 struct pcpu *pcpu = pcpu_devices;
857 829
858 boot_cpu_address = stap(); 830 boot_cpu_address = stap();
859 pcpu->idle = current;
860 pcpu->state = CPU_STATE_CONFIGURED; 831 pcpu->state = CPU_STATE_CONFIGURED;
861 pcpu->address = boot_cpu_address; 832 pcpu->address = boot_cpu_address;
862 pcpu->lowcore = (struct _lowcore *)(unsigned long) store_prefix(); 833 pcpu->lowcore = (struct _lowcore *)(unsigned long) store_prefix();