aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/obio.h
Commit message (Expand)AuthorAge
* sparc, sparc64: use arch/sparc/includeSam Ravnborg2008-07-27
* sparc: remove CVS keywordsAdrian Bunk2008-05-20
* [SPARC]: "extern inline" doesn't make much sense.Adrian Bunk2005-10-03
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-16
If the exception table is sorted, any referring to the module init * will be at the beginning or the end. */ void trim_init_extable(struct module *m) { /*trim the beginning*/ while (m->num_exentries && within_module_init(m->extable[0].insn, m)) { m->extable++; m->num_exentries--; } /*trim the end*/ while (m->num_exentries && within_module_init(m->extable[m->num_exentries-1].insn, m)) m->num_exentries--; } #endif /* CONFIG_MODULES */ #endif /* !ARCH_HAS_SORT_EXTABLE */ #ifndef ARCH_HAS_SEARCH_EXTABLE /* * Search one exception table for an entry corresponding to the * given instruction address, and return the address of the entry, * or NULL if none is found. * We use a binary search, and thus we assume that the table is * already sorted. */ const struct exception_table_entry * search_extable(const struct exception_table_entry *first, const struct exception_table_entry *last, unsigned long value) { while (first <= last) { const struct exception_table_entry *mid; mid = ((last - first) >> 1) + first; /* * careful, the distance between value and insn * can be larger than MAX_LONG: */ if (mid->insn < value) first = mid + 1; else if (mid->insn > value) last = mid - 1; else return mid; } return NULL; } #endif