x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- arch/x86/kernel/uv_sysfs.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kernel/uv_sysfs.c +4 -0
@@ -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_istatic 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);
Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead SGI - Silicon Graphics Inc [email protected]