x86, UV: fix redundant creation of sgi_uv
authorCliff Wickman <cpw@sgi.com>
Mon, 10 Nov 2008 22:16:31 +0000 (16:16 -0600)
committerIngo Molnar <mingo@elte.hu>
Tue, 11 Nov 2008 10:38:50 +0000 (11:38 +0100)
Impact: fix double entry creation in /proc

There is a collision between two UV functions:
  both uv_ptc_init() and gru_proc_init() try to make /proc/sgi_uv

So move it's creation to a single place: uv_system_init()

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/genx2apic_uv_x.c
arch/x86/kernel/tlb_uv.c
drivers/misc/sgi-gru/gruprocfs.c

index 85fb7dd48f6714969848222aa7c968b3c726b962..d7213a1cb784855f27a491dc7887826acde4ca28 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/hardirq.h>
 #include <linux/timer.h>
+#include <linux/proc_fs.h>
 #include <asm/current.h>
 #include <asm/smp.h>
 #include <asm/ipi.h>
@@ -570,4 +571,5 @@ void __init uv_system_init(void)
 
        uv_cpu_init();
        uv_scir_register_cpu_notifier();
+       proc_mkdir("sgi_uv", NULL);
 }
index 04431f34fd16f24946bb66b4eedf69ed7e51cf6f..6a00e5faaa74375d5b709488a0b9c371c3fe5c79 100644 (file)
@@ -566,14 +566,10 @@ static int __init uv_ptc_init(void)
        if (!is_uv_system())
                return 0;
 
-       if (!proc_mkdir("sgi_uv", NULL))
-               return -EINVAL;
-
        proc_uv_ptc = create_proc_entry(UV_PTC_BASENAME, 0444, NULL);
        if (!proc_uv_ptc) {
                printk(KERN_ERR "unable to create %s proc entry\n",
                       UV_PTC_BASENAME);
-               remove_proc_entry("sgi_uv", NULL);
                return -EINVAL;
        }
        proc_uv_ptc->proc_fops = &proc_uv_ptc_operations;
index 533923f83f1aa061635571b86934ad2715014be7..73b0ca061bb567401cc4d30a145c9daf05e72160 100644 (file)
@@ -317,7 +317,6 @@ int gru_proc_init(void)
 {
        struct proc_entry *p;
 
-       proc_mkdir("sgi_uv", NULL);
        proc_gru = proc_mkdir("sgi_uv/gru", NULL);
 
        for (p = proc_files; p->name; p++)