aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/kernel/setup.c15
-rw-r--r--arch/arm/mm/alignment.c6
3 files changed, 19 insertions, 6 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c2238cd474c7..b224216c11db 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -52,6 +52,9 @@ config HAVE_TCM
52 bool 52 bool
53 select GENERIC_ALLOCATOR 53 select GENERIC_ALLOCATOR
54 54
55config HAVE_PROC_CPU
56 bool
57
55config NO_IOPORT 58config NO_IOPORT
56 bool 59 bool
57 60
@@ -1229,6 +1232,7 @@ config ALIGNMENT_TRAP
1229 bool 1232 bool
1230 depends on CPU_CP15_MMU 1233 depends on CPU_CP15_MMU
1231 default y if !ARCH_EBSA110 1234 default y if !ARCH_EBSA110
1235 select HAVE_PROC_CPU if PROC_FS
1232 help 1236 help
1233 ARM processors cannot fetch/store information which is not 1237 ARM processors cannot fetch/store information which is not
1234 naturally aligned on the bus, i.e., a 4 byte fetch must start at an 1238 naturally aligned on the bus, i.e., a 4 byte fetch must start at an
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index c6c57b640b6b..5357e48f2c39 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -24,6 +24,7 @@
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/proc_fs.h>
27 28
28#include <asm/unified.h> 29#include <asm/unified.h>
29#include <asm/cpu.h> 30#include <asm/cpu.h>
@@ -782,9 +783,21 @@ static int __init topology_init(void)
782 783
783 return 0; 784 return 0;
784} 785}
785
786subsys_initcall(topology_init); 786subsys_initcall(topology_init);
787 787
788#ifdef CONFIG_HAVE_PROC_CPU
789static int __init proc_cpu_init(void)
790{
791 struct proc_dir_entry *res;
792
793 res = proc_mkdir("cpu", NULL);
794 if (!res)
795 return -ENOMEM;
796 return 0;
797}
798fs_initcall(proc_cpu_init);
799#endif
800
788static const char *hwcap_str[] = { 801static const char *hwcap_str[] = {
789 "swp", 802 "swp",
790 "half", 803 "half",
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index b270d6228fe2..0c5eb6983cef 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -898,11 +898,7 @@ static int __init alignment_init(void)
898#ifdef CONFIG_PROC_FS 898#ifdef CONFIG_PROC_FS
899 struct proc_dir_entry *res; 899 struct proc_dir_entry *res;
900 900
901 res = proc_mkdir("cpu", NULL); 901 res = create_proc_entry("cpu/alignment", S_IWUSR | S_IRUGO, NULL);
902 if (!res)
903 return -ENOMEM;
904
905 res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, res);
906 if (!res) 902 if (!res)
907 return -ENOMEM; 903 return -ENOMEM;
908 904