Commit 0921244f authored by Helge Deller's avatar Helge Deller

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: default avatarHelge Deller <deller@gmx.de>
Noticed-by: default avatarJohn David Anglin <dave.anglin@bell.net>
parent 6c800d7f
...@@ -171,6 +171,7 @@ static int __init processor_probe(struct parisc_device *dev) ...@@ -171,6 +171,7 @@ static int __init processor_probe(struct parisc_device *dev)
p->cpu_num = cpu_info.cpu_num; p->cpu_num = cpu_info.cpu_num;
p->cpu_loc = cpu_info.cpu_loc; p->cpu_loc = cpu_info.cpu_loc;
set_cpu_possible(cpuid, true);
store_cpu_topology(cpuid); store_cpu_topology(cpuid);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -461,6 +462,13 @@ static struct parisc_driver cpu_driver __refdata = { ...@@ -461,6 +462,13 @@ static struct parisc_driver cpu_driver __refdata = {
*/ */
void __init processor_init(void) void __init processor_init(void)
{ {
unsigned int cpu;
reset_cpu_topology(); reset_cpu_topology();
/* reset possible mask. We will mark those which are possible. */
for_each_possible_cpu(cpu)
set_cpu_possible(cpu, false);
register_parisc_driver(&cpu_driver); register_parisc_driver(&cpu_driver);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment