diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 15:38:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 15:38:39 -0400 |
commit | c3c9897c63ebb0b93b7f78724e38d6ee1da04041 (patch) | |
tree | f1ed40f2ac6108b23251dd4e41adeac403396fea /arch/x86/kernel/cpu/proc.c | |
parent | d2441183dc222d12961ff2201f5086c846505d93 (diff) | |
parent | 3cfba0892585d4c8e7b4122b5dc0d206a76936de (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: fix section mismatch warning - apic_x2apic_phys
x86: fix section mismatch warning - apic_x2apic_cluster
x86: fix section mismatch warning - apic_x2apic_uv_x
x86: fix section mismatch warning - apic_physflat
x86: fix section mismatch warning - apic_flat
x86: memtest fix use of reserve_early()
x86 syscall.h: fix argument order
x86/tlb_uv: remove strange mc146818rtc include
x86: remove redundant KERN_DEBUG on pr_debug
x86: do_boot_cpu - check if we have ESR register
x86: MAINTAINERS change for AMD microcode patch loader
x86/proc: fix /proc/cpuinfo cpu offline bug
x86: call dmi-quirks for HP Laptops after early-quirks are executed
x86, kexec: fix hang on i386 when panic occurs while console_sem is held
MCE: Don't run 32bit machine checks with interrupts on
x86: SB600: skip IRQ0 override if it is not routed to INT2 of IOAPIC
x86: make variables static
Diffstat (limited to 'arch/x86/kernel/cpu/proc.c')
-rw-r--r-- | arch/x86/kernel/cpu/proc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index a26c480b9491..01b1244ef1c0 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
@@ -160,14 +160,16 @@ static void *c_start(struct seq_file *m, loff_t *pos) | |||
160 | { | 160 | { |
161 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 161 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
162 | *pos = first_cpu(cpu_online_map); | 162 | *pos = first_cpu(cpu_online_map); |
163 | if ((*pos) < nr_cpu_ids && cpu_online(*pos)) | 163 | else |
164 | *pos = next_cpu_nr(*pos - 1, cpu_online_map); | ||
165 | if ((*pos) < nr_cpu_ids) | ||
164 | return &cpu_data(*pos); | 166 | return &cpu_data(*pos); |
165 | return NULL; | 167 | return NULL; |
166 | } | 168 | } |
167 | 169 | ||
168 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 170 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
169 | { | 171 | { |
170 | *pos = next_cpu(*pos, cpu_online_map); | 172 | (*pos)++; |
171 | return c_start(m, pos); | 173 | return c_start(m, pos); |
172 | } | 174 | } |
173 | 175 | ||