From: James S. <jsi...@us...> - 2001-08-21 17:27:34
|
Update of /cvsroot/linux-mips/linux/arch/mips64/sgi-ip27 In directory usw-pr-cvs1:/tmp/cvs-serv20355 Modified Files: ip27-berr.c Log Message: Support catching data bus errors also from withim modules. Index: ip27-berr.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips64/sgi-ip27/ip27-berr.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ip27-berr.c 2001/06/22 02:29:32 1.1.1.1 --- ip27-berr.c 2001/08/21 17:27:31 1.2 *************** *** 9,12 **** --- 9,15 ---- #include <linux/init.h> #include <linux/kernel.h> + #include <linux/module.h> + + #include <asm/module.h> #include <asm/sn/addrs.h> #include <asm/sn/arch.h> *************** *** 44,47 **** --- 47,52 ---- } + extern spinlock_t modlist_lock; + static inline unsigned long search_dbe_table(unsigned long addr) *************** *** 49,57 **** unsigned long ret; /* There is only the kernel to search. */ ret = search_one_table(__start___dbe_table, __stop___dbe_table-1, addr); ! if (ret) return ret; ! return 0; } --- 54,86 ---- unsigned long ret; + #ifndef CONFIG_MODULES /* There is only the kernel to search. */ ret = search_one_table(__start___dbe_table, __stop___dbe_table-1, addr); ! return ret; ! #else ! unsigned long flags; ! /* The kernel is the last "module" -- no need to treat it special. */ ! struct module *mp; ! struct archdata *ap; ! ! spin_lock_irqsave(&modlist_lock, flags); ! for (mp = module_list; mp != NULL; mp = mp->next) { ! if (!mod_member_present(mp, archdata_start) || ! !mp->archdata_start) ! continue; ! ap = (struct archdata *)(mod->archdata_start); ! ! if (ap->dbe_table_start == NULL || ! !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING))) ! continue; ! ret = search_one_table(ap->dbe_table_start, ! ap->dbe_table_end - 1, addr); ! if (ret) ! break; ! } ! spin_unlock_irqrestore(&modlist_lock, flags); ! return ret; ! #endif } |