Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1681965 authored by Mike Travis's avatar Mike Travis
Browse files

x86: move and enhance debug printk for nr_cpu_ids etc.



Impact: cleanup, better debugging

This has proven useful in debugging, *before* we try to use
for_each_possible_cpu().  It also now shows nr_cpumask_bits.

Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent e7986739
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -152,6 +152,11 @@ void __init setup_per_cpu_areas(void)
	old_size = PERCPU_ENOUGH_ROOM;
	align = max_t(unsigned long, PAGE_SIZE, align);
	size = roundup(old_size, align);

	printk(KERN_INFO
		"NR_CPUS:%d nr_cpumask_bits:%d nr_cpu_ids:%d nr_node_ids:%d\n",
		NR_CPUS, nr_cpumask_bits, nr_cpu_ids, nr_node_ids);

	printk(KERN_INFO "PERCPU: Allocating %zd bytes of per cpu data\n",
			  size);

@@ -168,14 +173,17 @@ void __init setup_per_cpu_areas(void)
			       "cpu %d has no node %d or node-local memory\n",
				cpu, node);
			if (ptr)
				printk(KERN_DEBUG "per cpu data for cpu%d at %016lx\n",
				printk(KERN_DEBUG
					"per cpu data for cpu%d at %016lx\n",
					 cpu, __pa(ptr));
		}
		else {
			ptr = __alloc_bootmem_node(NODE_DATA(node), size, align,
							__pa(MAX_DMA_ADDRESS));
			if (ptr)
				printk(KERN_DEBUG "per cpu data for cpu%d on node%d at %016lx\n",
				printk(KERN_DEBUG
					"per cpu data for cpu%d on node%d "
					"at %016lx\n",
					cpu, node, __pa(ptr));
		}
#endif
@@ -183,9 +191,6 @@ void __init setup_per_cpu_areas(void)
		memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
	}

	printk(KERN_DEBUG "NR_CPUS: %d, nr_cpu_ids: %d, nr_node_ids %d\n",
		NR_CPUS, nr_cpu_ids, nr_node_ids);

	/* Setup percpu data maps */
	setup_per_cpu_maps();