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

s390/topology: Improve topology detection

Add early polarization detection instead of assuming horizontal
polarization.

Signed-off-by: Mete Durlu <meted@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>

authored by

Mete Durlu and committed by
Alexander Gordeev
9988df07 03b3e82a

+11
+11
arch/s390/kernel/topology.c
··· 556 556 } 557 557 } 558 558 559 + static int __init detect_polarization(union topology_entry *tle) 560 + { 561 + struct topology_core *tl_core; 562 + 563 + while (tle->nl) 564 + tle = next_tle(tle); 565 + tl_core = (struct topology_core *)tle; 566 + return tl_core->pp != POLARIZATION_HRZ; 567 + } 568 + 559 569 void __init topology_init_early(void) 560 570 { 561 571 struct sysinfo_15_1_x *info; ··· 585 575 __func__, PAGE_SIZE, PAGE_SIZE); 586 576 info = tl_info; 587 577 store_topology(info); 578 + cpu_management = detect_polarization(info->tle); 588 579 pr_info("The CPU configuration topology of the machine is: %d %d %d %d %d %d / %d\n", 589 580 info->mag[0], info->mag[1], info->mag[2], info->mag[3], 590 581 info->mag[4], info->mag[5], info->mnest);