Skip to content

Commit 9988df0

Browse files
NickJackolsonAlexander Gordeev
authored andcommitted
s390/topology: Improve topology detection
Add early polarization detection instead of assuming horizontal polarization. Signed-off-by: Mete Durlu <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 03b3e82 commit 9988df0

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
@@ -556,6 +556,16 @@ static void __init alloc_masks(struct sysinfo_15_1_x *info,
556556
}
557557
}
558558

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+
559569
void __init topology_init_early(void)
560570
{
561571
struct sysinfo_15_1_x *info;
@@ -575,6 +585,7 @@ void __init topology_init_early(void)
575585
__func__, PAGE_SIZE, PAGE_SIZE);
576586
info = tl_info;
577587
store_topology(info);
588+
cpu_management = detect_polarization(info->tle);
578589
pr_info("The CPU configuration topology of the machine is: %d %d %d %d %d %d / %d\n",
579590
info->mag[0], info->mag[1], info->mag[2], info->mag[3],
580591
info->mag[4], info->mag[5], info->mnest);

0 commit comments

Comments
 (0)