From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754036AbdK3RrA (ORCPT ); Thu, 30 Nov 2017 12:47:00 -0500 Received: from smtprelay.synopsys.com ([198.182.47.9]:43494 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492AbdK3Rq5 (ORCPT ); Thu, 30 Nov 2017 12:46:57 -0500 Subject: Re: [PATCH] ARC: Enable machine_desc->init_per_cpu for non-SMP configs To: Alexey Brodkin , CC: , Vineet Gupta Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc References: <20171129082145.23327-1-abrodkin@synopsys.com> From: Vineet Gupta Message-ID: Date: Thu, 30 Nov 2017 09:46:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171129082145.23327-1-abrodkin@synopsys.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.62] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/2017 12:21 AM, Alexey Brodkin wrote: > As of today we assumed that "machine_desc->init_per_cpu" calls > are only usable on SMP systems when we want to run some piece of > code on early boot for each and every core, I guess assumption was > we have "machine_desc->init_early" for single-core cases where > the one and only master core can do all the things. > > But it turned out for platforms which might be both UP and SMP it > might be benificial to use "init_per_cpu" for both UP and SMP cases > with which we achieve 2 things simultaneously: > 1) Exactly the same one code will be used for UP&SMP for > things required to be done on each an every core regardless if it's > a master and the only core in UP system or any other slave core in SMP > setup. > 1) There will be no "ifdef CONFIG_SMP" around "init_per_cpu". > Seems fine to me. However this needs to go with the actual platform change which needs it. -Vineet