aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-01-06 17:40:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:11 -0500
commitf1883f86dea84fe47a71a39fc1afccc005915ed8 (patch)
tree357c50d2eb44e9e62c39c0c1025bae7b2b6eba67
parenteaccbfa564e48c87626594511f42dc8c0ad2daae (diff)
Remove remaining unwinder code
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Gabor Gombas <gombasg@sztaki.hu> Cc: Jan Beulich <jbeulich@novell.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@elte.hu>, Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/x86/include/asm/unwind.h13
-rw-r--r--arch/x86/kernel/traps.c2
-rw-r--r--include/linux/module.h3
-rw-r--r--include/linux/unwind.h68
-rw-r--r--init/main.c3
-rw-r--r--kernel/module.c15
-rw-r--r--lib/fault-inject.c1
7 files changed, 0 insertions, 105 deletions
diff --git a/arch/x86/include/asm/unwind.h b/arch/x86/include/asm/unwind.h
deleted file mode 100644
index 8b064bd9c55..00000000000
--- a/arch/x86/include/asm/unwind.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_X86_UNWIND_H
2#define _ASM_X86_UNWIND_H
3
4#define UNW_PC(frame) ((void)(frame), 0UL)
5#define UNW_SP(frame) ((void)(frame), 0UL)
6#define UNW_FP(frame) ((void)(frame), 0UL)
7
8static inline int arch_unw_user_mode(const void *info)
9{
10 return 0;
11}
12
13#endif /* _ASM_X86_UNWIND_H */
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index ce6650eb64e..c9a666cdd3d 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -20,7 +20,6 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/ptrace.h> 21#include <linux/ptrace.h>
22#include <linux/string.h> 22#include <linux/string.h>
23#include <linux/unwind.h>
24#include <linux/delay.h> 23#include <linux/delay.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/kexec.h> 25#include <linux/kexec.h>
@@ -51,7 +50,6 @@
51#include <asm/debugreg.h> 50#include <asm/debugreg.h>
52#include <asm/atomic.h> 51#include <asm/atomic.h>
53#include <asm/system.h> 52#include <asm/system.h>
54#include <asm/unwind.h>
55#include <asm/traps.h> 53#include <asm/traps.h>
56#include <asm/desc.h> 54#include <asm/desc.h>
57#include <asm/i387.h> 55#include <asm/i387.h>
diff --git a/include/linux/module.h b/include/linux/module.h
index 3bfed013350..03cb93d1865 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -294,9 +294,6 @@ struct module
294 /* The size of the executable code in each section. */ 294 /* The size of the executable code in each section. */
295 unsigned int init_text_size, core_text_size; 295 unsigned int init_text_size, core_text_size;
296 296
297 /* The handle returned from unwind_add_table. */
298 void *unwind_info;
299
300 /* Arch-specific module values */ 297 /* Arch-specific module values */
301 struct mod_arch_specific arch; 298 struct mod_arch_specific arch;
302 299
diff --git a/include/linux/unwind.h b/include/linux/unwind.h
deleted file mode 100644
index 7760860fa17..00000000000
--- a/include/linux/unwind.h
+++ /dev/null
@@ -1,68 +0,0 @@
1#ifndef _LINUX_UNWIND_H
2#define _LINUX_UNWIND_H
3
4/*
5 * Copyright (C) 2002-2006 Novell, Inc.
6 * Jan Beulich <jbeulich@novell.com>
7 * This code is released under version 2 of the GNU GPL.
8 *
9 * A simple API for unwinding kernel stacks. This is used for
10 * debugging and error reporting purposes. The kernel doesn't need
11 * full-blown stack unwinding with all the bells and whistles, so there
12 * is not much point in implementing the full Dwarf2 unwind API.
13 */
14
15struct module;
16
17struct unwind_frame_info {};
18
19static inline void unwind_init(void) {}
20static inline void unwind_setup(void) {}
21
22#ifdef CONFIG_MODULES
23
24static inline void *unwind_add_table(struct module *mod,
25 const void *table_start,
26 unsigned long table_size)
27{
28 return NULL;
29}
30
31static inline void unwind_remove_table(void *handle, int init_only)
32{
33}
34
35#endif
36
37static inline int unwind_init_frame_info(struct unwind_frame_info *info,
38 struct task_struct *tsk,
39 const struct pt_regs *regs)
40{
41 return -ENOSYS;
42}
43
44static inline int unwind_init_blocked(struct unwind_frame_info *info,
45 struct task_struct *tsk)
46{
47 return -ENOSYS;
48}
49
50static inline int unwind_init_running(struct unwind_frame_info *info,
51 asmlinkage int (*cb)(struct unwind_frame_info *,
52 void *arg),
53 void *arg)
54{
55 return -ENOSYS;
56}
57
58static inline int unwind(struct unwind_frame_info *info)
59{
60 return -ENOSYS;
61}
62
63static inline int unwind_to_user(struct unwind_frame_info *info)
64{
65 return -ENOSYS;
66}
67
68#endif /* _LINUX_UNWIND_H */
diff --git a/init/main.c b/init/main.c
index 90926dadc20..e119dd28dd7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -50,7 +50,6 @@
50#include <linux/rmap.h> 50#include <linux/rmap.h>
51#include <linux/mempolicy.h> 51#include <linux/mempolicy.h>
52#include <linux/key.h> 52#include <linux/key.h>
53#include <linux/unwind.h>
54#include <linux/buffer_head.h> 53#include <linux/buffer_head.h>
55#include <linux/page_cgroup.h> 54#include <linux/page_cgroup.h>
56#include <linux/debug_locks.h> 55#include <linux/debug_locks.h>
@@ -537,7 +536,6 @@ asmlinkage void __init start_kernel(void)
537 * Need to run as early as possible, to initialize the 536 * Need to run as early as possible, to initialize the
538 * lockdep hash: 537 * lockdep hash:
539 */ 538 */
540 unwind_init();
541 lockdep_init(); 539 lockdep_init();
542 debug_objects_early_init(); 540 debug_objects_early_init();
543 cgroup_init_early(); 541 cgroup_init_early();
@@ -559,7 +557,6 @@ asmlinkage void __init start_kernel(void)
559 setup_arch(&command_line); 557 setup_arch(&command_line);
560 mm_init_owner(&init_mm, &init_task); 558 mm_init_owner(&init_mm, &init_task);
561 setup_command_line(command_line); 559 setup_command_line(command_line);
562 unwind_setup();
563 setup_per_cpu_areas(); 560 setup_per_cpu_areas();
564 setup_nr_cpu_ids(); 561 setup_nr_cpu_ids();
565 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ 562 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
diff --git a/kernel/module.c b/kernel/module.c
index f47cce910f2..34b56cf0661 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -43,7 +43,6 @@
43#include <linux/device.h> 43#include <linux/device.h>
44#include <linux/string.h> 44#include <linux/string.h>
45#include <linux/mutex.h> 45#include <linux/mutex.h>
46#include <linux/unwind.h>
47#include <linux/rculist.h> 46#include <linux/rculist.h>
48#include <asm/uaccess.h> 47#include <asm/uaccess.h>
49#include <asm/cacheflush.h> 48#include <asm/cacheflush.h>
@@ -1449,8 +1448,6 @@ static void free_module(struct module *mod)
1449 remove_sect_attrs(mod); 1448 remove_sect_attrs(mod);
1450 mod_kobject_remove(mod); 1449 mod_kobject_remove(mod);
1451 1450
1452 unwind_remove_table(mod->unwind_info, 0);
1453
1454 /* Arch-specific cleanup. */ 1451 /* Arch-specific cleanup. */
1455 module_arch_cleanup(mod); 1452 module_arch_cleanup(mod);
1456 1453
@@ -1867,7 +1864,6 @@ static noinline struct module *load_module(void __user *umod,
1867 unsigned int symindex = 0; 1864 unsigned int symindex = 0;
1868 unsigned int strindex = 0; 1865 unsigned int strindex = 0;
1869 unsigned int modindex, versindex, infoindex, pcpuindex; 1866 unsigned int modindex, versindex, infoindex, pcpuindex;
1870 unsigned int unwindex = 0;
1871 unsigned int num_kp, num_mcount; 1867 unsigned int num_kp, num_mcount;
1872 struct kernel_param *kp; 1868 struct kernel_param *kp;
1873 struct module *mod; 1869 struct module *mod;
@@ -1957,9 +1953,6 @@ static noinline struct module *load_module(void __user *umod,
1957 versindex = find_sec(hdr, sechdrs, secstrings, "__versions"); 1953 versindex = find_sec(hdr, sechdrs, secstrings, "__versions");
1958 infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo"); 1954 infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo");
1959 pcpuindex = find_pcpusec(hdr, sechdrs, secstrings); 1955 pcpuindex = find_pcpusec(hdr, sechdrs, secstrings);
1960#ifdef ARCH_UNWIND_SECTION_NAME
1961 unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME);
1962#endif
1963 1956
1964 /* Don't keep modinfo and version sections. */ 1957 /* Don't keep modinfo and version sections. */
1965 sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC; 1958 sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
@@ -1969,8 +1962,6 @@ static noinline struct module *load_module(void __user *umod,
1969 sechdrs[symindex].sh_flags |= SHF_ALLOC; 1962 sechdrs[symindex].sh_flags |= SHF_ALLOC;
1970 sechdrs[strindex].sh_flags |= SHF_ALLOC; 1963 sechdrs[strindex].sh_flags |= SHF_ALLOC;
1971#endif 1964#endif
1972 if (unwindex)
1973 sechdrs[unwindex].sh_flags |= SHF_ALLOC;
1974 1965
1975 /* Check module struct version now, before we try to use module. */ 1966 /* Check module struct version now, before we try to use module. */
1976 if (!check_modstruct_version(sechdrs, versindex, mod)) { 1967 if (!check_modstruct_version(sechdrs, versindex, mod)) {
@@ -2267,11 +2258,6 @@ static noinline struct module *load_module(void __user *umod,
2267 add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); 2258 add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
2268 add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); 2259 add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
2269 2260
2270 /* Size of section 0 is 0, so this works well if no unwind info. */
2271 mod->unwind_info = unwind_add_table(mod,
2272 (void *)sechdrs[unwindex].sh_addr,
2273 sechdrs[unwindex].sh_size);
2274
2275 /* Get rid of temporary copy */ 2261 /* Get rid of temporary copy */
2276 vfree(hdr); 2262 vfree(hdr);
2277 2263
@@ -2370,7 +2356,6 @@ sys_init_module(void __user *umod,
2370 mutex_lock(&module_mutex); 2356 mutex_lock(&module_mutex);
2371 /* Drop initial reference. */ 2357 /* Drop initial reference. */
2372 module_put(mod); 2358 module_put(mod);
2373 unwind_remove_table(mod->unwind_info, 1);
2374 module_free(mod, mod->module_init); 2359 module_free(mod, mod->module_init);
2375 mod->module_init = NULL; 2360 mod->module_init = NULL;
2376 mod->init_size = 0; 2361 mod->init_size = 0;
diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index a50a311554c..f97af55bdd9 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -6,7 +6,6 @@
6#include <linux/fs.h> 6#include <linux/fs.h>
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <linux/unwind.h>
10#include <linux/stacktrace.h> 9#include <linux/stacktrace.h>
11#include <linux/kallsyms.h> 10#include <linux/kallsyms.h>
12#include <linux/fault-inject.h> 11#include <linux/fault-inject.h>