[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5 12/21] xen/arm: move is_vcpu_running function to sched.h
- To: vijay.kilari@xxxxxxxxx, Ian.Campbell@xxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, stefano.stabellini@xxxxxxxxxx, tim@xxxxxxx, xen-devel@xxxxxxxxxxxxx
- From: Julien Grall <julien.grall@xxxxxxxxxx>
- Date: Sun, 15 Jun 2014 17:26:41 +0100
- Cc: Keir Fraser <keir@xxxxxxx>, Prasun Kapoor <Prasun.Kapoor@xxxxxxxxxxxxxxxxxx>, Vijaya Kumar K <vijaya.kumar@xxxxxxxxxxxxxxxxxx>, "xen.org" <ian.jackson@xxxxxxxxxxxxx>, george.dunlap@xxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Sun, 15 Jun 2014 16:26:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
Hi Vijay,
On 12/06/14 14:36, vijay.kilari@xxxxxxxxx wrote:
From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
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 <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
---
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|