From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Srivatsa S. Bhat" Subject: [PATCH 25/27] s390, smpboot: Use generic SMP booting infrastructure Date: Fri, 01 Jun 2012 14:46:09 +0530 Message-ID: <20120601091604.31979.71351.stgit@srivatsabhat.in.ibm.com> References: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> Sender: linux-kernel-owner@vger.kernel.org To: peterz@infradead.org, paulmck@linux.vnet.ibm.com Cc: rusty@rustcorp.com.au, mingo@kernel.org, yong.zhang0@gmail.com, akpm@linux-foundation.org, vatsa@linux.vnet.ibm.com, rjw@sisk.pl, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, srivatsa.bhat@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, Martin Schwidefsky , Heiko Carstens , "supporter:S390" , Michael Holzheu , Thomas Gleixner , Jan Glauber , linux-s390@vger.kernel.org List-Id: linux-arch.vger.kernel.org Convert s390 to use the generic framework to boot secondary CPUs. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux390@de.ibm.com (supporter:S390) Cc: Michael Holzheu Cc: Thomas Gleixner Cc: Jan Glauber Cc: linux-s390@vger.kernel.org Signed-off-by: Srivatsa S. Bhat --- arch/s390/kernel/smp.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 14c8a08..3eb12e6 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -702,6 +703,11 @@ static void __init smp_detect_cpus(void) */ static void __cpuinit smp_start_secondary(void *cpuvoid) { + smpboot_start_secondary(cpuvoid); +} + +void __cpuinit __cpu_pre_starting(void *unused) +{ S390_lowcore.last_update_clock = get_clock(); S390_lowcore.restart_stack = (unsigned long) restart_stack; S390_lowcore.restart_fn = (unsigned long) do_restart; @@ -711,15 +717,9 @@ static void __cpuinit smp_start_secondary(void *cpuvoid) __ctl_load(S390_lowcore.cregs_save_area, 0, 15); __load_psw_mask(psw_kernel_bits | PSW_MASK_DAT); cpu_init(); - preempt_disable(); init_cpu_timer(); init_cpu_vtimer(); pfault_init(); - notify_cpu_starting(smp_processor_id()); - set_cpu_online(smp_processor_id(), true); - local_irq_enable(); - /* cpu_idle will call schedule for us */ - cpu_idle(); } /* Upping and downing of CPUs */ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp01.in.ibm.com ([122.248.162.1]:38033 "EHLO e28smtp01.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758749Ab2FAJRC (ORCPT ); Fri, 1 Jun 2012 05:17:02 -0400 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 1 Jun 2012 14:47:00 +0530 From: "Srivatsa S. Bhat" Subject: [PATCH 25/27] s390, smpboot: Use generic SMP booting infrastructure Date: Fri, 01 Jun 2012 14:46:09 +0530 Message-ID: <20120601091604.31979.71351.stgit@srivatsabhat.in.ibm.com> In-Reply-To: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> References: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: tglx@linutronix.de, peterz@infradead.org, paulmck@linux.vnet.ibm.com Cc: rusty@rustcorp.com.au, mingo@kernel.org, yong.zhang0@gmail.com, akpm@linux-foundation.org, vatsa@linux.vnet.ibm.com, rjw@sisk.pl, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, srivatsa.bhat@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, Martin Schwidefsky , Heiko Carstens , "supporter:S390" , Michael Holzheu , Jan Glauber , linux-s390@vger.kernel.org Message-ID: <20120601091609.x-SNeC7_TliBYfFwm67fGfLXY0y29bNJv4ky7kP4leA@z> Convert s390 to use the generic framework to boot secondary CPUs. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux390@de.ibm.com (supporter:S390) Cc: Michael Holzheu Cc: Thomas Gleixner Cc: Jan Glauber Cc: linux-s390@vger.kernel.org Signed-off-by: Srivatsa S. Bhat --- arch/s390/kernel/smp.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 14c8a08..3eb12e6 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -702,6 +703,11 @@ static void __init smp_detect_cpus(void) */ static void __cpuinit smp_start_secondary(void *cpuvoid) { + smpboot_start_secondary(cpuvoid); +} + +void __cpuinit __cpu_pre_starting(void *unused) +{ S390_lowcore.last_update_clock = get_clock(); S390_lowcore.restart_stack = (unsigned long) restart_stack; S390_lowcore.restart_fn = (unsigned long) do_restart; @@ -711,15 +717,9 @@ static void __cpuinit smp_start_secondary(void *cpuvoid) __ctl_load(S390_lowcore.cregs_save_area, 0, 15); __load_psw_mask(psw_kernel_bits | PSW_MASK_DAT); cpu_init(); - preempt_disable(); init_cpu_timer(); init_cpu_vtimer(); pfault_init(); - notify_cpu_starting(smp_processor_id()); - set_cpu_online(smp_processor_id(), true); - local_irq_enable(); - /* cpu_idle will call schedule for us */ - cpu_idle(); } /* Upping and downing of CPUs */