Skip to contentSkip to conversation

eliminate cpus_xyz()

PATCH In review Jan Beulich 1 participant 1 message Nov 7, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 eliminate cpus_xyz()

xen/arch/ia64/linux-xen/iosapic.c +1 -1
@@ -709,7 +709,7 @@ get_target_cpu (unsigned int gsi, int ve
 				cpu_clear(numa_cpu, cpu_mask);
 		}
 
-		num_cpus = cpus_weight(cpu_mask);
+		num_cpus = cpumask_weight(&cpu_mask);
 
 		if (!num_cpus)
 			goto skip_numa_setup;
xen/arch/ia64/linux-xen/smp.c +2 -2
@@ -62,7 +62,7 @@ void smp_send_event_check_mask(const cpu
     int cpu;
 
     /*  Not for me.  */
-    if (cpus_subset(*mask, *cpumask_of(smp_processor_id())))
+    if (cpumask_subset(mask, cpumask_of(smp_processor_id())))
         return;
 
     //printf("smp_send_event_check_mask called\n");
@@ -444,7 +444,7 @@ on_selected_cpus(const cpumask_t *select
                  void *info, int wait)
 {
 	struct call_data_struct data;
-	unsigned int cpu, nr_cpus = cpus_weight(*selected);
+	unsigned int cpu, nr_cpus = cpumask_weight(selected);
 
 	ASSERT(local_irq_is_enabled());
 
xen/arch/ia64/xen/mm.c +1 -1
@@ -3196,7 +3196,7 @@ int get_page_type(struct page_info *page
                 cpumask_copy(&mask, page_get_owner(page)->domain_dirty_cpumask);
                 tlbflush_filter(mask, page->tlbflush_timestamp);
 
-                if ( unlikely(!cpus_empty(mask)) )
+                if ( unlikely(!cpumask_empty(&mask)) )
                 {
                     perfc_incr(need_flush_tlb_flush);
                     flush_tlb_mask(&mask);
xen/arch/ia64/xen/vhpt.c +1 -1
@@ -556,7 +556,7 @@ void flush_tlb_mask(const cpumask_t *mas
     if (cpu_isset(cpu, *mask))
         flush_tlb_vhpt_all (NULL);
 
-    if (cpus_subset(*mask, *cpumask_of(cpu)))
+    if (cpumask_subset(mask, cpumask_of(cpu)))
         return;
 
     for_each_cpu_mask (cpu, *mask)
xen/arch/x86/cpu/mcheck/mce_intel.c +1 -1
@@ -863,7 +863,7 @@ static void intel_machine_check(struct c
          */
         if (atomic_read(&found_error) == 0)
             mc_panic("MCE: No CPU found valid MCE, need reset\n");
-        if (!cpus_empty(mce_fatal_cpus))
+        if (!cpumask_empty(&mce_fatal_cpus))
         {
             char *ebufp, ebuf[96] = "MCE: Fatal error happened on CPUs ";
             ebufp = ebuf + strlen(ebuf);
xen/arch/x86/domain.c +3 -2
@@ -1611,8 +1611,9 @@ void context_switch(struct vcpu *prev, s
 
     cpumask_copy(&dirty_mask, next->vcpu_dirty_cpumask);
     /* Allow at most one CPU at a time to be dirty. */
-    ASSERT(cpus_weight(dirty_mask) <= 1);
-    if ( unlikely(!cpu_isset(cpu, dirty_mask) && !cpus_empty(dirty_mask)) )
+    ASSERT(cpumask_weight(&dirty_mask) <= 1);
+    if ( unlikely(!cpumask_test_cpu(cpu, &dirty_mask) &&
+                  !cpumask_empty(&dirty_mask)) )
     {
         /* Other cpus call __sync_local_execstate from flush ipi handler. */
         flush_tlb_mask(&dirty_mask);
xen/arch/x86/genapic/delivery.c +1 -1
@@ -38,7 +38,7 @@ const cpumask_t *vector_allocation_cpuma
 
 unsigned int cpu_mask_to_apicid_flat(const cpumask_t *cpumask)
 {
-	return cpus_addr(*cpumask)[0]&0xFF;
+	return cpumask_bits(cpumask)[0]&0xFF;
 }
 
 /*
xen/arch/x86/irq.c +1 -1
@@ -711,7 +711,7 @@ unsigned int set_desc_affinity(struct ir
     unsigned long flags;
     cpumask_t dest_mask;
 
-    if (!cpus_intersects(*mask, cpu_online_map))
+    if (!cpumask_intersects(mask, &cpu_online_map))
         return BAD_APICID;
 
     irq = desc->irq;
xen/arch/x86/mm.c +1 -1
@@ -2436,7 +2436,7 @@ static int __get_page_type(struct page_i
                 /* Don't flush if the timestamp is old enough */
                 tlbflush_filter(mask, page->tlbflush_timestamp);
 
-                if ( unlikely(!cpus_empty(mask)) &&
+                if ( unlikely(!cpumask_empty(&mask)) &&
                      /* Shadow mode: track only writable pages. */
                      (!shadow_mode_enabled(page_get_owner(page)) ||
                       ((nx & PGT_type_mask) == PGT_writable_page)) )
xen/arch/x86/mm/shadow/common.c +1 -1
@@ -1524,7 +1524,7 @@ mfn_t shadow_alloc(struct domain *d,  
          * we need to be sure that no TLB holds a pointer to it. */
         cpumask_copy(&mask, d->domain_dirty_cpumask);
         tlbflush_filter(mask, sp->tlbflush_timestamp);
-        if ( unlikely(!cpus_empty(mask)) )
+        if ( unlikely(!cpumask_empty(&mask)) )
         {
             perfc_incr(shadow_alloc_tlbflush);
             flush_tlb_mask(&mask);
xen/arch/x86/smp.c +3 -3
@@ -140,11 +140,11 @@ void send_IPI_self_x2apic(int vector)
 
 void send_IPI_mask_flat(const cpumask_t *cpumask, int vector)
 {
-    unsigned long mask = cpus_addr(*cpumask)[0];
+    unsigned long mask = cpumask_bits(cpumask)[0];
     unsigned long cfg;
     unsigned long flags;
 
-    mask &= cpus_addr(cpu_online_map)[0];
+    mask &= cpumask_bits(&cpu_online_map)[0];
     mask &= ~(1UL << smp_processor_id());
     if ( mask == 0 )
         return;
@@ -237,7 +237,7 @@ void flush_area_mask(const cpumask_t *ma
     if ( cpu_isset(smp_processor_id(), *mask) )
         flush_area_local(va, flags);
 
-    if ( !cpus_subset(*mask, *cpumask_of(smp_processor_id())) )
+    if ( !cpumask_subset(mask, cpumask_of(smp_processor_id())) )
     {
         spin_lock(&flush_lock);
         cpumask_and(&flush_cpumask, mask, &cpu_online_map);
xen/common/domain.c +1 -1
@@ -371,7 +371,7 @@ void domain_update_node_affinity(struct 
         cpumask_or(&cpumask, &cpumask, v->cpu_affinity);
 
     for_each_online_node ( node )
-        if ( cpus_intersects(node_to_cpumask(node), cpumask) )
+        if ( cpumask_intersects(&node_to_cpumask(node), &cpumask) )
             node_set(node, nodemask);
 
     d->node_affinity = nodemask;
xen/common/perfc.c +2 -2
@@ -163,11 +163,11 @@ static int perfc_copy_info(XEN_GUEST_HAN
     unsigned int i, j, v;
 
     /* We only copy the name and array-size information once. */
-    if ( !cpus_equal(cpu_online_map, perfc_cpumap) )
+    if ( !cpumask_equal(&cpu_online_map, &perfc_cpumap) )
     {
         unsigned int nr_cpus;
         perfc_cpumap = cpu_online_map;
-        nr_cpus = cpus_weight(perfc_cpumap);
+        nr_cpus = cpumask_weight(&perfc_cpumap);
 
         perfc_nbr_vals = 0;
 
xen/common/rcupdate.c +1 -1
@@ -121,7 +121,7 @@ static int rcu_barrier_action(void *_cpu
      */
     call_rcu(&data.head, rcu_barrier_callback);
 
-    while ( atomic_read(data.cpu_count) != cpus_weight(cpu_online_map) )
+    while ( atomic_read(data.cpu_count) != num_online_cpus() )
     {
         process_pending_softirqs();
         cpu_relax();
xen/common/sched_credit.c +1 -1
@@ -1246,7 +1246,7 @@ csched_load_balance(struct csched_privat
     cpumask_clear_cpu(cpu, &workers);
     peer_cpu = cpu;
 
-    while ( !cpus_empty(workers) )
+    while ( !cpumask_empty(&workers) )
     {
         peer_cpu = cpumask_cycle(peer_cpu, &workers);
         cpumask_clear_cpu(peer_cpu, &workers);
xen/common/sched_credit2.c +10 -10
@@ -1009,7 +1009,7 @@ choose_cpu(const struct scheduler *ops, 
     struct csched_vcpu *svc = CSCHED_VCPU(vc);
     s_time_t min_avgload;
 
-    BUG_ON(cpus_empty(prv->active_queues));
+    BUG_ON(cpumask_empty(&prv->active_queues));
 
     /* Locking:
      * - vc->processor is already locked
@@ -1098,7 +1098,7 @@ choose_cpu(const struct scheduler *ops, 
         new_cpu = vc->processor;
     else
     {
-        BUG_ON(cpus_empty(prv->rqd[min_rqi].active));
+        BUG_ON(cpumask_empty(&prv->rqd[min_rqi].active));
         new_cpu = first_cpu(prv->rqd[min_rqi].active);
     }
 
@@ -1258,9 +1258,9 @@ retry:
         if ( st.orqd->b_avgload > load_max )
             load_max = st.orqd->b_avgload;
 
-        cpus_max=cpus_weight(st.lrqd->active);
-        if ( cpus_weight(st.orqd->active) > cpus_max )
-            cpus_max = cpus_weight(st.orqd->active);
+        cpus_max = cpumask_weight(&st.lrqd->active);
+        if ( cpumask_weight(&st.orqd->active) > cpus_max )
+            cpus_max = cpumask_weight(&st.orqd->active);
 
         /* If we're under 100% capacaty, only shift if load difference
          * is > 1.  otherwise, shift if under 12.5% */
@@ -1801,7 +1801,7 @@ csched_dump(const struct scheduler *ops)
 
     printk("Active queues: %d\n"
            "\tdefault-weight     = %d\n",
-           cpus_weight(prv->active_queues),
+           cpumask_weight(&prv->active_queues),
            CSCHED_DEFAULT_WEIGHT);
     for_each_cpu_mask(i, prv->active_queues)
     {
@@ -1815,7 +1815,7 @@ csched_dump(const struct scheduler *ops)
                "\tinstload           = %d\n"
                "\taveload            = %3"PRI_stime"\n",
                i,
-               cpus_weight(prv->rqd[i].active),
+               cpumask_weight(&prv->rqd[i].active),
                prv->rqd[i].max_weight,
                prv->rqd[i].load,
                fraction);
@@ -1852,7 +1852,7 @@ static void activate_runqueue(struct csc
 
     rqd = prv->rqd + rqi;
 
-    BUG_ON(!cpus_empty(rqd->active));
+    BUG_ON(!cpumask_empty(&rqd->active));
 
     rqd->max_weight = 1;
     rqd->id = rqi;
@@ -1869,7 +1869,7 @@ static void deactivate_runqueue(struct c
 
     rqd = prv->rqd + rqi;
 
-    BUG_ON(!cpus_empty(rqd->active));
+    BUG_ON(!cpumask_empty(&rqd->active));
     
     rqd->id = -1;
 
@@ -1980,7 +1980,7 @@ csched_free_pdata(const struct scheduler
     cpu_clear(cpu, rqd->idle);
     cpu_clear(cpu, rqd->active);
 
-    if ( cpus_empty(rqd->active) )
+    if ( cpumask_empty(&rqd->active) )
     {
         printk(" No cpus left on runqueue, disabling\n");
         deactivate_runqueue(prv, rqi);
xen/common/schedule.c +1 -1
@@ -550,7 +550,7 @@ int cpu_disable_scheduler(unsigned int c
             vcpu_schedule_lock_irq(v);
 
             cpumask_and(&online_affinity, v->cpu_affinity, c->cpu_valid);
-            if ( cpus_empty(online_affinity) &&
+            if ( cpumask_empty(&online_affinity) &&
                  cpumask_test_cpu(cpu, v->cpu_affinity) )
             {
                 printk("Breaking vcpu affinity for domain %d vcpu %d\n",
xen/include/asm-ia64/linux-xen/asm/acpi.h +1 -1
@@ -147,7 +147,7 @@ static inline void per_cpu_scan_finalize
 	int cpu;
 	int next_nid = 0;
 
-	low_cpu = cpus_weight(early_cpu_possible_map);
+	low_cpu = cpumask_weight(&early_cpu_possible_map);
 
 	high_cpu = max(low_cpu, min_cpus);
 	high_cpu = min(high_cpu + reserve_cpus, NR_CPUS);
xen/include/asm-ia64/linux/topology.h +1 -1
@@ -42,7 +42,7 @@
 	({									\
 		cpumask_t __tmp__;						\
 		__tmp__ = node_to_cpumask(node);				\
-		cpus_weight(__tmp__);						\
+		cpumask_weight(&__tmp__);					\
 	})
 #endif
 
xen/include/xen/cpumask.h +25 -42

113 lines not on this page · raw message

eliminate cpus_xyz()

xen/arch/ia64/linux-xen/iosapic.c +1 -1
@@ -709,7 +709,7 @@ get_target_cpu (unsigned int gsi, int ve
 				cpu_clear(numa_cpu, cpu_mask);
 		}
 
-		num_cpus = cpus_weight(cpu_mask);
+		num_cpus = cpumask_weight(&cpu_mask);
 
 		if (!num_cpus)
 			goto skip_numa_setup;
xen/arch/ia64/linux-xen/smp.c +2 -2
@@ -62,7 +62,7 @@ void smp_send_event_check_mask(const cpu
     int cpu;
 
     /*  Not for me.  */
-    if (cpus_subset(*mask, *cpumask_of(smp_processor_id())))
+    if (cpumask_subset(mask, cpumask_of(smp_processor_id())))
         return;
 
     //printf("smp_send_event_check_mask called\n");
@@ -444,7 +444,7 @@ on_selected_cpus(const cpumask_t *select
                  void *info, int wait)
 {
 	struct call_data_struct data;
-	unsigned int cpu, nr_cpus = cpus_weight(*selected);
+	unsigned int cpu, nr_cpus = cpumask_weight(selected);
 
 	ASSERT(local_irq_is_enabled());
 
xen/arch/ia64/xen/mm.c +1 -1
@@ -3196,7 +3196,7 @@ int get_page_type(struct page_info *page
                 cpumask_copy(&mask, page_get_owner(page)->domain_dirty_cpumask);
                 tlbflush_filter(mask, page->tlbflush_timestamp);
 
-                if ( unlikely(!cpus_empty(mask)) )
+                if ( unlikely(!cpumask_empty(&mask)) )
                 {
                     perfc_incr(need_flush_tlb_flush);
                     flush_tlb_mask(&mask);
xen/arch/ia64/xen/vhpt.c +1 -1
@@ -556,7 +556,7 @@ void flush_tlb_mask(const cpumask_t *mas
     if (cpu_isset(cpu, *mask))
         flush_tlb_vhpt_all (NULL);
 
-    if (cpus_subset(*mask, *cpumask_of(cpu)))
+    if (cpumask_subset(mask, cpumask_of(cpu)))
         return;
 
     for_each_cpu_mask (cpu, *mask)
xen/arch/x86/cpu/mcheck/mce_intel.c +1 -1
@@ -863,7 +863,7 @@ static void intel_machine_check(struct c
          */
         if (atomic_read(&found_error) == 0)
             mc_panic("MCE: No CPU found valid MCE, need reset\n");
-        if (!cpus_empty(mce_fatal_cpus))
+        if (!cpumask_empty(&mce_fatal_cpus))
         {
             char *ebufp, ebuf[96] = "MCE: Fatal error happened on CPUs ";
             ebufp = ebuf + strlen(ebuf);
xen/arch/x86/domain.c +3 -2
@@ -1611,8 +1611,9 @@ void context_switch(struct vcpu *prev, s
 
     cpumask_copy(&dirty_mask, next->vcpu_dirty_cpumask);
     /* Allow at most one CPU at a time to be dirty. */
-    ASSERT(cpus_weight(dirty_mask) <= 1);
-    if ( unlikely(!cpu_isset(cpu, dirty_mask) && !cpus_empty(dirty_mask)) )
+    ASSERT(cpumask_weight(&dirty_mask) <= 1);
+    if ( unlikely(!cpumask_test_cpu(cpu, &dirty_mask) &&
+                  !cpumask_empty(&dirty_mask)) )
     {
         /* Other cpus call __sync_local_execstate from flush ipi handler. */
         flush_tlb_mask(&dirty_mask);
xen/arch/x86/genapic/delivery.c +1 -1
@@ -38,7 +38,7 @@ const cpumask_t *vector_allocation_cpuma
 
 unsigned int cpu_mask_to_apicid_flat(const cpumask_t *cpumask)
 {
-	return cpus_addr(*cpumask)[0]&0xFF;
+	return cpumask_bits(cpumask)[0]&0xFF;
 }
 
 /*
xen/arch/x86/irq.c +1 -1
@@ -711,7 +711,7 @@ unsigned int set_desc_affinity(struct ir
     unsigned long flags;
     cpumask_t dest_mask;
 
-    if (!cpus_intersects(*mask, cpu_online_map))
+    if (!cpumask_intersects(mask, &cpu_online_map))
         return BAD_APICID;
 
     irq = desc->irq;
xen/arch/x86/mm.c +1 -1
@@ -2436,7 +2436,7 @@ static int __get_page_type(struct page_i
                 /* Don't flush if the timestamp is old enough */
                 tlbflush_filter(mask, page->tlbflush_timestamp);
 
-                if ( unlikely(!cpus_empty(mask)) &&
+                if ( unlikely(!cpumask_empty(&mask)) &&
                      /* Shadow mode: track only writable pages. */
                      (!shadow_mode_enabled(page_get_owner(page)) ||
                       ((nx & PGT_type_mask) == PGT_writable_page)) )
xen/arch/x86/mm/shadow/common.c +1 -1
@@ -1524,7 +1524,7 @@ mfn_t shadow_alloc(struct domain *d,  
          * we need to be sure that no TLB holds a pointer to it. */
         cpumask_copy(&mask, d->domain_dirty_cpumask);
         tlbflush_filter(mask, sp->tlbflush_timestamp);
-        if ( unlikely(!cpus_empty(mask)) )
+        if ( unlikely(!cpumask_empty(&mask)) )
         {
             perfc_incr(shadow_alloc_tlbflush);
             flush_tlb_mask(&mask);
xen/arch/x86/smp.c +3 -3
@@ -140,11 +140,11 @@ void send_IPI_self_x2apic(int vector)
 
 void send_IPI_mask_flat(const cpumask_t *cpumask, int vector)
 {
-    unsigned long mask = cpus_addr(*cpumask)[0];
+    unsigned long mask = cpumask_bits(cpumask)[0];
     unsigned long cfg;
     unsigned long flags;
 
-    mask &= cpus_addr(cpu_online_map)[0];
+    mask &= cpumask_bits(&cpu_online_map)[0];
     mask &= ~(1UL << smp_processor_id());
     if ( mask == 0 )
         return;
@@ -237,7 +237,7 @@ void flush_area_mask(const cpumask_t *ma
     if ( cpu_isset(smp_processor_id(), *mask) )
         flush_area_local(va, flags);
 
-    if ( !cpus_subset(*mask, *cpumask_of(smp_processor_id())) )
+    if ( !cpumask_subset(mask, cpumask_of(smp_processor_id())) )
     {
         spin_lock(&flush_lock);
         cpumask_and(&flush_cpumask, mask, &cpu_online_map);
xen/common/domain.c +1 -1
@@ -371,7 +371,7 @@ void domain_update_node_affinity(struct 
         cpumask_or(&cpumask, &cpumask, v->cpu_affinity);
 
     for_each_online_node ( node )
-        if ( cpus_intersects(node_to_cpumask(node), cpumask) )
+        if ( cpumask_intersects(&node_to_cpumask(node), &cpumask) )
             node_set(node, nodemask);
 
     d->node_affinity = nodemask;
xen/common/perfc.c +2 -2
@@ -163,11 +163,11 @@ static int perfc_copy_info(XEN_GUEST_HAN
     unsigned int i, j, v;
 
     /* We only copy the name and array-size information once. */
-    if ( !cpus_equal(cpu_online_map, perfc_cpumap) )
+    if ( !cpumask_equal(&cpu_online_map, &perfc_cpumap) )
     {
         unsigned int nr_cpus;
         perfc_cpumap = cpu_online_map;
-        nr_cpus = cpus_weight(perfc_cpumap);
+        nr_cpus = cpumask_weight(&perfc_cpumap);
 
         perfc_nbr_vals = 0;
 
xen/common/rcupdate.c +1 -1
@@ -121,7 +121,7 @@ static int rcu_barrier_action(void *_cpu
      */
     call_rcu(&data.head, rcu_barrier_callback);
 
-    while ( atomic_read(data.cpu_count) != cpus_weight(cpu_online_map) )
+    while ( atomic_read(data.cpu_count) != num_online_cpus() )
     {
         process_pending_softirqs();
         cpu_relax();
xen/common/sched_credit.c +1 -1
@@ -1246,7 +1246,7 @@ csched_load_balance(struct csched_privat
     cpumask_clear_cpu(cpu, &workers);
     peer_cpu = cpu;
 
-    while ( !cpus_empty(workers) )
+    while ( !cpumask_empty(&workers) )
     {
         peer_cpu = cpumask_cycle(peer_cpu, &workers);
         cpumask_clear_cpu(peer_cpu, &workers);
xen/common/sched_credit2.c +10 -10
@@ -1009,7 +1009,7 @@ choose_cpu(const struct scheduler *ops, 
     struct csched_vcpu *svc = CSCHED_VCPU(vc);
     s_time_t min_avgload;
 
-    BUG_ON(cpus_empty(prv->active_queues));
+    BUG_ON(cpumask_empty(&prv->active_queues));
 
     /* Locking:
      * - vc->processor is already locked
@@ -1098,7 +1098,7 @@ choose_cpu(const struct scheduler *ops, 
         new_cpu = vc->processor;
     else
     {
-        BUG_ON(cpus_empty(prv->rqd[min_rqi].active));
+        BUG_ON(cpumask_empty(&prv->rqd[min_rqi].active));
         new_cpu = first_cpu(prv->rqd[min_rqi].active);
     }
 
@@ -1258,9 +1258,9 @@ retry:
         if ( st.orqd->b_avgload > load_max )
             load_max = st.orqd->b_avgload;
 
-        cpus_max=cpus_weight(st.lrqd->active);
-        if ( cpus_weight(st.orqd->active) > cpus_max )
-            cpus_max = cpus_weight(st.orqd->active);
+        cpus_max = cpumask_weight(&st.lrqd->active);
+        if ( cpumask_weight(&st.orqd->active) > cpus_max )
+            cpus_max = cpumask_weight(&st.orqd->active);
 
         /* If we're under 100% capacaty, only shift if load difference
          * is > 1.  otherwise, shift if under 12.5% */
@@ -1801,7 +1801,7 @@ csched_dump(const struct scheduler *ops)
 
     printk("Active queues: %d\n"
            "\tdefault-weight     = %d\n",
-           cpus_weight(prv->active_queues),
+           cpumask_weight(&prv->active_queues),
            CSCHED_DEFAULT_WEIGHT);
     for_each_cpu_mask(i, prv->active_queues)
     {
@@ -1815,7 +1815,7 @@ csched_dump(const struct scheduler *ops)
                "\tinstload           = %d\n"
                "\taveload            = %3"PRI_stime"\n",
                i,
-               cpus_weight(prv->rqd[i].active),
+               cpumask_weight(&prv->rqd[i].active),
                prv->rqd[i].max_weight,
                prv->rqd[i].load,
                fraction);
@@ -1852,7 +1852,7 @@ static void activate_runqueue(struct csc
 
     rqd = prv->rqd + rqi;
 
-    BUG_ON(!cpus_empty(rqd->active));
+    BUG_ON(!cpumask_empty(&rqd->active));
 
     rqd->max_weight = 1;
     rqd->id = rqi;
@@ -1869,7 +1869,7 @@ static void deactivate_runqueue(struct c
 
     rqd = prv->rqd + rqi;
 
-    BUG_ON(!cpus_empty(rqd->active));
+    BUG_ON(!cpumask_empty(&rqd->active));
     
     rqd->id = -1;
 
@@ -1980,7 +1980,7 @@ csched_free_pdata(const struct scheduler
     cpu_clear(cpu, rqd->idle);
     cpu_clear(cpu, rqd->active);
 
-    if ( cpus_empty(rqd->active) )
+    if ( cpumask_empty(&rqd->active) )
     {
         printk(" No cpus left on runqueue, disabling\n");
         deactivate_runqueue(prv, rqi);
xen/common/schedule.c +1 -1
@@ -550,7 +550,7 @@ int cpu_disable_scheduler(unsigned int c
             vcpu_schedule_lock_irq(v);
 
             cpumask_and(&online_affinity, v->cpu_affinity, c->cpu_valid);
-            if ( cpus_empty(online_affinity) &&
+            if ( cpumask_empty(&online_affinity) &&
                  cpumask_test_cpu(cpu, v->cpu_affinity) )
             {
                 printk("Breaking vcpu affinity for domain %d vcpu %d\n",
xen/include/asm-ia64/linux-xen/asm/acpi.h +1 -1
@@ -147,7 +147,7 @@ static inline void per_cpu_scan_finalize
 	int cpu;
 	int next_nid = 0;
 
-	low_cpu = cpus_weight(early_cpu_possible_map);
+	low_cpu = cpumask_weight(&early_cpu_possible_map);
 
 	high_cpu = max(low_cpu, min_cpus);
 	high_cpu = min(high_cpu + reserve_cpus, NR_CPUS);
xen/include/asm-ia64/linux/topology.h +1 -1
@@ -42,7 +42,7 @@
 	({									\
 		cpumask_t __tmp__;						\
 		__tmp__ = node_to_cpumask(node);				\
-		cpus_weight(__tmp__);						\
+		cpumask_weight(&__tmp__);					\
 	})
 #endif
 
xen/include/xen/cpumask.h +25 -42

113 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel