From: Ian Campbell Subject: Re: [PATCH] xen/arm: Initial Broadcom A15 platform support Date: Tue, 12 Nov 2013 13:48:23 +0000 Message-ID: <1384264103.1883.57.camel@kazak.uk.xensource.com> References: <1383953844-31566-1-git-send-email-jfraser@broadcom.com> <52813FF2.2000804@linaro.org> <1384250223.1883.36.camel@kazak.uk.xensource.com> <5282248B.2080707@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5282248B.2080707@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Jon Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2013-11-12 at 12:52 +0000, Julien Grall wrote: > > On 11/12/2013 09:57 AM, Ian Campbell wrote: > > On Mon, 2013-11-11 at 20:37 +0000, Julien Grall wrote: > >>> + > >>> + for (cpu = 1; cpu < 4; cpu++) { > >>> + rc = brcm_cpu_power_on(va, cpu); > >>> + if (rc) > >>> + break; > >>> + } > >> > >> I don't like the for loop on the cores. In the future, it's possible > >> that Xen decides to only use 2 cores, so you will power unused core. > >> What about enabling power in brcm_cpu_up, if it's not too late? > > > > Not only in the future, we have command line options for these sorts of > > things already, which I think the ARM port obeys. > > Are you talking about "max_cpus" parameter? Yes. > If so, it's not yet > implemented on ARM. We rely on the number of cpus node in the device tree. I guess I should have checked... In any case you are right that hardcoding 4 here is not correct and it would be better to do it in one of the provided per-cpu callbacks. Ian.