From 50c874fa55ff36edf33a9aa1eeb139b11bf2ac19 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 10 Jan 2010 17:23:29 +0000 Subject: [PATCH] --- yaml --- r: 183011 b: refs/heads/master c: e119bfff1f102f8d1505910cd6c09df55c776b43 h: refs/heads/master i: 183009: a72c6ca59e0f2d9d1cd8071ee35c5e7dc599cbba 183007: 03a2cd16a78e2a4529945c1a179deaba82d25692 v: v3 --- [refs] | 2 +- trunk/arch/arm/Kconfig | 4 ++++ trunk/arch/arm/kernel/setup.c | 15 ++++++++++++++- trunk/arch/arm/mm/alignment.c | 6 +----- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index a7c51c2b4c6e..3c0ba8773d8c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 373b32abf9b33616ad94283461bb2ab49e8371d5 +refs/heads/master: e119bfff1f102f8d1505910cd6c09df55c776b43 diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index c2238cd474c7..b224216c11db 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -52,6 +52,9 @@ config HAVE_TCM bool select GENERIC_ALLOCATOR +config HAVE_PROC_CPU + bool + config NO_IOPORT bool @@ -1229,6 +1232,7 @@ config ALIGNMENT_TRAP bool depends on CPU_CP15_MMU default y if !ARCH_EBSA110 + select HAVE_PROC_CPU if PROC_FS help ARM processors cannot fetch/store information which is not naturally aligned on the bus, i.e., a 4 byte fetch must start at an diff --git a/trunk/arch/arm/kernel/setup.c b/trunk/arch/arm/kernel/setup.c index c6c57b640b6b..5357e48f2c39 100644 --- a/trunk/arch/arm/kernel/setup.c +++ b/trunk/arch/arm/kernel/setup.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -782,9 +783,21 @@ static int __init topology_init(void) return 0; } - 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[] = { "swp", "half", diff --git a/trunk/arch/arm/mm/alignment.c b/trunk/arch/arm/mm/alignment.c index b270d6228fe2..0c5eb6983cef 100644 --- a/trunk/arch/arm/mm/alignment.c +++ b/trunk/arch/arm/mm/alignment.c @@ -898,11 +898,7 @@ static int __init alignment_init(void) #ifdef CONFIG_PROC_FS struct proc_dir_entry *res; - res = proc_mkdir("cpu", NULL); - if (!res) - return -ENOMEM; - - res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, res); + res = create_proc_entry("cpu/alignment", S_IWUSR | S_IRUGO, NULL); if (!res) return -ENOMEM;