Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5437710ybe; Tue, 10 Sep 2019 03:47:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuJqoZ84BjA8om+h/WM8cjxwyHFhqJ1B8VVdF890Yotcs+32XDA0qTd+nnb69WrEY8WJpk X-Received: by 2002:a50:ce53:: with SMTP id k19mr29764755edj.2.1568112424176; Tue, 10 Sep 2019 03:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568112424; cv=none; d=google.com; s=arc-20160816; b=jjs8PfwtIiiw83JyvTswuChhKN/f8UgXu5q0Bs5K9ellpicVuY53DoyMKA0sOcATPW phtGXJ0yNSqTbUfufb0CoJ0hJtgJklaGiLIqRkyeFE2Ug8enonUV5d67IKr5ZcL9R/xk OJesNvr+v8MRt5mkDC8O9ukAXERw5bREZFSXm1aIWzUGrQBjFApjvRuS4Ll09Hw+QXOw 6fYdbVQOzEK2hwpxIpx5UU/Amfnq/8Y3lMXncA5BbVJNJ2l2LLnLHHPj4li/xYkYdDz3 YW4Omq9lZsSMatgmlKbu9oBhyKTWV/iQLfrlGz7EI/ngIUXz/l3RdBZctXXhFBWWn351 srmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:subject:to:from:date :user-agent:references:message-id; bh=pAtws41YQ4a7LThzZDzGDw6tXvnKgnhFtclAYrY0siw=; b=aKZDNP0cFpNdWtHsLyhZVbOkLny5GH3vcgmOgeYKS0fyafwVHxf66tR9VXoja5JdSZ 2SpxMy+5vjoigCWVhRoQQk/hhavj2uXxEifWnCMN0jRq3nk7clO8TrhOq64qzqCj0xvo IbYSVvfHbtgYL1MMa7uaSdDlhjmd1er9vnkm378x5Rf3srKIIwj65L/06B8KaXzuJTGq jxp486DpiP6ylfzYarVnz/VgS2BTNPZscadaaoJRkZ+2FAGIQnGa/NVea61oSHW1lPGo YClVAmrpSdHmWMHWjw+vveIPVd0kyjDtOwP6MAlbx7RGQ3LiYYcCmSqDtXdxLHym49oN V+Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si10795413edb.425.2019.09.10.03.46.40; Tue, 10 Sep 2019 03:47:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393143AbfIJEgE (ORCPT + 99 others); Tue, 10 Sep 2019 00:36:04 -0400 Received: from mx0b-002e3701.pphosted.com ([148.163.143.35]:26422 "EHLO mx0b-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390413AbfIJEfv (ORCPT ); Tue, 10 Sep 2019 00:35:51 -0400 Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8A4Urx0024473; Tue, 10 Sep 2019 04:35:27 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 2uwnk2eqq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Sep 2019 04:35:27 +0000 Received: from stormcage.eag.rdlabs.hpecorp.net (stormcage.eag.rdlabs.hpecorp.net [128.162.236.70]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 772FA66; Tue, 10 Sep 2019 04:35:26 +0000 (UTC) Received: by stormcage.eag.rdlabs.hpecorp.net (Postfix, from userid 5508) id C24B3201FCF13; Mon, 9 Sep 2019 23:35:25 -0500 (CDT) Message-Id: <20190910043437.556005805@stormcage.eag.rdlabs.hpecorp.net> References: <20190910043437.021955474@stormcage.eag.rdlabs.hpecorp.net> User-Agent: quilt/0.46-1 Date: Mon, 09 Sep 2019 23:34:43 -0500 From: Mike Travis To: Mike Travis Subject: [PATCH V2 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-10_04:2019-09-09,2019-09-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 adultscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1909100041 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 To: Thomas Gleixner To: Ingo Molnar To: H. Peter Anvin To: Andrew Morton To: Borislav Petkov To: Christoph Hellwig To: Sasha Levin Cc: Dimitri Sivanich Cc: Russ Anderson Cc: Hedi Berriche Cc: Steve Wahl Cc: Justin Ernst Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org --- V2: Removed redundant error message after call to uv_bios_init. Removed redundant error message after call to decode_uv_systab. Clarify selection of UV4 and higher when checking for extended UVsystab in decode_uv_systab(). --- arch/x86/kernel/apic/x2apic_uv_x.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) --- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c +++ linux/arch/x86/kernel/apic/x2apic_uv_x.c @@ -1303,7 +1303,8 @@ static int __init decode_uv_systab(void) struct uv_systab *st; int i; - if (uv_hub_info->hub_revision < UV4_HUB_REVISION_BASE) + /* If system is uv3 or lower, there is no extended UVsystab */ + if (is_uv_hubbed(0xfffffe) < uv(4) && is_uv_hubless(0xfffffe) < uv(4)) return 0; /* No extended UVsystab required */ st = uv_systab; @@ -1554,8 +1555,15 @@ static __init int uv_system_init_hubless /* Init kernel/BIOS interface */ rc = uv_bios_init(); + if (rc < 0) + return rc; - /* Create user access node if UVsystab available */ + /* Process UVsystab */ + rc = decode_uv_systab(); + if (rc < 0) + return rc; + + /* Create user access node */ if (rc >= 0) uv_setup_proc_files(1); --