diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-04-29 21:13:14 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-04-29 21:13:14 +0000 |
commit | 19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch) | |
tree | 40b1cb534496a7f1ca0f5c314a523c69f1fee464 /arch/mips/mm/extable.c | |
parent | 7206675c40394c78a90e74812bbdbf8cf3cca1be (diff) |
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'arch/mips/mm/extable.c')
-rw-r--r-- | arch/mips/mm/extable.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/arch/mips/mm/extable.c b/arch/mips/mm/extable.c index c46568ab1..a92fdc482 100644 --- a/arch/mips/mm/extable.c +++ b/arch/mips/mm/extable.c @@ -29,27 +29,24 @@ search_one_table(const struct exception_table_entry *first, return 0; } -unsigned long search_exception_table(unsigned long addr) +unsigned long +search_exception_table(unsigned long addr) { - unsigned ret; -#ifdef CONFIG_MODULES - struct module *mp; -#endif + unsigned long ret; - /* Search the kernel's table first. */ - ret = search_one_table(__start___ex_table, - __stop___ex_table-1, addr); - if (ret) - return ret; - -#ifdef CONFIG_MODULES +#ifndef CONFIG_MODULES + /* There is only the kernel to search. */ + ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr); + if (ret) return ret; +#else + /* The kernel is the last "module" -- no need to treat it special. */ + struct module *mp; for (mp = module_list; mp != NULL; mp = mp->next) { - if (mp->exceptinfo.start != NULL) { - ret = search_one_table(mp->exceptinfo.start, - mp->exceptinfo.stop-1, addr); - if (ret) - return ret; - } + if (mp->ex_table_start == NULL) + continue; + ret = search_one_table(mp->ex_table_start, + mp->ex_table_end - 1, addr); + if (ret) return ret; } #endif |