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=-20.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 2C32FC1B0E3 for ; Mon, 7 Dec 2020 22:38:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12414239D1 for ; Mon, 7 Dec 2020 22:38:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727948AbgLGWia (ORCPT ); Mon, 7 Dec 2020 17:38:30 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:39322 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727550AbgLGWi0 (ORCPT ); Mon, 7 Dec 2020 17:38:26 -0500 Date: Mon, 07 Dec 2020 22:37:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607380663; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xBcx+lKmWz+jWcuORdN5ZzXrx+oJgRxfeyHAyf49Aag=; b=O9xH0O7VCf6FS22Me0XrOnOPDJrm58zk1ccqgGcBKWbIbEmtnmGnS4oaFLkXMoyNPBGDTC kxKmCA848mBt0TAWQsZsokNspFaKFisUnNQoruao69jVXY66Tn7/0ZquWgBe/165NskWzv o/HRvVYyoHHvHQT+xCA/WdXZSD5Hf+SVy5ahBSwpGexcJxyk9LvyeS/V3Lrqb8Lcv1IclX mQh0psEvWVe2HUBHJSySq1TcWF6GLd2baxE7RcdvE6KpmkOSYsH75tnTrjiiUOGYi5ybzQ 6H2dJDrEeusuvt+FemT7l42CW2KcgU3qb4yfAlhju3A6JnPKyWgBRzXfFmIetQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607380663; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xBcx+lKmWz+jWcuORdN5ZzXrx+oJgRxfeyHAyf49Aag=; b=1iIP+g4/K8QUGmsTcosfkhlOfqzSVoGZJfGkUoLy2Pfmpo83/pBm3IrQZqJLDKgCQGKwIJ LUh4PqOv4ONT1iCg== From: "tip-bot2 for Mike Travis" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/platform/uv: Add kernel interfaces for obtaining system info Cc: Mike Travis , Borislav Petkov , Steve Wahl , Hans de Goede , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20201128034227.120869-2-mike.travis@hpe.com> References: <20201128034227.120869-2-mike.travis@hpe.com> MIME-Version: 1.0 Message-ID: <160738066295.3364.4859407678343290345.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/platform branch of tip: Commit-ID: a67fffb017aed93fca42ce7aa5b6aaf54ff912ad Gitweb: https://git.kernel.org/tip/a67fffb017aed93fca42ce7aa5b6aaf54ff912ad Author: Mike Travis AuthorDate: Fri, 27 Nov 2020 21:42:23 -06:00 Committer: Borislav Petkov CommitterDate: Mon, 07 Dec 2020 19:44:54 +01:00 x86/platform/uv: Add kernel interfaces for obtaining system info Add kernel interfaces used to obtain info for the uv_sysfs driver to display. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-2-mike.travis@hpe.com --- 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 01ba080..1b6455f 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 1b98f8c..4874603 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;