diff options
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r-- | arch/sparc64/kernel/setup.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 0c68a76143af..2a2a8a6cd17d 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -536,15 +536,11 @@ static int __init topology_init(void) | |||
536 | while (!cpu_find_by_instance(ncpus_probed, NULL, NULL)) | 536 | while (!cpu_find_by_instance(ncpus_probed, NULL, NULL)) |
537 | ncpus_probed++; | 537 | ncpus_probed++; |
538 | 538 | ||
539 | for (i = 0; i < NR_CPUS; i++) { | 539 | for_each_cpu(i) { |
540 | if (cpu_possible(i)) { | 540 | struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); |
541 | struct cpu *p = kmalloc(sizeof(*p), GFP_KERNEL); | 541 | if (p) { |
542 | 542 | register_cpu(p, i, NULL); | |
543 | if (p) { | 543 | err = 0; |
544 | memset(p, 0, sizeof(*p)); | ||
545 | register_cpu(p, i, NULL); | ||
546 | err = 0; | ||
547 | } | ||
548 | } | 544 | } |
549 | } | 545 | } |
550 | 546 | ||