Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp904409pxk; Thu, 1 Oct 2020 17:28:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5lMdCdBUIS+31Wc2/gCJYVjzYlIv5Yfk8crZrGkpESPe9W4AL1ChLSOzCAAtSW+W8WydO X-Received: by 2002:a17:906:9353:: with SMTP id p19mr10725782ejw.403.1601598536247; Thu, 01 Oct 2020 17:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601598536; cv=none; d=google.com; s=arc-20160816; b=jRES+YtLN5rtXDkdue8EMX6b1Gkun64idUhzwFXFkAzwYbNWQSVtLxnaxzeojvLUS0 oAL56s/QA2UJkp127Z1nyMLVcCIFMz+VLJBmT4+9ra0H8kstTbXni2ki2Yrr0dTLcRjl 4xmH2cWjsVVVgYBomDK8jfhNRTVj6CWGJm8hmWHfHGEWHoyRv3D04KlJUp5KlFSOt4uH bwM5dgylQEF5FRENsv/CZn+VaDZXtipbyF4p1sqqiPtWcHYPgGe/IgZkohcNMnoB3YAo HGAYrWq42IYmiCNar5awsHGovSiq/T6BdI/yMjHMxdAtYxXpsAG+LujwmMVmzCYnFKvp TSFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Aoeqn22G440bnbanLomVbjrQ2aFrt/xX5RhLSdlV0dE=; b=0sJk+Kqi4LWyuocYoi31GM3GdniEQr7i7UsUV65Vpe42fAJP4wkYmUkTMhMiWVbmgV 7Q0f/oedZpF3/ZOPtkRrAiVoRba3pnHuOjoKWRKclTIYYcj/Ms5Sk1N89nmetZR0/aFJ Xe94Qq3ryBUALmwSR4zJhs+7YmgYWVx1F9Fgn1LSsfCWYnrHEuFnTFC4vEgo3u2ZnC5D 2OyQ9Lb78++e6FF/5A8tRcicz0DbORMfgDAjqGnbaTIUsmJ3BJDEJ8ghgDcVcIgjcOBA eyPk5mv0CsnAvlj5dXTAGJCKd5KBXGV/qCYZvI7r1gg1pNKIgx4nrP5SiFjrgng6TJbx 7Xmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=pHkHD0j6; 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=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si795758ejv.268.2020.10.01.17.28.33; Thu, 01 Oct 2020 17:28:56 -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=@hpe.com header.s=pps0720 header.b=pHkHD0j6; 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=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733249AbgJBAZ1 (ORCPT + 99 others); Thu, 1 Oct 2020 20:25:27 -0400 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:49342 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgJBAZ1 (ORCPT ); Thu, 1 Oct 2020 20:25:27 -0400 Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091NwPDK020704; Fri, 2 Oct 2020 00:06:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=Aoeqn22G440bnbanLomVbjrQ2aFrt/xX5RhLSdlV0dE=; b=pHkHD0j6v2BAsZqRnssu+PhdFSg6fHHZnodRyBx3ltAk2QiGiCu+fvQ4Mwhr1rXLrMee YyHLriZAhI8BGcQgjq/IoHb/JwFPkGXx0Og+x9/gxfYLBRpnN7tId6HW0MpQduGjvY4N QlNFP7vHxVvsJKqHexqPaw1u37Fcv+xLhFMQDeHbmFos5OeycxGTSM7TVlV9kI4mRLee uUARdgy7+F1xTn7/ceaJaPWnenUlYgMt2Zb5C9NfbQqa1jbRH03wbgfSAY/E26S+4If9 ogWluWBGy4oU1G0wmA6v8G8xIU5BNbEWX6nTlMXr788r4/PFksK1/jNNVZuuwaguuRyY DA== Received: from g2t2354.austin.hpe.com (g2t2354.austin.hpe.com [15.233.44.27]) by mx0a-002e3701.pphosted.com with ESMTP id 33vtr168ae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Oct 2020 00:06:31 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2354.austin.hpe.com (Postfix) with ESMTP id AD24DA8; Fri, 2 Oct 2020 00:06:30 +0000 (UTC) Received: from dog.eag.rdlabs.hpecorp.net (dog.eag.rdlabs.hpecorp.net [128.162.243.181]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 91FC937; Fri, 2 Oct 2020 00:06:29 +0000 (UTC) From: Mike Travis To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Steve Wahl , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Dimitri Sivanich , Arnd Bergmann , Greg Kroah-Hartman Cc: Mike Travis , "H. Peter Anvin" , Russ Anderson , Darren Hart , Andy Shevchenko , Alexandre Chartre , Jian Cai , Vitaly Kuznetsov , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH v3 10/13] x86/platform/uv: Update Node Present Counting Date: Thu, 1 Oct 2020 19:05:35 -0500 Message-Id: <20201002000538.94424-11-mike.travis@hpe.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20201002000538.94424-1-mike.travis@hpe.com> References: <20201002000538.94424-1-mike.travis@hpe.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-01_10:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 bulkscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 malwarescore=0 suspectscore=0 spamscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010194 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl --- 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 678001ff789d..0e40f4866bc3 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -1441,20 +1441,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) -- 2.21.0