diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-25 10:36:59 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-25 10:36:59 +0000 |
commit | 5164002e4d2da07c6143c91ba627d7523526cdef (patch) | |
tree | 9bb439e041d1c24648317d64c4531b888fac8e40 /xen/common/perfc.c | |
parent | 1d006bb23567dec6990aaf46bb3d56ebf4c1cf4f (diff) | |
download | xen-5164002e4d2da07c6143c91ba627d7523526cdef.tar.gz xen-5164002e4d2da07c6143c91ba627d7523526cdef.tar.bz2 xen-5164002e4d2da07c6143c91ba627d7523526cdef.zip |
bitkeeper revision 1.1548 (4294554btfa2GpomqV57KFpxEHsjEA)
Move to Linux's cpumask_t and 'hotplug' multi-processor booting
interfaces. This also brings apic.c and various other files closer to
their Linux 2.6 equivalents. Simplified the scheduler interfaces a
little (particularly per-cpu and idle-domain initialisation).
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/perfc.c')
-rw-r--r-- | xen/common/perfc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 157d49ffc8..7363fb98c7 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -55,10 +55,11 @@ void perfc_printall(unsigned char key) break; case TYPE_CPU: case TYPE_S_CPU: - for ( j = sum = 0; j < smp_num_cpus; j++ ) + sum = 0; + for_each_online_cpu ( j ) sum += atomic_read(&counters[j]); printk("TOTAL[%10d] ", sum); - for ( j = 0; j < smp_num_cpus; j++ ) + for_each_online_cpu ( j ) printk("CPU%02d[%10d] ", j, atomic_read(&counters[j])); counters += NR_CPUS; break; @@ -84,7 +85,7 @@ void perfc_printall(unsigned char key) void perfc_reset(unsigned char key) { - int i, j, sum; + int i, j; s_time_t now = NOW(); atomic_t *counters = (atomic_t *)&perfcounters; @@ -104,13 +105,13 @@ void perfc_reset(unsigned char key) counters += 1; break; case TYPE_CPU: - for ( j = sum = 0; j < smp_num_cpus; j++ ) + for ( j = 0; j < NR_CPUS; j++ ) atomic_set(&counters[j],0); case TYPE_S_CPU: counters += NR_CPUS; break; case TYPE_ARRAY: - for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ ) + for ( j = 0; j < NR_CPUS; j++ ) atomic_set(&counters[j],0); case TYPE_S_ARRAY: counters += perfc_info[i].nr_elements; @@ -146,7 +147,7 @@ static int perfc_copy_info(dom0_perfc_desc_t *desc) break; case TYPE_CPU: case TYPE_S_CPU: - perfc_d[i].nr_vals = smp_num_cpus; + perfc_d[i].nr_vals = num_online_cpus(); break; case TYPE_ARRAY: case TYPE_S_ARRAY: |