drivers: base: Use present CPUs in GENERIC_CPU_DEVICES
ia64 and x86 only create sysfs entries using register_cpu() for present
CPUs, whereas GENERIC_CPU_DEVICES does this for possible CPUs.
To allow all the ACPI architectures to use GENERIC_CPU_DEVICES, change
it to use for_each_present_cpu().
The following architectures use GENERIC_CPU_DEVICES but are not SMP,
so possible == present:
* h8300
* m68k
* microblaze
* nds32
* nios2
* um
The following architectures use GENERIC_CPU_DEVICES and consider
possible == present:
* csky: setup_smp()
* hexagon: compare smp_start_cpus() and smp_prepare_cpus()
* openrisc: smp_prepare_cpus()
Those others using GENERIC_CPU_DEVICES of note:
openrisc. smp_init_cpus() makes all CPUs < NR_CPUS possible, whereas
smp_prepare_cpus() only makes CPUs < setup_max_cpus present. After this
change, openrisc systems that boot with max_cpus=1 would not see other
CPUs present in sysfs. This should not be a problem as these CPUs can't
bre brought online as _cpu_up() checks cpu_present().
parisc. processor_probe() makes all CPUs present and brings them online.
The cpu_possible_mask is initialised by INIT_ALL_POSSIBLE. After this
change, parisc systems will only show CPUs that exist.
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment