Skip to content

Commit d6922ef

Browse files
mike-travissuryasaimadhu
authored andcommitted
x86/platform/uv: Update node present counting
The changes in the UV5 arch shrunk the NODE PRESENT table to just 2x64 entries (128 total) so are in to 64 bit MMRs instead of a depth of 64 bits in an array. Adjust references when counting up the nodes present. Signed-off-by: Mike Travis <mike.travis@hpe.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com> Reviewed-by: Steve Wahl <steve.wahl@hpe.com> Link: https://lkml.kernel.org/r/20201005203929.148656-11-mike.travis@hpe.com
1 parent a74a7e9 commit d6922ef

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,20 +1436,32 @@ static int __init decode_uv_systab(void)
14361436
/* Set up physical blade translations from UVH_NODE_PRESENT_TABLE */
14371437
static __init void boot_init_possible_blades(struct uv_hub_info_s *hub_info)
14381438
{
1439+
unsigned long np;
14391440
int i, uv_pb = 0;
14401441

1441-
pr_info("UV: NODE_PRESENT_DEPTH = %d\n", UVH_NODE_PRESENT_TABLE_DEPTH);
1442-
for (i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) {
1443-
unsigned long np;
1444-
1445-
np = uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8);
1446-
if (np)
1442+
if (UVH_NODE_PRESENT_TABLE) {
1443+
pr_info("UV: NODE_PRESENT_DEPTH = %d\n",
1444+
UVH_NODE_PRESENT_TABLE_DEPTH);
1445+
for (i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) {
1446+
np = uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8);
14471447
pr_info("UV: NODE_PRESENT(%d) = 0x%016lx\n", i, np);
1448-
1448+
uv_pb += hweight64(np);
1449+
}
1450+
}
1451+
if (UVH_NODE_PRESENT_0) {
1452+
np = uv_read_local_mmr(UVH_NODE_PRESENT_0);
1453+
pr_info("UV: NODE_PRESENT_0 = 0x%016lx\n", np);
1454+
uv_pb += hweight64(np);
1455+
}
1456+
if (UVH_NODE_PRESENT_1) {
1457+
np = uv_read_local_mmr(UVH_NODE_PRESENT_1);
1458+
pr_info("UV: NODE_PRESENT_1 = 0x%016lx\n", np);
14491459
uv_pb += hweight64(np);
14501460
}
14511461
if (uv_possible_blades != uv_pb)
14521462
uv_possible_blades = uv_pb;
1463+
1464+
pr_info("UV: number nodes/possible blades %d\n", uv_pb);
14531465
}
14541466

14551467
static void __init build_socket_tables(void)

0 commit comments

Comments
 (0)