aboutsummaryrefslogtreecommitdiffstats
path: root/xen/xsm
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-14 20:37:02 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-14 20:37:02 +0100
commit7f01473211b2586130c653d3b1ac15acc082d4df (patch)
tree48cda4464ba8a8ff424e5c3d7dd9d0aa3a9fa9c3 /xen/xsm
parentf9ffb1134c8be2f6bffd14578c179d3f12371abd (diff)
downloadxen-7f01473211b2586130c653d3b1ac15acc082d4df.tar.gz
xen-7f01473211b2586130c653d3b1ac15acc082d4df.tar.bz2
xen-7f01473211b2586130c653d3b1ac15acc082d4df.zip
Remove many uses of cpu_possible_map and iterators over NR_CPUS.
The significant remaining culprits for x86 are credit2, hpet, and percpu-area subsystems. To be dealt with in a separate patch. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/xsm')
-rw-r--r--xen/xsm/flask/flask_op.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c
index 9078a23b4d..c8f10a2ade 100644
--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -680,7 +680,6 @@ static int flask_security_avc_cachestats(char *buf, uint32_t count)
char *page = NULL;
int len = 0;
int length = 0;
- long long idx = 0;
int cpu;
struct avc_cache_stats *st;
@@ -701,11 +700,8 @@ static int flask_security_avc_cachestats(char *buf, uint32_t count)
length += len;
count -= len;
- for ( cpu = idx; cpu < NR_CPUS; ++cpu )
+ for_each_online_cpu ( cpu )
{
- if ( !cpu_possible(cpu) )
- continue;
- idx = cpu + 1;
st = &per_cpu(avc_cache_stats, cpu);
len = snprintf(page, PAGE_SIZE, "%u %u %u %u %u %u\n", st->lookups,