Skip to content

Commit 2a1cb07

Browse files
committed
s390/topology: Improve topology detection
jira LE-4018 Rebuild_History Non-Buildable kernel-5.14.0-570.37.1.el9_6 commit-author Mete Durlu <meted@linux.ibm.com> commit 9988df0 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> (cherry picked from commit 9988df0) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 1fe3385 commit 2a1cb07

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/s390/kernel/topology.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,16 @@ static void __init alloc_masks(struct sysinfo_15_1_x *info,
561561
}
562562
}
563563

564+
static int __init detect_polarization(union topology_entry *tle)
565+
{
566+
struct topology_core *tl_core;
567+
568+
while (tle->nl)
569+
tle = next_tle(tle);
570+
tl_core = (struct topology_core *)tle;
571+
return tl_core->pp != POLARIZATION_HRZ;
572+
}
573+
564574
void __init topology_init_early(void)
565575
{
566576
struct sysinfo_15_1_x *info;
@@ -580,6 +590,7 @@ void __init topology_init_early(void)
580590
__func__, PAGE_SIZE, PAGE_SIZE);
581591
info = tl_info;
582592
store_topology(info);
593+
cpu_management = detect_polarization(info->tle);
583594
pr_info("The CPU configuration topology of the machine is: %d %d %d %d %d %d / %d\n",
584595
info->mag[0], info->mag[1], info->mag[2], info->mag[3],
585596
info->mag[4], info->mag[5], info->mnest);

0 commit comments

Comments
 (0)