From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5331AC3A59E for ; Tue, 3 Sep 2019 00:19:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 323B1216C8 for ; Tue, 3 Sep 2019 00:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728126AbfICATH (ORCPT ); Mon, 2 Sep 2019 20:19:07 -0400 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:64566 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727814AbfICASf (ORCPT ); Mon, 2 Sep 2019 20:18:35 -0400 Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x83075tQ006774; Tue, 3 Sep 2019 00:18:17 GMT Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0a-002e3701.pphosted.com with ESMTP id 2ur2gebyns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Sep 2019 00:18:17 +0000 Received: from stormcage.eag.rdlabs.hpecorp.net (unknown [128.162.236.70]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id C370792; Tue, 3 Sep 2019 00:18:16 +0000 (UTC) Received: by stormcage.eag.rdlabs.hpecorp.net (Postfix, from userid 5508) id 87F16201E92B3; Mon, 2 Sep 2019 19:18:16 -0500 (CDT) Message-Id: <20190903001816.427611357@stormcage.eag.rdlabs.hpecorp.net> References: <20190903001815.504418099@stormcage.eag.rdlabs.hpecorp.net> User-Agent: quilt/0.46-1 Date: Mon, 02 Sep 2019 19:18:21 -0500 From: Mike Travis To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Morton , Borislav Petkov Cc: Dimitri Sivanich , Russ Anderson , Hedi Berriche , Steve Wahl , x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 6/8] x86/platform/uv: Decode UVsystab Info Content-Disposition: inline; filename=decode-hubless-uvst X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-02_10:2019-08-29,2019-09-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 mlxlogscore=921 mlxscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 adultscore=0 malwarescore=0 spamscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1909030000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Decode the hubless UVsystab passed from BIOS to the kernel saving pertinent info in a similar manner that hubbed UVsystabs are decoded. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich --- arch/x86/kernel/apic/x2apic_uv_x.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) --- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c +++ linux/arch/x86/kernel/apic/x2apic_uv_x.c @@ -1323,7 +1323,8 @@ static int __init decode_uv_systab(void) struct uv_systab *st; int i; - if (uv_hub_info->hub_revision < UV4_HUB_REVISION_BASE) + /* Select only UV4 (hubbed or hubless) and higher */ + if (is_uv_hubbed(-2) < uv(4) && is_uv_hubless(-2) < uv(4)) return 0; /* No extended UVsystab required */ st = uv_systab; @@ -1574,8 +1575,19 @@ static __init int uv_system_init_hubless /* Init kernel/BIOS interface */ rc = uv_bios_init(); + if (rc < 0) { + pr_err("UV: BIOS init error:%d\n", rc); + return rc; + } + + /* Process UVsystab */ + rc = decode_uv_systab(); + if (rc < 0) { + pr_err("UV: UVsystab decode error:%d\n", rc); + return rc; + } - /* Create user access node if UVsystab available */ + /* Create user access node */ if (rc >= 0) uv_setup_proc_files(1); --