Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp200643pxu; Wed, 7 Oct 2020 00:15:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+A5hui05NiBLCpUpmY2516osuuOoieHOJdQC8kr8W/32plz/sY09G/7h3BP466NX8gwcW X-Received: by 2002:a17:906:b204:: with SMTP id p4mr2028610ejz.214.1602054915118; Wed, 07 Oct 2020 00:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602054915; cv=none; d=google.com; s=arc-20160816; b=TSTX0qKucuJApwRpC0eVplQB0jhgV2oCCE2bYM5ksSikMnm4cPCIGvUZm7fS/LZ5cq UbweNGwuK9t97T8KWXJe3Kf0vAQjOSrYTBCJiauK+EJR+vX+Xzmket3LpZdFGo3izlxe oIK2DclF79tCkv1ihg6bdy91aQ+58Fh7bVHEmDA5ZEk4Q3DzIIw9iZR46h26sSXDtDK1 InBxivJyeY2lI9MPPsyrSu2FUsnZ8LsHPPavYcxiBGTbtoCDFquGbLH9JlKl166Gwzy0 iL6dQ4rLfl5OnHZ6TL/Ykhj5pBWia05/RoRzQXrSdulgP79aa9ACC1s1SzpYsR/Fmlnp tJeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=XYRV1PLfwBf6rP9T+9D3DHBJfp4eS5t0VT1vWVHNe0M=; b=ZQiP85hpnZ2XCY6DlBDCPDqfq6aE1Pb783pqRws140+5LcSO2Yp6NSkYw/jx0RanGt 5ZHIgFMPimrKTJVmG7isRYWty+KakDhVeUBEOeIjVNTDmQcotXcnZw3vNKkWcvTiV6IA 4/fY+jtLsE7X3WlMB4leGVaKdbyk1Kg99ylhE4au+Q5bmSj/ZOQoTmQY1SERNXNBs2OV lb2dp3XpsNz1IIBYrit7s9WVxyXSp7B5HePruOWW3RsWPZfM0cOXgUBVv5IHW6Iz5vJc H8EHnFhjbuHnF0sRuWgZrIUi5XyxzGeyLLK2uwEqbB1LKEakxkdsHnepptwPfxGilUQD 6dUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zIePvRPL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=DjJwTOjk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si846922edl.230.2020.10.07.00.14.52; Wed, 07 Oct 2020 00:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zIePvRPL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=DjJwTOjk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727632AbgJGHME (ORCPT + 99 others); Wed, 7 Oct 2020 03:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbgJGHMD (ORCPT ); Wed, 7 Oct 2020 03:12:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADEBDC061755; Wed, 7 Oct 2020 00:12:03 -0700 (PDT) Date: Wed, 07 Oct 2020 07:12:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602054722; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XYRV1PLfwBf6rP9T+9D3DHBJfp4eS5t0VT1vWVHNe0M=; b=zIePvRPLps4kY/LiPrWg6MCsFwGxOfkq4txvw8pdxyzoR28Gm+ub7eDCk3/zQKcbcvxkk/ PXD9lAwS4L3UGNllPpfv69jQ7EC2iKFaVBjW5udQQDgCeUE2XuFaLb4V0N98ZhnuWPf2lM m8tkKTb7+xC+BY4b85ZeoZdWx8ePaMUnvVePmHHTmXN0YRyBVAmWoPwTRoYUKCgKNYgPRF tiT+UuzTijgZK0vYlhteXWQB3znIzSKon99fUBfcYjNKj8T95NQB9Um1QU7Wec7nq2BXfm B1hBoaR7AQD6WZQQ/kL1uSgv5TZoZgO7wwPA6BnFNfcnqD7MJ23DA3y2RkfxAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602054722; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XYRV1PLfwBf6rP9T+9D3DHBJfp4eS5t0VT1vWVHNe0M=; b=DjJwTOjkovm4JwdW4N1vpxhq/kUXTcVzwkmJDWII6OJm3ALRa/7xqqg7Inq7GILntxrHQ0 J1mpeMTMwRtl5dAA== From: "tip-bot2 for Mike Travis" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/platform/uv: Update node present counting Cc: Mike Travis , Borislav Petkov , Dimitri Sivanich , Steve Wahl , x86 , LKML In-Reply-To: <20201005203929.148656-11-mike.travis@hpe.com> References: <20201005203929.148656-11-mike.travis@hpe.com> MIME-Version: 1.0 Message-ID: <160205472130.7002.9651855394776094338.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/platform branch of tip: Commit-ID: d6922effe4f3d5c643c8c05d51a572d6db4c9cb3 Gitweb: https://git.kernel.org/tip/d6922effe4f3d5c643c8c05d51a572d6db4c9cb3 Author: Mike Travis AuthorDate: Mon, 05 Oct 2020 15:39:26 -05:00 Committer: Borislav Petkov CommitterDate: Wed, 07 Oct 2020 09:08:35 +02:00 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 Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-11-mike.travis@hpe.com --- arch/x86/kernel/apic/x2apic_uv_x.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 64a1c59..9b44f45 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -1436,20 +1436,32 @@ static int __init decode_uv_systab(void) /* Set up physical blade translations from UVH_NODE_PRESENT_TABLE */ static __init void boot_init_possible_blades(struct uv_hub_info_s *hub_info) { + unsigned long np; int i, uv_pb = 0; - pr_info("UV: NODE_PRESENT_DEPTH = %d\n", UVH_NODE_PRESENT_TABLE_DEPTH); - for (i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) { - unsigned long np; - - np = uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8); - if (np) + if (UVH_NODE_PRESENT_TABLE) { + pr_info("UV: NODE_PRESENT_DEPTH = %d\n", + UVH_NODE_PRESENT_TABLE_DEPTH); + for (i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) { + np = uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8); pr_info("UV: NODE_PRESENT(%d) = 0x%016lx\n", i, np); - + uv_pb += hweight64(np); + } + } + if (UVH_NODE_PRESENT_0) { + np = uv_read_local_mmr(UVH_NODE_PRESENT_0); + pr_info("UV: NODE_PRESENT_0 = 0x%016lx\n", np); + uv_pb += hweight64(np); + } + if (UVH_NODE_PRESENT_1) { + np = uv_read_local_mmr(UVH_NODE_PRESENT_1); + pr_info("UV: NODE_PRESENT_1 = 0x%016lx\n", np); uv_pb += hweight64(np); } if (uv_possible_blades != uv_pb) uv_possible_blades = uv_pb; + + pr_info("UV: number nodes/possible blades %d\n", uv_pb); } static void __init build_socket_tables(void)