ARM: Move creation of /proc/cpu out of alignment.c
Always creating this directory avoids other users having to jump through silly hoops when they want to share this directory. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@@ -52,6 +52,9 @@ config HAVE_TCM
|
|||||||
bool
|
bool
|
||||||
select GENERIC_ALLOCATOR
|
select GENERIC_ALLOCATOR
|
||||||
|
|
||||||
|
config HAVE_PROC_CPU
|
||||||
|
bool
|
||||||
|
|
||||||
config NO_IOPORT
|
config NO_IOPORT
|
||||||
bool
|
bool
|
||||||
|
|
||||||
@@ -1229,6 +1232,7 @@ config ALIGNMENT_TRAP
|
|||||||
bool
|
bool
|
||||||
depends on CPU_CP15_MMU
|
depends on CPU_CP15_MMU
|
||||||
default y if !ARCH_EBSA110
|
default y if !ARCH_EBSA110
|
||||||
|
select HAVE_PROC_CPU if PROC_FS
|
||||||
help
|
help
|
||||||
ARM processors cannot fetch/store information which is not
|
ARM processors cannot fetch/store information which is not
|
||||||
naturally aligned on the bus, i.e., a 4 byte fetch must start at an
|
naturally aligned on the bus, i.e., a 4 byte fetch must start at an
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#include <linux/proc_fs.h>
|
||||||
|
|
||||||
#include <asm/unified.h>
|
#include <asm/unified.h>
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
@@ -782,9 +783,21 @@ static int __init topology_init(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
subsys_initcall(topology_init);
|
subsys_initcall(topology_init);
|
||||||
|
|
||||||
|
#ifdef CONFIG_HAVE_PROC_CPU
|
||||||
|
static int __init proc_cpu_init(void)
|
||||||
|
{
|
||||||
|
struct proc_dir_entry *res;
|
||||||
|
|
||||||
|
res = proc_mkdir("cpu", NULL);
|
||||||
|
if (!res)
|
||||||
|
return -ENOMEM;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
fs_initcall(proc_cpu_init);
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *hwcap_str[] = {
|
static const char *hwcap_str[] = {
|
||||||
"swp",
|
"swp",
|
||||||
"half",
|
"half",
|
||||||
|
@@ -898,11 +898,7 @@ static int __init alignment_init(void)
|
|||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
struct proc_dir_entry *res;
|
struct proc_dir_entry *res;
|
||||||
|
|
||||||
res = proc_mkdir("cpu", NULL);
|
res = create_proc_entry("cpu/alignment", S_IWUSR | S_IRUGO, NULL);
|
||||||
if (!res)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, res);
|
|
||||||
if (!res)
|
if (!res)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user