Skip to content

Commit 0921244

Browse files
committed
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>
1 parent 6c800d7 commit 0921244

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

arch/parisc/kernel/processor.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ static int __init processor_probe(struct parisc_device *dev)
171171
p->cpu_num = cpu_info.cpu_num;
172172
p->cpu_loc = cpu_info.cpu_loc;
173173

174+
set_cpu_possible(cpuid, true);
174175
store_cpu_topology(cpuid);
175176

176177
#ifdef CONFIG_SMP
@@ -461,6 +462,13 @@ static struct parisc_driver cpu_driver __refdata = {
461462
*/
462463
void __init processor_init(void)
463464
{
465+
unsigned int cpu;
466+
464467
reset_cpu_topology();
468+
469+
/* reset possible mask. We will mark those which are possible. */
470+
for_each_possible_cpu(cpu)
471+
set_cpu_possible(cpu, false);
472+
465473
register_parisc_driver(&cpu_driver);
466474
}

0 commit comments

Comments
 (0)