allocate CPU sibling and core maps dynamically
PATCH 5/12 allocate CPU sibling and core maps dynamically
... thus reducing the per-CPU data area size back to one page even when building for large NR_CPUS.
At once eliminate the old __cpu{mask,list}_scnprintf() helpers.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/ia64/linux-xen/setup.c +6 -2
@@ -577,8 +577,12 @@ late_setup_arch (char **cmdline_p)cpu_physical_id (0 ) =hard_smp_processor_id (); -cpu_set (0 ,per_cpu (cpu_sibling_map,0 )); -cpu_set (0 ,per_cpu (cpu_core_map,0 )); +if (!zalloc_cpumask_var (&per_cpu (cpu_sibling_mask,0 )) || + !zalloc_cpumask_var (&per_cpu (cpu_core_mask,0 ))) +panic ("No memory for boot CPU sibling/core maps\n" ); + +cpumask_set_cpu (0 ,per_cpu (cpu_sibling_mask,0 )); +cpumask_set_cpu (0 ,per_cpu (cpu_core_mask,0 ));check_for_logical_procs ();if (smp_num_cpucores >1 )
xen/arch/ia64/linux-xen/smpboot.c +25 -17
83 lines not on this page · raw message
xen/arch/ia64/xen/dom0_ops.c +2 -2
@@ -594,9 +594,9 @@ long arch_do_sysctl(xen_sysctl_t *op, XExen_sysctl_physinfo_t *pi = &op->u.physinfo;memset (pi,0 ,sizeof (*pi)); - pi->threads_per_core =cpus_weight (per_cpu (cpu_sibling_map,0 )); + pi->threads_per_core =cpumask_weight (per_cpu (cpu_sibling_mask,0 )); pi->cores_per_socket = -cpus_weight (per_cpu (cpu_core_map,0 )) / pi->threads_per_core; +cpumask_weight (per_cpu (cpu_core_mask,0 )) / pi->threads_per_core; pi->nr_nodes = (u32 )num_online_nodes (); pi->nr_cpus = (u32 )num_online_cpus (); pi->total_pages = total_pages;
xen/arch/ia64/xen/tlb_track.c +1 -1
@@ -504,7 +504,7 @@ __tlb_track_entry_printf(const char* funchar pcpumask_buf[NR_CPUS +1 ];char vcpumask_buf[MAX_VIRT_CPUS +1 ];cpumask_scnprintf (pcpumask_buf,sizeof (pcpumask_buf), - entry->pcpu_dirty_mask); + &entry->pcpu_dirty_mask);vcpumask_scnprintf (vcpumask_buf,sizeof (vcpumask_buf), entry->vcpu_dirty_mask); printk("%s:%d\n"
xen/arch/x86/cpu/mcheck/mce_intel.c +1 -1
@@ -867,7 +867,7 @@ static void intel_machine_check(struct c {char *ebufp, ebuf[96 ] ="MCE: Fatal error happened on CPUs " ; ebufp = ebuf +strlen (ebuf); -cpumask_scnprintf (ebufp,95 -strlen (ebuf), mce_fatal_cpus); +cpumask_scnprintf (ebufp,95 -strlen (ebuf), &mce_fatal_cpus);mc_panic (ebuf); }atomic_set (&found_error,0 );
xen/arch/x86/irq.c +1 -1
@@ -1998,7 +1998,7 @@ static void dump_irqs(unsigned char key)spin_lock_irqsave (&desc->lock, flags);cpumask_scnprintf (keyhandler_scratch,sizeof (keyhandler_scratch), - desc->affinity); + &desc->affinity); printk(" IRQ:%4d affinity:%s vec:%02x type=%-15s" " status=%08x ", irq, keyhandler_scratch, desc->arch.vector,
xen/arch/x86/mm.c +1 -1
@@ -3201,7 +3201,7 @@ int do_mmuext_op(cpumask_clear (&mask);for_each_online_cpu (cpu)if ( !cpumask_intersects (&mask, - &per_cpu (cpu_sibling_map, cpu)) ) +per_cpu (cpu_sibling_mask, cpu)) )cpumask_set_cpu (cpu, &mask);flush_mask (&mask,FLUSH_CACHE ); }
xen/arch/x86/oprofile/op_model_p4.c +1 -1
@@ -385,7 +385,7 @@ static unsigned int get_stagger(void) {#ifdef CONFIG_SMP int cpu =smp_processor_id (); -return (cpu !=first_cpu (per_cpu (cpu_sibling_map, cpu))); +return (cpu !=cpumask_first (per_cpu (cpu_sibling_mask, cpu)));#endif return 0 ; }
xen/arch/x86/smpboot.c +30 -32
145 lines not on this page · raw message
xen/arch/x86/sysctl.c +2 -2
@@ -76,9 +76,9 @@ long arch_do_sysctl(memset (pi,0 ,sizeof (*pi)); pi->threads_per_core = -cpus_weight (per_cpu (cpu_sibling_map,0 )); +cpumask_weight (per_cpu (cpu_sibling_mask,0 )); pi->cores_per_socket = -cpus_weight (per_cpu (cpu_core_map,0 )) / pi->threads_per_core; +cpumask_weight (per_cpu (cpu_core_mask,0 )) / pi->threads_per_core; pi->nr_cpus =num_online_cpus (); pi->nr_nodes =num_online_nodes (); pi->max_node_id =MAX_NUMNODES -1 ;
xen/common/domctl.c +4 -4
@@ -171,7 +171,7 @@ static unsigned int default_vcpu0_locati* If we're on a HT system, we only auto-allocate to a non-primary HT. We * favour high numbered CPUs in the event of a tie. */ -cpumask_copy (&cpu_exclude_map, &per_cpu (cpu_sibling_map,0 )); +cpumask_copy (&cpu_exclude_map,per_cpu (cpu_sibling_mask,0 )); cpu =cpumask_first (&cpu_exclude_map);if (cpumask_weight (&cpu_exclude_map) >1 ) cpu =cpumask_next (cpu, &cpu_exclude_map);
@@ -179,11 +179,11 @@ static unsigned int default_vcpu0_locati {if (cpumask_test_cpu (i, &cpu_exclude_map) )continue ; -if ( (i ==cpumask_first (&per_cpu (cpu_sibling_map, i))) && - (cpumask_weight (&per_cpu (cpu_sibling_map, i)) >1 ) ) +if ( (i ==cpumask_first (per_cpu (cpu_sibling_mask, i))) && + (cpumask_weight (per_cpu (cpu_sibling_mask, i)) >1 ) )continue ;cpumask_or (&cpu_exclude_map, &cpu_exclude_map, - &per_cpu (cpu_sibling_map, i)); +per_cpu (cpu_sibling_mask, i));if ( !cnt || cnt[i] <= cnt[cpu] ) cpu = i; }
xen/common/keyhandler.c +1 -1
@@ -210,7 +210,7 @@ static struct keyhandler reboot_machine_static void cpuset_print (char *set,int size,const cpumask_t *mask) { *set++ ='{' ; - set +=cpulist_scnprintf (set, size-2 , *mask); + set +=cpulist_scnprintf (set, size-2 , mask); *set++ ='}' ; *set++ ='\0' ; }
xen/common/sched_credit.c +11 -11
@@ -502,23 +502,23 @@ _csched_cpu_pick(const struct scheduler nxt =cpumask_cycle (cpu, &cpus); -if (cpumask_test_cpu (cpu, &per_cpu (cpu_core_map, nxt)) ) +if (cpumask_test_cpu (cpu,per_cpu (cpu_core_mask, nxt)) ) {/* We're on the same socket, so check the busy-ness of threads. * Migrate if # of idlers is less at all */ -ASSERT (cpumask_test_cpu (nxt, &per_cpu (cpu_core_map, cpu)) ); +ASSERT (cpumask_test_cpu (nxt,per_cpu (cpu_core_mask, cpu)) ); migrate_factor =1 ; -cpumask_and (&cpu_idlers, &idlers, &per_cpu (cpu_sibling_map, cpu)); -cpumask_and (&nxt_idlers, &idlers, &per_cpu (cpu_sibling_map, nxt)); +cpumask_and (&cpu_idlers, &idlers,per_cpu (cpu_sibling_mask, cpu)); +cpumask_and (&nxt_idlers, &idlers,per_cpu (cpu_sibling_mask, nxt)); }else {/* We're on different sockets, so check the busy-ness of cores. * Migrate only if the other core is twice as idle */ -ASSERT ( !cpumask_test_cpu (nxt, &per_cpu (cpu_core_map, cpu)) ); +ASSERT ( !cpumask_test_cpu (nxt,per_cpu (cpu_core_mask, cpu)) ); migrate_factor =2 ; -cpumask_and (&cpu_idlers, &idlers, &per_cpu (cpu_core_map, cpu)); -cpumask_and (&nxt_idlers, &idlers, &per_cpu (cpu_core_map, nxt)); +cpumask_and (&cpu_idlers, &idlers,per_cpu (cpu_core_mask, cpu)); +cpumask_and (&nxt_idlers, &idlers,per_cpu (cpu_core_mask, nxt)); } weight_cpu =cpumask_weight (&cpu_idlers);
@@ -531,7 +531,7 @@ _csched_cpu_pick(const struct schedulercpumask_and (&nxt_idlers, &cpus, &nxt_idlers); spc =CSCHED_PCPU (nxt); cpu =cpumask_cycle (spc->idle_bias, &nxt_idlers); -cpumask_andnot (&cpus, &cpus, &per_cpu (cpu_sibling_map, cpu)); +cpumask_andnot (&cpus, &cpus,per_cpu (cpu_sibling_mask, cpu)); }else {
@@ -1419,9 +1419,9 @@ csched_dump_pcpu(const struct scheduler spc =CSCHED_PCPU (cpu); runq = &spc->runq; -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_map, cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_mask, cpu));printk (" sort=%d, sibling=%s, " , spc->runq_sort_last, cpustr); -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_map, cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_mask, cpu));printk ("core=%s\n" , cpustr);/* current VCPU */
@@ -1481,7 +1481,7 @@ csched_dump(const struct scheduler *ops) prv->ticks_per_tslice, vcpu_migration_delay); -cpumask_scnprintf (idlers_buf,sizeof (idlers_buf), prv->idlers); +cpumask_scnprintf (idlers_buf,sizeof (idlers_buf), &prv->idlers);printk ("idlers: %s\n" , idlers_buf);printk ("active vcpus:\n" );
xen/common/sched_credit2.c +2 -2
@@ -1767,9 +1767,9 @@ csched_dump_pcpu(const struct scheduler runq = &RQD (ops, cpu)->runq; -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_map,cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_mask, cpu));printk (" sibling=%s, " , cpustr); -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_map,cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_mask, cpu));printk ("core=%s\n" , cpustr);/* current VCPU */
xen/include/asm-ia64/linux-xen/asm/smp.h +2 -2
@@ -62,8 +62,8 @@ extern char no_int_routing __devinitdataextern cpumask_t cpu_online_map;#define cpu_is_offline (cpu) unlikely(!cpu_online(cpu)) -DECLARE_PER_CPU (cpumask_t, cpu_core_map); -DECLARE_PER_CPU (cpumask_t, cpu_sibling_map); +DECLARE_PER_CPU (cpumask_var_t, cpu_core_mask); +DECLARE_PER_CPU (cpumask_var_t, cpu_sibling_mask);extern int smp_num_siblings;extern int smp_num_cpucores;extern void __iomem *ipi_base_addr;
xen/include/asm-x86/smp.h +2 -2
@@ -25,8 +25,8 @@*/ extern void smp_alloc_memory (void ); -DECLARE_PER_CPU (cpumask_t, cpu_sibling_map); -DECLARE_PER_CPU (cpumask_t, cpu_core_map); +DECLARE_PER_CPU (cpumask_var_t, cpu_sibling_mask); +DECLARE_PER_CPU (cpumask_var_t, cpu_core_mask);void smp_send_nmi_allbutself (void );
xen/include/xen/cpumask.h +6 -10
@@ -320,20 +320,16 @@ static inline const cpumask_t *cpumask_o#define cpus_addr (src) ((src).bits)#define cpumask_bits (maskp) ((maskp)->bits) -#define cpumask_scnprintf (buf, len, src) \ - __cpumask_scnprintf((buf), (len), &(src), nr_cpu_ids) -static inline int __cpumask_scnprintf (char *buf,int len, -const cpumask_t *srcp,int nbits) +static inline int cpumask_scnprintf (char *buf,int len, +const cpumask_t *srcp) { -return bitmap_scnprintf (buf, len, srcp->bits, nbits); +return bitmap_scnprintf (buf, len, srcp->bits, nr_cpu_ids); } -#define cpulist_scnprintf (buf, len, src) \ - __cpulist_scnprintf((buf), (len), &(src), nr_cpu_ids) -static inline int __cpulist_scnprintf (char *buf,int len, -const cpumask_t *srcp,int nbits) +static inline int cpulist_scnprintf (char *buf,int len, +const cpumask_t *srcp) { -return bitmap_scnlistprintf (buf, len, srcp->bits, nbits); +return bitmap_scnlistprintf (buf, len, srcp->bits, nr_cpu_ids); }/*
allocate CPU sibling and core maps dynamically
... thus reducing the per-CPU data area size back to one page even when building for large NR_CPUS.
At once eliminate the old __cpu{mask,list}_scnprintf() helpers.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/ia64/linux-xen/setup.c +6 -2
@@ -577,8 +577,12 @@ late_setup_arch (char **cmdline_p)cpu_physical_id (0 ) =hard_smp_processor_id (); -cpu_set (0 ,per_cpu (cpu_sibling_map,0 )); -cpu_set (0 ,per_cpu (cpu_core_map,0 )); +if (!zalloc_cpumask_var (&per_cpu (cpu_sibling_mask,0 )) || + !zalloc_cpumask_var (&per_cpu (cpu_core_mask,0 ))) +panic ("No memory for boot CPU sibling/core maps\n" ); + +cpumask_set_cpu (0 ,per_cpu (cpu_sibling_mask,0 )); +cpumask_set_cpu (0 ,per_cpu (cpu_core_mask,0 ));check_for_logical_procs ();if (smp_num_cpucores >1 )
xen/arch/ia64/linux-xen/smpboot.c +25 -17
83 lines not on this page · raw message
xen/arch/ia64/xen/dom0_ops.c +2 -2
@@ -594,9 +594,9 @@ long arch_do_sysctl(xen_sysctl_t *op, XExen_sysctl_physinfo_t *pi = &op->u.physinfo;memset (pi,0 ,sizeof (*pi)); - pi->threads_per_core =cpus_weight (per_cpu (cpu_sibling_map,0 )); + pi->threads_per_core =cpumask_weight (per_cpu (cpu_sibling_mask,0 )); pi->cores_per_socket = -cpus_weight (per_cpu (cpu_core_map,0 )) / pi->threads_per_core; +cpumask_weight (per_cpu (cpu_core_mask,0 )) / pi->threads_per_core; pi->nr_nodes = (u32 )num_online_nodes (); pi->nr_cpus = (u32 )num_online_cpus (); pi->total_pages = total_pages;
xen/arch/ia64/xen/tlb_track.c +1 -1
@@ -504,7 +504,7 @@ __tlb_track_entry_printf(const char* funchar pcpumask_buf[NR_CPUS +1 ];char vcpumask_buf[MAX_VIRT_CPUS +1 ];cpumask_scnprintf (pcpumask_buf,sizeof (pcpumask_buf), - entry->pcpu_dirty_mask); + &entry->pcpu_dirty_mask);vcpumask_scnprintf (vcpumask_buf,sizeof (vcpumask_buf), entry->vcpu_dirty_mask); printk("%s:%d\n"
xen/arch/x86/cpu/mcheck/mce_intel.c +1 -1
@@ -867,7 +867,7 @@ static void intel_machine_check(struct c {char *ebufp, ebuf[96 ] ="MCE: Fatal error happened on CPUs " ; ebufp = ebuf +strlen (ebuf); -cpumask_scnprintf (ebufp,95 -strlen (ebuf), mce_fatal_cpus); +cpumask_scnprintf (ebufp,95 -strlen (ebuf), &mce_fatal_cpus);mc_panic (ebuf); }atomic_set (&found_error,0 );
xen/arch/x86/irq.c +1 -1
@@ -1998,7 +1998,7 @@ static void dump_irqs(unsigned char key)spin_lock_irqsave (&desc->lock, flags);cpumask_scnprintf (keyhandler_scratch,sizeof (keyhandler_scratch), - desc->affinity); + &desc->affinity); printk(" IRQ:%4d affinity:%s vec:%02x type=%-15s" " status=%08x ", irq, keyhandler_scratch, desc->arch.vector,
xen/arch/x86/mm.c +1 -1
@@ -3201,7 +3201,7 @@ int do_mmuext_op(cpumask_clear (&mask);for_each_online_cpu (cpu)if ( !cpumask_intersects (&mask, - &per_cpu (cpu_sibling_map, cpu)) ) +per_cpu (cpu_sibling_mask, cpu)) )cpumask_set_cpu (cpu, &mask);flush_mask (&mask,FLUSH_CACHE ); }
xen/arch/x86/oprofile/op_model_p4.c +1 -1
@@ -385,7 +385,7 @@ static unsigned int get_stagger(void) {#ifdef CONFIG_SMP int cpu =smp_processor_id (); -return (cpu !=first_cpu (per_cpu (cpu_sibling_map, cpu))); +return (cpu !=cpumask_first (per_cpu (cpu_sibling_mask, cpu)));#endif return 0 ; }
xen/arch/x86/smpboot.c +30 -32
145 lines not on this page · raw message
xen/arch/x86/sysctl.c +2 -2
@@ -76,9 +76,9 @@ long arch_do_sysctl(memset (pi,0 ,sizeof (*pi)); pi->threads_per_core = -cpus_weight (per_cpu (cpu_sibling_map,0 )); +cpumask_weight (per_cpu (cpu_sibling_mask,0 )); pi->cores_per_socket = -cpus_weight (per_cpu (cpu_core_map,0 )) / pi->threads_per_core; +cpumask_weight (per_cpu (cpu_core_mask,0 )) / pi->threads_per_core; pi->nr_cpus =num_online_cpus (); pi->nr_nodes =num_online_nodes (); pi->max_node_id =MAX_NUMNODES -1 ;
xen/common/domctl.c +4 -4
@@ -171,7 +171,7 @@ static unsigned int default_vcpu0_locati* If we're on a HT system, we only auto-allocate to a non-primary HT. We * favour high numbered CPUs in the event of a tie. */ -cpumask_copy (&cpu_exclude_map, &per_cpu (cpu_sibling_map,0 )); +cpumask_copy (&cpu_exclude_map,per_cpu (cpu_sibling_mask,0 )); cpu =cpumask_first (&cpu_exclude_map);if (cpumask_weight (&cpu_exclude_map) >1 ) cpu =cpumask_next (cpu, &cpu_exclude_map);
@@ -179,11 +179,11 @@ static unsigned int default_vcpu0_locati {if (cpumask_test_cpu (i, &cpu_exclude_map) )continue ; -if ( (i ==cpumask_first (&per_cpu (cpu_sibling_map, i))) && - (cpumask_weight (&per_cpu (cpu_sibling_map, i)) >1 ) ) +if ( (i ==cpumask_first (per_cpu (cpu_sibling_mask, i))) && + (cpumask_weight (per_cpu (cpu_sibling_mask, i)) >1 ) )continue ;cpumask_or (&cpu_exclude_map, &cpu_exclude_map, - &per_cpu (cpu_sibling_map, i)); +per_cpu (cpu_sibling_mask, i));if ( !cnt || cnt[i] <= cnt[cpu] ) cpu = i; }
xen/common/keyhandler.c +1 -1
@@ -210,7 +210,7 @@ static struct keyhandler reboot_machine_static void cpuset_print (char *set,int size,const cpumask_t *mask) { *set++ ='{' ; - set +=cpulist_scnprintf (set, size-2 , *mask); + set +=cpulist_scnprintf (set, size-2 , mask); *set++ ='}' ; *set++ ='\0' ; }
xen/common/sched_credit.c +11 -11
@@ -502,23 +502,23 @@ _csched_cpu_pick(const struct scheduler nxt =cpumask_cycle (cpu, &cpus); -if (cpumask_test_cpu (cpu, &per_cpu (cpu_core_map, nxt)) ) +if (cpumask_test_cpu (cpu,per_cpu (cpu_core_mask, nxt)) ) {/* We're on the same socket, so check the busy-ness of threads. * Migrate if # of idlers is less at all */ -ASSERT (cpumask_test_cpu (nxt, &per_cpu (cpu_core_map, cpu)) ); +ASSERT (cpumask_test_cpu (nxt,per_cpu (cpu_core_mask, cpu)) ); migrate_factor =1 ; -cpumask_and (&cpu_idlers, &idlers, &per_cpu (cpu_sibling_map, cpu)); -cpumask_and (&nxt_idlers, &idlers, &per_cpu (cpu_sibling_map, nxt)); +cpumask_and (&cpu_idlers, &idlers,per_cpu (cpu_sibling_mask, cpu)); +cpumask_and (&nxt_idlers, &idlers,per_cpu (cpu_sibling_mask, nxt)); }else {/* We're on different sockets, so check the busy-ness of cores. * Migrate only if the other core is twice as idle */ -ASSERT ( !cpumask_test_cpu (nxt, &per_cpu (cpu_core_map, cpu)) ); +ASSERT ( !cpumask_test_cpu (nxt,per_cpu (cpu_core_mask, cpu)) ); migrate_factor =2 ; -cpumask_and (&cpu_idlers, &idlers, &per_cpu (cpu_core_map, cpu)); -cpumask_and (&nxt_idlers, &idlers, &per_cpu (cpu_core_map, nxt)); +cpumask_and (&cpu_idlers, &idlers,per_cpu (cpu_core_mask, cpu)); +cpumask_and (&nxt_idlers, &idlers,per_cpu (cpu_core_mask, nxt)); } weight_cpu =cpumask_weight (&cpu_idlers);
@@ -531,7 +531,7 @@ _csched_cpu_pick(const struct schedulercpumask_and (&nxt_idlers, &cpus, &nxt_idlers); spc =CSCHED_PCPU (nxt); cpu =cpumask_cycle (spc->idle_bias, &nxt_idlers); -cpumask_andnot (&cpus, &cpus, &per_cpu (cpu_sibling_map, cpu)); +cpumask_andnot (&cpus, &cpus,per_cpu (cpu_sibling_mask, cpu)); }else {
@@ -1419,9 +1419,9 @@ csched_dump_pcpu(const struct scheduler spc =CSCHED_PCPU (cpu); runq = &spc->runq; -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_map, cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_mask, cpu));printk (" sort=%d, sibling=%s, " , spc->runq_sort_last, cpustr); -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_map, cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_mask, cpu));printk ("core=%s\n" , cpustr);/* current VCPU */
@@ -1481,7 +1481,7 @@ csched_dump(const struct scheduler *ops) prv->ticks_per_tslice, vcpu_migration_delay); -cpumask_scnprintf (idlers_buf,sizeof (idlers_buf), prv->idlers); +cpumask_scnprintf (idlers_buf,sizeof (idlers_buf), &prv->idlers);printk ("idlers: %s\n" , idlers_buf);printk ("active vcpus:\n" );
xen/common/sched_credit2.c +2 -2
@@ -1767,9 +1767,9 @@ csched_dump_pcpu(const struct scheduler runq = &RQD (ops, cpu)->runq; -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_map,cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_sibling_mask, cpu));printk (" sibling=%s, " , cpustr); -cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_map,cpu)); +cpumask_scnprintf (cpustr,sizeof (cpustr),per_cpu (cpu_core_mask, cpu));printk ("core=%s\n" , cpustr);/* current VCPU */
xen/include/asm-ia64/linux-xen/asm/smp.h +2 -2
@@ -62,8 +62,8 @@ extern char no_int_routing __devinitdataextern cpumask_t cpu_online_map;#define cpu_is_offline (cpu) unlikely(!cpu_online(cpu)) -DECLARE_PER_CPU (cpumask_t, cpu_core_map); -DECLARE_PER_CPU (cpumask_t, cpu_sibling_map); +DECLARE_PER_CPU (cpumask_var_t, cpu_core_mask); +DECLARE_PER_CPU (cpumask_var_t, cpu_sibling_mask);extern int smp_num_siblings;extern int smp_num_cpucores;extern void __iomem *ipi_base_addr;
xen/include/asm-x86/smp.h +2 -2
@@ -25,8 +25,8 @@*/ extern void smp_alloc_memory (void ); -DECLARE_PER_CPU (cpumask_t, cpu_sibling_map); -DECLARE_PER_CPU (cpumask_t, cpu_core_map); +DECLARE_PER_CPU (cpumask_var_t, cpu_sibling_mask); +DECLARE_PER_CPU (cpumask_var_t, cpu_core_mask);void smp_send_nmi_allbutself (void );
xen/include/xen/cpumask.h +6 -10
@@ -320,20 +320,16 @@ static inline const cpumask_t *cpumask_o#define cpus_addr (src) ((src).bits)#define cpumask_bits (maskp) ((maskp)->bits) -#define cpumask_scnprintf (buf, len, src) \ - __cpumask_scnprintf((buf), (len), &(src), nr_cpu_ids) -static inline int __cpumask_scnprintf (char *buf,int len, -const cpumask_t *srcp,int nbits) +static inline int cpumask_scnprintf (char *buf,int len, +const cpumask_t *srcp) { -return bitmap_scnprintf (buf, len, srcp->bits, nbits); +return bitmap_scnprintf (buf, len, srcp->bits, nr_cpu_ids); } -#define cpulist_scnprintf (buf, len, src) \ - __cpulist_scnprintf((buf), (len), &(src), nr_cpu_ids) -static inline int __cpulist_scnprintf (char *buf,int len, -const cpumask_t *srcp,int nbits) +static inline int cpulist_scnprintf (char *buf,int len, +const cpumask_t *srcp) { -return bitmap_scnlistprintf (buf, len, srcp->bits, nbits); +return bitmap_scnlistprintf (buf, len, srcp->bits, nr_cpu_ids); }/*
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel