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 9015060919a0..15cab3ee44e8 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 1f77227669e8..992b7b93a574 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 */
@@ -721,26 +720,9 @@ static void __cpuinit smp_start_secondary(void *cpuvoid)
721 cpu_idle(); 720 cpu_idle();
722} 721}
723 722
724struct create_idle {
725 struct work_struct work;
726 struct task_struct *idle;
727 struct completion done;
728 int cpu;
729};
730
731static void __cpuinit smp_fork_idle(struct work_struct *work)
732{
733 struct create_idle *c_idle;
734
735 c_idle = container_of(work, struct create_idle, work);
736 c_idle->idle = fork_idle(c_idle->cpu);
737 complete(&c_idle->done);
738}
739
740/* Upping and downing of CPUs */ 723/* Upping and downing of CPUs */
741int __cpuinit __cpu_up(unsigned int cpu) 724int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
742{ 725{
743 struct create_idle c_idle;
744 struct pcpu *pcpu; 726 struct pcpu *pcpu;
745 int rc; 727 int rc;
746 728
@@ -750,22 +732,12 @@ int __cpuinit __cpu_up(unsigned int cpu)
750 if (pcpu_sigp_retry(pcpu, sigp_initial_cpu_reset, 0) != 732 if (pcpu_sigp_retry(pcpu, sigp_initial_cpu_reset, 0) !=
751 sigp_order_code_accepted) 733 sigp_order_code_accepted)
752 return -EIO; 734 return -EIO;
753 if (!pcpu->idle) { 735
754 c_idle.done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done);
755 INIT_WORK_ONSTACK(&c_idle.work, smp_fork_idle);
756 c_idle.cpu = cpu;
757 schedule_work(&c_idle.work);
758 wait_for_completion(&c_idle.done);
759 if (IS_ERR(c_idle.idle))
760 return PTR_ERR(c_idle.idle);
761 pcpu->idle = c_idle.idle;
762 }
763 init_idle(pcpu->idle, cpu);
764 rc = pcpu_alloc_lowcore(pcpu, cpu); 736 rc = pcpu_alloc_lowcore(pcpu, cpu);
765 if (rc) 737 if (rc)
766 return rc; 738 return rc;
767 pcpu_prepare_secondary(pcpu, cpu); 739 pcpu_prepare_secondary(pcpu, cpu);
768 pcpu_attach_task(pcpu, pcpu->idle); 740 pcpu_attach_task(pcpu, tidle);
769 pcpu_start_fn(pcpu, smp_start_secondary, NULL); 741 pcpu_start_fn(pcpu, smp_start_secondary, NULL);
770 while (!cpu_online(cpu)) 742 while (!cpu_online(cpu))
771 cpu_relax(); 743 cpu_relax();
@@ -852,7 +824,6 @@ void __init smp_prepare_boot_cpu(void)
852 struct pcpu *pcpu = pcpu_devices; 824 struct pcpu *pcpu = pcpu_devices;
853 825
854 boot_cpu_address = stap(); 826 boot_cpu_address = stap();
855 pcpu->idle = current;
856 pcpu->state = CPU_STATE_CONFIGURED; 827 pcpu->state = CPU_STATE_CONFIGURED;
857 pcpu->address = boot_cpu_address; 828 pcpu->address = boot_cpu_address;
858 pcpu->lowcore = (struct _lowcore *)(unsigned long) store_prefix(); 829 pcpu->lowcore = (struct _lowcore *)(unsigned long) store_prefix();