From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 12/21] xen/arm: move is_vcpu_running function to sched.h Date: Sun, 15 Jun 2014 17:26:41 +0100 Message-ID: <539DC941.8010702@linaro.org> References: <1402580192-13937-1-git-send-email-vijay.kilari@gmail.com> <1402580192-13937-13-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1402580192-13937-13-git-send-email-vijay.kilari@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: vijay.kilari@gmail.com, Ian.Campbell@citrix.com, Stefano Stabellini , stefano.stabellini@citrix.com, tim@xen.org, xen-devel@lists.xen.org Cc: Keir Fraser , Prasun Kapoor , Vijaya Kumar K , "xen.org" , george.dunlap@citrix.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org Hi Vijay, On 12/06/14 14:36, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K > > is_vcpu_running function in vgic driver is generic. So move > this to sched.h As said on v4 please add the relevant maintainers. You can use scripts/get_maintainers.pl for this purpose. I've again cced them. Also, I've asked to justify why this function should go to the common code. Can you explain it? Regards, > Signed-off-by: Vijaya Kumar K > --- > xen/arch/arm/vgic.c | 16 ---------------- > xen/include/xen/sched.h | 16 ++++++++++++++++ > 2 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > index e5b698e..10faceb 100644 > --- a/xen/arch/arm/vgic.c > +++ b/xen/arch/arm/vgic.c > @@ -397,22 +397,6 @@ static void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) > } > } > > -static inline int is_vcpu_running(struct domain *d, int vcpuid) > -{ > - struct vcpu *v; > - > - if ( vcpuid >= d->max_vcpus ) > - return 0; > - > - v = d->vcpu[vcpuid]; > - if ( v == NULL ) > - return 0; > - if (test_bit(_VPF_down, &v->pause_flags) ) > - return 0; > - > - return 1; > -} > - > static int vgic_to_sgi(struct vcpu *v, register_t sgir) > { > struct domain *d = v->domain; > diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h > index 44851ae..03416b5 100644 > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -826,6 +826,22 @@ void watchdog_domain_destroy(struct domain *d); > #define need_iommu(d) (0) > #endif > > +static inline int is_vcpu_running(struct domain *d, int vcpuid) > +{ > + struct vcpu *v; > + > + if ( vcpuid >= d->max_vcpus ) > + return 0; > + > + v = d->vcpu[vcpuid]; > + if ( v == NULL ) > + return 0; > + if (test_bit(_VPF_down, &v->pause_flags) ) > + return 0; > + > + return 1; > +} > + > void set_vcpu_migration_delay(unsigned int delay); > unsigned int get_vcpu_migration_delay(void); > > -- Julien Grall