From 4551775df58d42e2dcfd2a8ac4bcc713709e8b81 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 5 Apr 2011 13:00:54 +0100 Subject: Remove direct cpumask_t members from struct vcpu and struct domain The CPU masks embedded in these structures prevent NR_CPUS-independent sizing of these structures. Basic concept (in xen/include/cpumask.h) taken from recent Linux. For scalability purposes, many other uses of cpumask_t should be replaced by cpumask_var_t, particularly local variables of functions. This implies that no functions should have by-value cpumask_t parameters, and that the whole old cpumask interface (cpus_...()) should go away in favor of the new (cpumask_...()) one. Signed-off-by: Jan Beulich --- xen/include/xen/sched.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xen/include/xen/sched.h') diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index c86759596f..17fac57dfd 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -161,12 +161,12 @@ struct vcpu spinlock_t virq_lock; /* Bitmask of CPUs on which this VCPU may run. */ - cpumask_t cpu_affinity; + cpumask_var_t cpu_affinity; /* Used to change affinity temporarily. */ - cpumask_t cpu_affinity_tmp; + cpumask_var_t cpu_affinity_tmp; /* Bitmask of CPUs which are holding onto this VCPU's state. */ - cpumask_t vcpu_dirty_cpumask; + cpumask_var_t vcpu_dirty_cpumask; /* Tasklet for continue_hypercall_on_cpu(). */ struct tasklet continue_hypercall_tasklet; @@ -289,7 +289,7 @@ struct domain struct vcpu **vcpu; /* Bitmask of CPUs which are holding onto this domain's state. */ - cpumask_t domain_dirty_cpumask; + cpumask_var_t domain_dirty_cpumask; struct arch_domain arch; @@ -641,7 +641,7 @@ void watchdog_domain_destroy(struct domain *d); #define is_hvm_domain(d) ((d)->is_hvm) #define is_hvm_vcpu(v) (is_hvm_domain(v->domain)) #define is_pinned_vcpu(v) ((v)->domain->is_pinned || \ - cpus_weight((v)->cpu_affinity) == 1) + cpumask_weight((v)->cpu_affinity) == 1) #define need_iommu(d) ((d)->need_iommu) void set_vcpu_migration_delay(unsigned int delay); -- cgit v1.2.3