Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5437411ybe; Tue, 10 Sep 2019 03:46:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyh+dZ0wUhoRSvVYBmS+09FAeeS1xVSeMsoL8WUzSKfrZ/Awg6EfEgj/hCeONUuzciUKeB X-Received: by 2002:a17:906:1317:: with SMTP id w23mr23684597ejb.312.1568112404531; Tue, 10 Sep 2019 03:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568112404; cv=none; d=google.com; s=arc-20160816; b=lfrso4NN8ht4uPFpfKh5kg34zEct/U5e0/CD2GAMSo8mKEkujUjzpbc6lzqs/6eTdM KxgUh+TJ7hDX9xubJeuidDblQwnXOwVZd1iUvskNZLMfZe8EtGdZcCTvbsNkTybv43yD 5RG9QwSIYw22v5ftd4jBoN6BRcdu3SzeJrZY9/iiy0gFgQ/D65V2XxV6Nm96u0Vfqy6Z cFwVPBOgFYHHcmpqAmJO/gBnYyJemuuxv32kJ6HnsTEG4tftxF3HuQIjGGAlCtAXzfX1 y4Gq44dhBKGW70J8R6WPnpPabzOYexaiD86zZ8WKrhBUlK06ShdQrRG8Udt+80F0NtTF PY0g== 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=WUG4XVp79eRPEOKBXUr4N2AYNE729poME4Ok/wQcS/I=; b=qPF9PIbrpJg/ez2abWA9ajOD1m/3gB1L0A+MPueffN2Hyoh7dd6M5w6ym2vrrI99us 7MLhu/ypz/dTCj9fSZixhkCJ7wtdYM/gUJasgkyCmMTpE2myHCQdB8EL7eB9YwxA8U1C TFPmIf6MZBbPq4D+a0lEocgfmDXqOThlLd9WzzodOcKNGwITUUx5TzGkU7fmVZHz3goK fONr6p9mHec3I7UHFRVT60eseenWri9K3Cj3/9omtnBeNcE5ZplFRTCsajHdLA7TTA4K QnbehHPxjh8nrY2Kt9sBsfwMJEijvlVx1KF9haEoQUPPriH2r4K1h9mtru8X519qj2E1 rpqg== 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 b8si9560690ejv.106.2019.09.10.03.46.20; Tue, 10 Sep 2019 03:46:44 -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 S2393112AbfIJEfy (ORCPT + 99 others); Tue, 10 Sep 2019 00:35:54 -0400 Received: from mx0b-002e3701.pphosted.com ([148.163.143.35]:1112 "EHLO mx0b-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390382AbfIJEfv (ORCPT ); Tue, 10 Sep 2019 00:35:51 -0400 Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8A4UrO5025051; Tue, 10 Sep 2019 04:35:27 GMT Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 2ux1w0har0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Sep 2019 04:35:26 +0000 Received: from stormcage.eag.rdlabs.hpecorp.net (stormcage.eag.rdlabs.hpecorp.net [128.162.236.70]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 041955D; Tue, 10 Sep 2019 04:35:26 +0000 (UTC) Received: by stormcage.eag.rdlabs.hpecorp.net (Postfix, from userid 5508) id AF4C5201FCE79; Mon, 9 Sep 2019 23:35:25 -0500 (CDT) Message-Id: <20190910043437.314008707@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:40 -0500 From: Mike Travis To: Mike Travis Subject: [PATCH 3/8] x86/platform/uv: Add return code to UV BIOS Init function Content-Disposition: inline; filename=add-bios_init-rc 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 mlxlogscore=999 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 clxscore=1015 impostorscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=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 Add a return code to the UV BIOS init function that indicates the successful initialization of the kernel/BIOS callback interface. 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 --- arch/x86/include/asm/uv/bios.h | 2 +- arch/x86/platform/uv/bios_uv.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) --- linux.orig/arch/x86/include/asm/uv/bios.h +++ linux/arch/x86/include/asm/uv/bios.h @@ -138,7 +138,7 @@ extern s64 uv_bios_change_memprotect(u64 extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *); extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus); -extern void uv_bios_init(void); +extern int uv_bios_init(void); extern unsigned long sn_rtc_cycles_per_second; extern int uv_type; --- linux.orig/arch/x86/platform/uv/bios_uv.c +++ linux/arch/x86/platform/uv/bios_uv.c @@ -184,20 +184,20 @@ int uv_bios_set_legacy_vga_target(bool d } EXPORT_SYMBOL_GPL(uv_bios_set_legacy_vga_target); -void uv_bios_init(void) +int uv_bios_init(void) { uv_systab = NULL; if ((uv_systab_phys == EFI_INVALID_TABLE_ADDR) || !uv_systab_phys || efi_runtime_disabled()) { pr_crit("UV: UVsystab: missing\n"); - return; + return -EEXIST; } uv_systab = ioremap(uv_systab_phys, sizeof(struct uv_systab)); if (!uv_systab || strncmp(uv_systab->signature, UV_SYSTAB_SIG, 4)) { pr_err("UV: UVsystab: bad signature!\n"); iounmap(uv_systab); - return; + return -EINVAL; } /* Starting with UV4 the UV systab size is variable */ @@ -208,8 +208,9 @@ void uv_bios_init(void) uv_systab = ioremap(uv_systab_phys, size); if (!uv_systab) { pr_err("UV: UVsystab: ioremap(%d) failed!\n", size); - return; + return -EFAULT; } } pr_info("UV: UVsystab: Revision:%x\n", uv_systab->revision); + return 0; } --