All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch bugfix (take 2)] x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems
@ 2009-04-03 22:24 Russ Anderson
  2009-04-08 13:00 ` [tip:x86/uv] " Russ Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: Russ Anderson @ 2009-04-03 22:24 UTC (permalink / raw)
  To: linux-next, Ingo Molnar; +Cc: Russ Anderson

/sys/firmware/sgi_uv should only be created on uv systems.

Signed-off-by: Russ Anderson <rja@sgi.com>

---
The previous patch was an old version.  


 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:16:57.000000000 -0500
+++ linux/arch/x86/kernel/uv_sysfs.c	2009-04-03 17:17:25.000000000 -0500
@@ -21,6 +21,7 @@
 
 #include <linux/sysdev.h>
 #include <asm/uv/bios.h>
+#include <asm/uv/uv.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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/uv] x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems
  2009-04-03 22:24 [patch bugfix (take 2)] x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems Russ Anderson
@ 2009-04-08 13:00 ` Russ Anderson
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Anderson @ 2009-04-08 13:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, rja, hpa, mingo, tglx, mingo

Commit-ID:  06aa05b307e8efbc278f201198e7cdf3877bc5c2
Gitweb:     http://git.kernel.org/tip/06aa05b307e8efbc278f201198e7cdf3877bc5c2
Author:     Russ Anderson <rja@sgi.com>
AuthorDate: Fri, 3 Apr 2009 17:24:23 -0500
Committer:  Ingo Molnar <mingo@elte.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@sgi.com>
LKML-Reference: <20090403222423.GA28546@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.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) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-08 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03 22:24 [patch bugfix (take 2)] x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems Russ Anderson
2009-04-08 13:00 ` [tip:x86/uv] " Russ Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.