Commit a3d732f9 authored by Cliff Wickman's avatar Cliff Wickman Committed by Ingo Molnar

x86, UV: fix redundant creation of sgi_uv

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: default avatarCliff Wickman <cpw@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 7d9d1f25
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/proc_fs.h>
#include <asm/current.h> #include <asm/current.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/ipi.h> #include <asm/ipi.h>
...@@ -570,4 +571,5 @@ void __init uv_system_init(void) ...@@ -570,4 +571,5 @@ void __init uv_system_init(void)
uv_cpu_init(); uv_cpu_init();
uv_scir_register_cpu_notifier(); uv_scir_register_cpu_notifier();
proc_mkdir("sgi_uv", NULL);
} }
...@@ -566,14 +566,10 @@ static int __init uv_ptc_init(void) ...@@ -566,14 +566,10 @@ static int __init uv_ptc_init(void)
if (!is_uv_system()) if (!is_uv_system())
return 0; return 0;
if (!proc_mkdir("sgi_uv", NULL))
return -EINVAL;
proc_uv_ptc = create_proc_entry(UV_PTC_BASENAME, 0444, NULL); proc_uv_ptc = create_proc_entry(UV_PTC_BASENAME, 0444, NULL);
if (!proc_uv_ptc) { if (!proc_uv_ptc) {
printk(KERN_ERR "unable to create %s proc entry\n", printk(KERN_ERR "unable to create %s proc entry\n",
UV_PTC_BASENAME); UV_PTC_BASENAME);
remove_proc_entry("sgi_uv", NULL);
return -EINVAL; return -EINVAL;
} }
proc_uv_ptc->proc_fops = &proc_uv_ptc_operations; proc_uv_ptc->proc_fops = &proc_uv_ptc_operations;
......
...@@ -317,7 +317,6 @@ int gru_proc_init(void) ...@@ -317,7 +317,6 @@ int gru_proc_init(void)
{ {
struct proc_entry *p; struct proc_entry *p;
proc_mkdir("sgi_uv", NULL);
proc_gru = proc_mkdir("sgi_uv/gru", NULL); proc_gru = proc_mkdir("sgi_uv/gru", NULL);
for (p = proc_files; p->name; p++) for (p = proc_files; p->name; p++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment