From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russ Anderson 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 Message-ID: <20090403220913.GA21667@sgi.com> Reply-To: Russ Anderson Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from relay1.sgi.com ([192.48.179.29]:47813 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753495AbZDCWJR (ORCPT ); Fri, 3 Apr 2009 18:09:17 -0400 Content-Disposition: inline Sender: linux-next-owner@vger.kernel.org List-ID: To: linux-next@vger.kernel.org, Ingo Molnar Cc: Russ Anderson /sys/firmware/sgi_uv should only be created on uv systems. Signed-off-by: Russ Anderson --- 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 #include +#include 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