From: Ian Campbell Subject: Re: [RFC for-4.5 4/5] xen/arm: Remove processor specific setup in vcpu_initialise Date: Mon, 24 Feb 2014 09:58:35 +0000 Message-ID: <1393235915.16570.15.camel@kazak.uk.xensource.com> References: <1392149085-14366-1-git-send-email-julien.grall@linaro.org> <1392149085-14366-5-git-send-email-julien.grall@linaro.org> <1392812318.29739.31.camel@kazak.uk.xensource.com> <53065AD3.7090106@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHsJ6-0001Q5-BN for xen-devel@lists.xenproject.org; Mon, 24 Feb 2014 09:58:40 +0000 In-Reply-To: <53065AD3.7090106@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: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-02-20 at 19:43 +0000, Julien Grall wrote: > On 02/19/2014 12:18 PM, Ian Campbell wrote: > > >> + * > >> + * Julien Grall > >> + * Copyright (c) 2014 Linaro Limited. > >> + * > >> + * This program is free software; you can redistribute it and/or modify > >> + * it under the terms of the GNU General Public License as published by > >> + * the Free Software Foundation; either version 2 of the License, or > >> + * (at your option) any later version. > >> + * > >> + * This program is distributed in the hope that it will be useful, > >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of > >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > >> + * GNU General Public License for more details. > >> + */ > >> +#include > >> +#include > >> + > >> +static void armv7_vcpu_initialize(struct vcpu *v) > >> +{ > >> + if ( v->domain->max_vcpus > 1 ) > >> + v->arch.actlr |= ACTLR_V7_SMP; > >> + else > >> + v->arch.actlr &= ~ACTLR_V7_SMP; > >> +} > >> + > >> +const struct processor armv7_processor = { > > > > __rodata? (or whatever it is called) > > I forgot to answer to this part. The compiler will put it by default in > rodata. Did you want to say __initconst? If so, we can't because I use a > pointer to this structure in arch/arm/processor.c I meant __initconst yes. Leaving it in rodata is fine. __init indeed doesn't make sense now you make me think of it. > If we want to save space, we can copy it in another variable in > processor_setup. No need IMHO (at least not yet, maybe if we end up with dozens of these...). Thanks. Ian.