From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752249AbbKQLRd (ORCPT ); Tue, 17 Nov 2015 06:17:33 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:37086 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103AbbKQLRc (ORCPT ); Tue, 17 Nov 2015 06:17:32 -0500 Subject: Re: [PATCH v2 08/19] ARC: Mark secondary cpu online only after all HW setup is done To: Noam Camus , References: <1446297327-16298-1-git-send-email-noamc@ezchip.com> <1446893557-29748-9-git-send-email-noamc@ezchip.com> CC: , , , Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc From: Vineet Gupta Message-ID: <564B0CBB.8060206@synopsys.com> Date: Tue, 17 Nov 2015 16:47:15 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446893557-29748-9-git-send-email-noamc@ezchip.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.12.197.182] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 07 November 2015 04:22 PM, Noam Camus wrote: > From: Noam Camus > > In SMP setup, master loops for each_present_cpu calling cpu_up(). > For ARC it returns as soon as new cpu's status becomes online, > However secondary may still do HW initializing, > machine or platform hook level. > > So turn secondary online only after all HW setup is done. > Signed-off-by: Noam Camus Acked-by: Vineet Gupta > --- > arch/arc/kernel/smp.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c > index 0b061a4..bc0e4f6 100644 > --- a/arch/arc/kernel/smp.c > +++ b/arch/arc/kernel/smp.c > @@ -126,11 +126,6 @@ void start_kernel_secondary(void) > current->active_mm = mm; > cpumask_set_cpu(cpu, mm_cpumask(mm)); > > - notify_cpu_starting(cpu); > - set_cpu_online(cpu, true); > - > - pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); > - > /* Some SMP H/w setup - for each cpu */ > if (plat_smp_ops.init_per_cpu) > plat_smp_ops.init_per_cpu(cpu); > @@ -138,6 +133,11 @@ void start_kernel_secondary(void) > if (machine_desc->init_cpu_smp) > machine_desc->init_cpu_smp(cpu); > > + notify_cpu_starting(cpu); > + set_cpu_online(cpu, true); > + > + pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu); > + > arc_local_timer_setup(); > > local_irq_enable(); >