lscpu can skip all CPUs which are possible but not present. For
configurations where a lot of CPUs are possible but only few CPUs are
present this saves a lot of pointless glibc/system calls.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
read_basicinfo(desc, mod);
for (i = 0; i < desc->ncpuspos; i++) {
+ /* only consider present CPUs */
+ if (desc->present &&
+ !CPU_ISSET(real_cpu_num(desc, i), desc->present))
+ continue;
read_topology(desc, i);
read_cache(desc, i);
read_polarization(desc, i);