[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5/5] xen: clean up VPF flags macros
Per-VCPU pause flags in sched.h are defined as bit positions and as values derived from the bit defines. There is only one user of a value which can be easily converted to use a bit number as well. Remove the value definitions and do the conversion for the only user. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- xen/common/domctl.c | 2 +- xen/include/xen/sched.h | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 9e0fef5..e44bc4c 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -172,7 +172,7 @@ void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info) info->max_vcpu_id = v->vcpu_id; if ( !test_bit(_VPF_down, &v->pause_flags) ) { - if ( !(v->pause_flags & VPF_blocked) ) + if ( !test_bit(_VPF_blocked, &v->pause_flags) ) flags &= ~XEN_DOMINF_blocked; if ( v->is_running ) flags |= XEN_DOMINF_running; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index b5190b5..bc7d5cb 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -745,32 +745,24 @@ static inline struct domain *next_domain_in_cpupool( (_v) = (_v)->next_in_list ) /* - * Per-VCPU pause flags. + * Per-VCPU pause flags (bit positions). */ /* Domain is blocked waiting for an event. */ #define _VPF_blocked 0 -#define VPF_blocked (1UL<<_VPF_blocked) /* VCPU is offline. */ #define _VPF_down 1 -#define VPF_down (1UL<<_VPF_down) /* VCPU is blocked awaiting an event to be consumed by Xen. */ #define _VPF_blocked_in_xen 2 -#define VPF_blocked_in_xen (1UL<<_VPF_blocked_in_xen) /* VCPU affinity has changed: migrating to a new CPU. */ #define _VPF_migrating 3 -#define VPF_migrating (1UL<<_VPF_migrating) /* VCPU is blocked due to missing mem_paging ring. */ #define _VPF_mem_paging 4 -#define VPF_mem_paging (1UL<<_VPF_mem_paging) /* VCPU is blocked due to missing mem_access ring. */ #define _VPF_mem_access 5 -#define VPF_mem_access (1UL<<_VPF_mem_access) /* VCPU is blocked due to missing mem_sharing ring. */ #define _VPF_mem_sharing 6 -#define VPF_mem_sharing (1UL<<_VPF_mem_sharing) /* VCPU is being reset. */ #define _VPF_in_reset 7 -#define VPF_in_reset (1UL<<_VPF_in_reset) static inline int vcpu_runnable(struct vcpu *v) { -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |