linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Travis <mike.travis@hpe.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Justin Ernst <justin.ernst@hpe.com>,
	Mark Gross <mgross@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, Steve Wahl <steve.wahl@hpe.com>
Cc: Mike Travis <mike.travis@hpe.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Ilya Dryomov <idryomov@gmail.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH 1/5] x86/platform/uv: Add kernel interfaces for obtaining system info.
Date: Wed, 25 Nov 2020 11:29:03 -0600	[thread overview]
Message-ID: <20201125172907.240996-2-mike.travis@hpe.com> (raw)
In-Reply-To: <20201125172907.240996-1-mike.travis@hpe.com>

Add kernel interfaces used to obtain info for the uv_sysfs driver
to display.

Signed-off-by: Mike Travis <mike.travis@hpe.com>
Reviewed-by: Steve Wahl <steve.wahl@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 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


  reply	other threads:[~2020-11-25 17:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 17:29 [PATCH 0/5] x86/platform/uv: Move UV procfs leaves to sysfs Mike Travis
2020-11-25 17:29 ` Mike Travis [this message]
2020-11-25 17:29 ` [PATCH 2/5] x86/platform/uv: Add sysfs leaves to replace those in procfs Mike Travis
2020-11-25 17:29 ` [PATCH 3/5] x86/platform/uv: Add sysfs hubless leaves Mike Travis
2020-11-25 17:29 ` [PATCH 4/5] x86/platform/uv: Add deprecated messages to /proc info leaves Mike Travis
2020-11-26 10:45   ` Hans de Goede
2020-11-27 14:58     ` Mike Travis
2020-11-27 18:06       ` Hans de Goede
2020-11-25 17:29 ` [PATCH 5/5] x86/platform/uv: Update sysfs document file Mike Travis
2020-11-26 10:44 ` [PATCH 0/5] x86/platform/uv: Move UV procfs leaves to sysfs Hans de Goede
2020-11-27 14:41   ` Mike Travis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201125172907.240996-2-mike.travis@hpe.com \
    --to=mike.travis@hpe.com \
    --cc=bp@alien8.de \
    --cc=dimitri.sivanich@hpe.com \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=idryomov@gmail.com \
    --cc=justin.ernst@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).