Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: Only list existing CPUs in cpu_possible_mask

The inventory knows which CPUs are in the system, so this bitmask should
be in cpu_possible_mask instead of the bitmask based on CONFIG_NR_CPUS.

Reset the cpu_possible_mask before scanning the system for CPUs, and
mark each existing CPU as possible during initialization of that CPU.

This avoids those warnings later on too:

register_cpu_capacity_sysctl: too early to get CPU4 device!

Signed-off-by: Helge Deller <deller@gmx.de>
Noticed-by: John David Anglin <dave.anglin@bell.net>

+8
+8
arch/parisc/kernel/processor.c
··· 171 171 p->cpu_num = cpu_info.cpu_num; 172 172 p->cpu_loc = cpu_info.cpu_loc; 173 173 174 + set_cpu_possible(cpuid, true); 174 175 store_cpu_topology(cpuid); 175 176 176 177 #ifdef CONFIG_SMP ··· 462 461 */ 463 462 void __init processor_init(void) 464 463 { 464 + unsigned int cpu; 465 + 465 466 reset_cpu_topology(); 467 + 468 + /* reset possible mask. We will mark those which are possible. */ 469 + for_each_possible_cpu(cpu) 470 + set_cpu_possible(cpu, false); 471 + 466 472 register_parisc_driver(&cpu_driver); 467 473 }