[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] eliminate cpu_clear()



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1320744912 -3600
# Node ID 52d242adc94edea36049fa93f668222f93d8518f
# Parent  1f3056be6c8399b6b20157d40a45ecb02a35bfcc
eliminate cpu_clear()

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---


diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/ia64/linux-xen/acpi.c
--- a/xen/arch/ia64/linux-xen/acpi.c    Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/ia64/linux-xen/acpi.c    Tue Nov 08 10:35:12 2011 +0100
@@ -976,7 +976,7 @@
 int acpi_unmap_lsapic(int cpu)
 {
        ia64_cpu_to_sapicid[cpu] = -1;
-       cpu_clear(cpu, cpu_present_map);
+       cpumask_clear_cpu(cpu, &cpu_present_map);
 
 #ifdef CONFIG_ACPI_NUMA
        /* NUMA specific cleanup's */
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/ia64/linux-xen/iosapic.c
--- a/xen/arch/ia64/linux-xen/iosapic.c Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/ia64/linux-xen/iosapic.c Tue Nov 08 10:35:12 2011 +0100
@@ -706,7 +706,7 @@
 
                for_each_cpu_mask(numa_cpu, cpu_mask) {
                        if (!cpu_online(numa_cpu))
-                               cpu_clear(numa_cpu, cpu_mask);
+                               cpumask_clear_cpu(numa_cpu, &cpu_mask);
                }
 
                num_cpus = cpumask_weight(&cpu_mask);
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/ia64/linux-xen/smp.c
--- a/xen/arch/ia64/linux-xen/smp.c     Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/ia64/linux-xen/smp.c     Tue Nov 08 10:35:12 2011 +0100
@@ -134,7 +134,7 @@
        /*
         * Remove this CPU:
         */
-       cpu_clear(smp_processor_id(), cpu_online_map);
+       cpumask_clear_cpu(smp_processor_id(), &cpu_online_map);
        max_xtp();
        local_irq_disable();
        cpu_halt();
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/ia64/linux-xen/smpboot.c
--- a/xen/arch/ia64/linux-xen/smpboot.c Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/ia64/linux-xen/smpboot.c Tue Nov 08 10:35:12 2011 +0100
@@ -557,7 +557,7 @@
        if (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
                printk(KERN_ERR "Processor 0x%x/0x%x is stuck.\n", cpu, 
sapicid);
                ia64_cpu_to_sapicid[cpu] = -1;
-               cpu_clear(cpu, cpu_online_map);  /* was set in smp_callin() */
+               cpumask_clear_cpu(cpu, &cpu_online_map);  /* was set in 
smp_callin() */
                return -EINVAL;
        }
        return 0;
@@ -727,12 +727,12 @@
        int cpu = smp_processor_id();
 
        remove_siblinginfo(cpu);
-       cpu_clear(cpu, cpu_online_map);
+       cpumask_clear_cpu(cpu, &cpu_online_map);
 #ifndef XEN
        fixup_irqs();
 #endif
        local_flush_tlb_all();
-       cpu_clear(cpu, cpu_callin_map);
+       cpumask_clear_cpu(cpu, &cpu_callin_map);
 }
 #else /* !CONFIG_HOTPLUG_CPU */
 void __cpu_disable(void)
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/x86/cpu/common.c
--- a/xen/arch/x86/cpu/common.c Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/x86/cpu/common.c Tue Nov 08 10:35:12 2011 +0100
@@ -668,5 +668,5 @@
 
 void cpu_uninit(unsigned int cpu)
 {
-       cpu_clear(cpu, cpu_initialized);
+       cpumask_clear_cpu(cpu, &cpu_initialized);
 }
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/x86/mpparse.c
--- a/xen/arch/x86/mpparse.c    Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/x86/mpparse.c    Tue Nov 08 10:35:12 2011 +0100
@@ -802,7 +802,7 @@
        physid_clear(apic_id, phys_cpu_present_map);
 
        x86_cpu_to_apicid[cpu] = BAD_APICID;
-       cpu_clear(cpu, cpu_present_map);
+       cpumask_clear_cpu(cpu, &cpu_present_map);
 }
 
 #ifdef CONFIG_X86_IO_APIC
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c        Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/x86/smp.c        Tue Nov 08 10:35:12 2011 +0100
@@ -226,7 +226,7 @@
     if ( !__sync_local_execstate() ||
          (flush_flags & (FLUSH_TLB_GLOBAL | FLUSH_CACHE)) )
         flush_area_local(flush_va, flush_flags);
-    cpu_clear(smp_processor_id(), flush_cpumask);
+    cpumask_clear_cpu(smp_processor_id(), &flush_cpumask);
     irq_exit();
 }
 
@@ -353,7 +353,7 @@
 static void stop_this_cpu(void *dummy)
 {
     __stop_this_cpu();
-    cpu_clear(smp_processor_id(), cpu_online_map);
+    cpumask_clear_cpu(smp_processor_id(), &cpu_online_map);
     for ( ; ; )
         halt();
 }
diff -r 1f3056be6c83 -r 52d242adc94e xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/arch/x86/smpboot.c    Tue Nov 08 10:35:12 2011 +0100
@@ -151,7 +151,7 @@
     }
 
     atomic_set(&tsc_count, 0);
-    cpu_clear(slave, tsc_sync_cpu_mask);
+    cpumask_clear_cpu(slave, &tsc_sync_cpu_mask);
 }
 
 static void synchronize_tsc_slave(unsigned int slave)
diff -r 1f3056be6c83 -r 52d242adc94e xen/common/cpupool.c
--- a/xen/common/cpupool.c      Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/common/cpupool.c      Tue Nov 08 10:35:12 2011 +0100
@@ -232,7 +232,7 @@
         return ret;
     }
 
-    cpu_clear(cpu, cpupool_free_cpus);
+    cpumask_clear_cpu(cpu, &cpupool_free_cpus);
     if (cpupool_moving_cpu == cpu)
     {
         cpupool_moving_cpu = -1;
@@ -259,7 +259,7 @@
         ret = schedule_cpu_switch(cpu, NULL);
         if ( ret )
         {
-            cpu_clear(cpu, cpupool_free_cpus);
+            cpumask_clear_cpu(cpu, &cpupool_free_cpus);
             goto out;
         }
         per_cpu(cpupool, cpu) = NULL;
diff -r 1f3056be6c83 -r 52d242adc94e xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c        Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/common/sched_credit2.c        Tue Nov 08 10:35:12 2011 +0100
@@ -1638,7 +1638,7 @@
 
     /* Clear "tickled" bit now that we've been scheduled */
     if ( cpumask_test_cpu(cpu, &rqd->tickled) )
-        cpu_clear(cpu, rqd->tickled);
+        cpumask_clear_cpu(cpu, &rqd->tickled);
 
     /* Update credits */
     burn_credits(rqd, scurr, now);
@@ -1709,7 +1709,7 @@
 
         /* Clear the idle mask if necessary */
         if ( cpumask_test_cpu(cpu, &rqd->idle) )
-            cpu_clear(cpu, rqd->idle);
+            cpumask_clear_cpu(cpu, &rqd->idle);
 
         snext->start_time = now;
 
@@ -1873,7 +1873,7 @@
     
     rqd->id = -1;
 
-    cpu_clear(rqi, prv->active_queues);
+    cpumask_clear_cpu(rqi, &prv->active_queues);
 }
 
 static void init_pcpu(const struct scheduler *ops, int cpu)
@@ -1977,8 +1977,8 @@
 
     printk("Removing cpu %d from runqueue %d\n", cpu, rqi);
 
-    cpu_clear(cpu, rqd->idle);
-    cpu_clear(cpu, rqd->active);
+    cpumask_clear_cpu(cpu, &rqd->idle);
+    cpumask_clear_cpu(cpu, &rqd->active);
 
     if ( cpumask_empty(&rqd->active) )
     {
@@ -1988,7 +1988,7 @@
 
     spin_unlock(&rqd->lock);
 
-    cpu_clear(cpu, prv->initialized);
+    cpumask_clear_cpu(cpu, &prv->initialized);
 
     spin_unlock_irqrestore(&prv->lock, flags);
 
diff -r 1f3056be6c83 -r 52d242adc94e xen/include/asm-x86/flushtlb.h
--- a/xen/include/asm-x86/flushtlb.h    Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/include/asm-x86/flushtlb.h    Tue Nov 08 10:35:12 2011 +0100
@@ -54,7 +54,7 @@
     unsigned int cpu;                                                   \
     for_each_cpu_mask ( cpu, mask )                                     \
         if ( !NEED_FLUSH(per_cpu(tlbflush_time, cpu), page_timestamp) ) \
-            cpu_clear(cpu, mask);                                       \
+            cpumask_clear_cpu(cpu, &(mask));                            \
 } while ( 0 )
 
 void new_tlbflush_clock_period(void);
diff -r 1f3056be6c83 -r 52d242adc94e xen/include/asm-x86/numa.h
--- a/xen/include/asm-x86/numa.h        Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/include/asm-x86/numa.h        Tue Nov 08 10:35:12 2011 +0100
@@ -43,7 +43,7 @@
 
 static inline void clear_node_cpumask(int cpu)
 {
-       cpu_clear(cpu, node_to_cpumask[cpu_to_node(cpu)]);
+       cpumask_clear_cpu(cpu, &node_to_cpumask[cpu_to_node(cpu)]);
 }
 
 /* Simple perfect hash to map pdx to node numbers */
diff -r 1f3056be6c83 -r 52d242adc94e xen/include/xen/cpumask.h
--- a/xen/include/xen/cpumask.h Tue Nov 08 10:34:33 2011 +0100
+++ b/xen/include/xen/cpumask.h Tue Nov 08 10:35:12 2011 +0100
@@ -102,7 +102,6 @@
        set_bit(cpumask_check(cpu), dstp->bits);
 }
 
-#define cpu_clear(cpu, dst) cpumask_clear_cpu(cpu, &(dst))
 static inline void cpumask_clear_cpu(int cpu, volatile cpumask_t *dstp)
 {
        clear_bit(cpumask_check(cpu), dstp->bits);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.