Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1916814pxu; Fri, 27 Nov 2020 20:05:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyspNGqOimNL1F3AXLfj/WHIZT24cns6pjLX6Qv2tmJOYezU+CPQWmNLca7fxl+nEAge0Y9 X-Received: by 2002:a17:906:8058:: with SMTP id x24mr11775586ejw.272.1606536305183; Fri, 27 Nov 2020 20:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606536305; cv=none; d=google.com; s=arc-20160816; b=RQwgmiKZEVGLKWRh9nNX3P2RYTvACRsfPV4n+RArryPoD07Og+t970ZPvZhmKEN6jA IrAMAxNpBQLU9ZkiWz845aPLDiMSfS1acUcfccdtm4jOnpd9rru/DoSo1loMOTpmBFZU g6BJXoL7GF67XghzIjHx8vfPX5Fg1R2TKlxLU9Vrn2grMUyO5rRtQxM0EmiLS3c/sX18 1GA3QlcNRszOWmaVdWVfLeA3RuhKs9MQD6M6pe5flGJsCVhm/W+yysNSkaEN4X/0HmY/ m30sTk7olfQEdv9QhfjSLiBBXSVo5eapoV+u4xpp41UTENA8ZA9Kt+UPeKeNqCQdfvyY XPTg== 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=+oQ5tDT0s75+3qBxLOfxh0HLP+klCcDrGLxiwEJJ1bs=; b=MQBbmKJ+AaYlq+7oSsGL4+zhH9gyeul16kikQuuSVDBAuyz5ifU8M23DR52fzSnO+m pCIJsRS4001NHaaY5gMsru5zX0fp9SOOZvB8LUXU69yFKtax5NERO81PVR4/BY03mSa1 ZCtm6fQNOqiwYdqJCJAZloQBRplpd9X25LCpGhSScoYgWkBlFlyrun1Dl4Hn6NoErsxb Cmb0Y9fFtURtHXPqhfXST63jKaJiZyN4UdsFvzq/9DEp7OHv1Oj+S+0Pc0JHdwPnddeO Wg6hbMKyGS7KBME+HmJxpelXM3tsSUohR4gQ9YPGBfSUyhhDnfXbmV2ONlHV4d9X6Kvv 4wHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=dEWCaPrR; 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 bi9si8053695edb.331.2020.11.27.20.04.40; Fri, 27 Nov 2020 20:05:05 -0800 (PST) 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=dEWCaPrR; 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 S1731299AbgK1D71 (ORCPT + 99 others); Fri, 27 Nov 2020 22:59:27 -0500 Received: from mx0b-002e3701.pphosted.com ([148.163.143.35]:49052 "EHLO mx0b-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731499AbgK1Dnu (ORCPT ); Fri, 27 Nov 2020 22:43:50 -0500 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 0AS3c44Z023890; Sat, 28 Nov 2020 03:42:55 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=+oQ5tDT0s75+3qBxLOfxh0HLP+klCcDrGLxiwEJJ1bs=; b=dEWCaPrRcnqVF5WzUf7nRab0JcD+4gRBfOAof95uUhcBkJ0FXEVa2yIdn0CG8GG5hdMJ 9Pm1MZcG5jqvq+B+wGrRCOat9TuyqoZkCwEP304ROSd4Ei1H/48QXLX8rgEAvTzVvd1d HdQH0ReFpraOTuUq4uDvoU9I7xPBvUa8NMUzliTUqyvari5WGiklKDEYyKO/I2N5E/Aw JTqU2HvA+hf9J4kRxuq9IHQYgILjlm5xUM9zgBGc2RKSwy8qwTtTGwdJzoSe4SmGE9gs 6sXQzqnQFAYJ/fWR7u0syvbN6mnWDRub/VgGLXircFpZqt+EMuE/3fyx7LjymGRL+PkV nw== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 352h7ctnvn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 28 Nov 2020 03:42:55 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 1B50855; Sat, 28 Nov 2020 03:42:53 +0000 (UTC) Received: from dog.eag.rdlabs.hpecorp.net (dog.eag.rdlabs.hpecorp.net [128.162.243.181]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id EC9AA48; Sat, 28 Nov 2020 03:42:52 +0000 (UTC) From: Mike Travis To: Hans de Goede , Justin Ernst , Mark Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Steve Wahl Cc: Mike Travis , Dimitri Sivanich , Russ Anderson , "H. Peter Anvin" , Mauro Carvalho Chehab , Suzuki K Poulose , Ilya Dryomov , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH v2 1/5] x86/platform/uv: Add kernel interfaces for obtaining system info. Date: Fri, 27 Nov 2020 21:42:23 -0600 Message-Id: <20201128034227.120869-2-mike.travis@hpe.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20201128034227.120869-1-mike.travis@hpe.com> References: <20201128034227.120869-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.312,18.0.737 definitions=2020-11-28_02:2020-11-26,2020-11-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 spamscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011280025 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add kernel interfaces used to obtain info for the uv_sysfs driver to display. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl --- arch/x86/include/asm/uv/bios.h | 2 ++ arch/x86/kernel/apic/x2apic_uv_x.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h index 01ba080887b3..1b6455f881f9 100644 --- a/arch/x86/include/asm/uv/bios.h +++ b/arch/x86/include/asm/uv/bios.h @@ -200,6 +200,8 @@ extern long sn_partition_id; extern long sn_coherency_id; extern long sn_region_size; extern long system_serial_number; +extern ssize_t uv_get_archtype(char *buf, int len); +extern int uv_get_hubless_system(void); extern struct kobject *sgi_uv_kobj; /* /sys/firmware/sgi_uv */ diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 1b98f8c12b96..48746031b39a 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -502,6 +502,18 @@ enum uv_system_type get_uv_system_type(void) return uv_system_type; } +int uv_get_hubless_system(void) +{ + return uv_hubless_system; +} +EXPORT_SYMBOL_GPL(uv_get_hubless_system); + +ssize_t uv_get_archtype(char *buf, int len) +{ + return scnprintf(buf, len, "%s/%s", uv_archtype, oem_table_id); +} +EXPORT_SYMBOL_GPL(uv_get_archtype); + int is_uv_system(void) { return uv_system_type != UV_NONE; -- 2.21.0