[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-06aa05b307e8efbc278f201198e7cdf3877bc5c2@git.kernel.org>
Date: Wed, 8 Apr 2009 13:00:55 GMT
From: Russ Anderson <rja@....com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, rja@....com, hpa@...or.com,
mingo@...hat.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:x86/uv] x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems
Commit-ID: 06aa05b307e8efbc278f201198e7cdf3877bc5c2
Gitweb: http://git.kernel.org/tip/06aa05b307e8efbc278f201198e7cdf3877bc5c2
Author: Russ Anderson <rja@....com>
AuthorDate: Fri, 3 Apr 2009 17:24:23 -0500
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 8 Apr 2009 14:58:10 +0200
x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems
/sys/firmware/sgi_uv should only be created on uv systems.
Signed-off-by: Russ Anderson <rja@....com>
LKML-Reference: <20090403222423.GA28546@....com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/kernel/uv_sysfs.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/uv_sysfs.c b/arch/x86/kernel/uv_sysfs.c
index 67f9b9d..36afb98 100644
--- a/arch/x86/kernel/uv_sysfs.c
+++ b/arch/x86/kernel/uv_sysfs.c
@@ -21,6 +21,7 @@
#include <linux/sysdev.h>
#include <asm/uv/bios.h>
+#include <asm/uv/uv.h>
struct kobject *sgi_uv_kobj;
@@ -47,6 +48,9 @@ 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);
if (!sgi_uv_kobj) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists