aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/include/asm/suspend.h1
-rw-r--r--arch/ia64/mm/extable.c26
2 files changed, 26 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/suspend.h b/arch/ia64/include/asm/suspend.h
deleted file mode 100644
index b05bbb6074e2..000000000000
--- a/arch/ia64/include/asm/suspend.h
+++ /dev/null
@@ -1 +0,0 @@
1/* dummy (must be non-empty to prevent prejudicial removal...) */
diff --git a/arch/ia64/mm/extable.c b/arch/ia64/mm/extable.c
index 71c50dd8f870..e95d5ad9285d 100644
--- a/arch/ia64/mm/extable.c
+++ b/arch/ia64/mm/extable.c
@@ -53,6 +53,32 @@ void sort_extable (struct exception_table_entry *start,
53 cmp_ex, swap_ex); 53 cmp_ex, swap_ex);
54} 54}
55 55
56static inline unsigned long ex_to_addr(const struct exception_table_entry *x)
57{
58 return (unsigned long)&x->insn + x->insn;
59}
60
61#ifdef CONFIG_MODULES
62/*
63 * Any entry referring to the module init will be at the beginning or
64 * the end.
65 */
66void trim_init_extable(struct module *m)
67{
68 /*trim the beginning*/
69 while (m->num_exentries &&
70 within_module_init(ex_to_addr(&m->extable[0]), m)) {
71 m->extable++;
72 m->num_exentries--;
73 }
74 /*trim the end*/
75 while (m->num_exentries &&
76 within_module_init(ex_to_addr(&m->extable[m->num_exentries-1]),
77 m))
78 m->num_exentries--;
79}
80#endif /* CONFIG_MODULES */
81
56const struct exception_table_entry * 82const struct exception_table_entry *
57search_extable (const struct exception_table_entry *first, 83search_extable (const struct exception_table_entry *first,
58 const struct exception_table_entry *last, 84 const struct exception_table_entry *last,