From da7ed8802781bb4cb5921a351415b3fb950a4776 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Wed, 22 Oct 2008 12:42:30 +0800 Subject: [PATCH] --- yaml --- r: 117679 b: refs/heads/master c: bc8bcc79ea4203c7d04309f1307ab88c86f0b0cf h: refs/heads/master i: 117677: c8bc76db69984a269055f29fbfa268243def073b 117675: 39aa8b2634fa8678e07b14d79a8bb25d96e83b7f 117671: a1a52dfb0e90c94a39f7540af991fa374eb78e44 117663: 3a618af64de25dc2e81221be5210be730ad5202c v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/cpu/proc.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2768d341c583..ffebe3ee1852 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 35af28219e684a36cc8b1ff456c370ce22be157d +refs/heads/master: bc8bcc79ea4203c7d04309f1307ab88c86f0b0cf diff --git a/trunk/arch/x86/kernel/cpu/proc.c b/trunk/arch/x86/kernel/cpu/proc.c index a26c480b9491..01b1244ef1c0 100644 --- a/trunk/arch/x86/kernel/cpu/proc.c +++ b/trunk/arch/x86/kernel/cpu/proc.c @@ -160,14 +160,16 @@ static void *c_start(struct seq_file *m, loff_t *pos) { if (*pos == 0) /* just in case, cpu 0 is not the first */ *pos = first_cpu(cpu_online_map); - if ((*pos) < nr_cpu_ids && cpu_online(*pos)) + else + *pos = next_cpu_nr(*pos - 1, cpu_online_map); + if ((*pos) < nr_cpu_ids) return &cpu_data(*pos); return NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) { - *pos = next_cpu(*pos, cpu_online_map); + (*pos)++; return c_start(m, pos); }