From: Russ Anderson <rja@sgi.com>
To: linux-next@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Cc: Russ Anderson <rja@sgi.com>
Subject: [patch bugfix] x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems
Date: Fri, 3 Apr 2009 17:09:13 -0500 [thread overview]
Message-ID: <20090403220913.GA21667@sgi.com> (raw)
/sys/firmware/sgi_uv should only be created on uv systems.
Signed-off-by: Russ Anderson <rja@sgi.com>
---
arch/x86/kernel/uv_sysfs.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux/arch/x86/kernel/uv_sysfs.c
===================================================================
--- linux.orig/arch/x86/kernel/uv_sysfs.c 2009-04-03 17:02:45.000000000 -0500
+++ linux/arch/x86/kernel/uv_sysfs.c 2009-04-03 17:02:49.000000000 -0500
@@ -21,6 +21,7 @@
#include <linux/sysdev.h>
#include <asm/uv/bios.h>
+#include <asm/genapic.h>
struct kobject *sgi_uv_kobj;
@@ -46,6 +47,9 @@ static struct kobj_attribute coherence_i
static int __init sgi_uv_sysfs_init(void)
{
unsigned long ret;
+
+ if (!is_uv_system())
+ return -ENODEV;
if (!sgi_uv_kobj)
sgi_uv_kobj = kobject_create_and_add("sgi_uv", firmware_kobj);
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
reply other threads:[~2009-04-03 22:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090403220913.GA21667@sgi.com \
--to=rja@sgi.com \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
/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).