Commit cd8963f8 authored by David S. Miller's avatar David S. Miller

[SPARC]: More new modules work.

parent 33e0ed9c
......@@ -62,7 +62,7 @@ extern spinlock_t modlist_lock;
unsigned long
search_exception_table(unsigned long addr, unsigned long *g2)
{
unsigned long ret = 0, flags;
unsigned long ret = 0;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
......@@ -70,15 +70,19 @@ search_exception_table(unsigned long addr, unsigned long *g2)
__stop___ex_table-1, addr, g2);
return ret;
#else
/* The kernel is the last "module" -- no need to treat it special. */
struct module *mp;
unsigned long flags;
struct list_head *i;
/* The kernel is the last "module" -- no need to treat it special. */
spin_lock_irqsave(&modlist_lock, flags);
for (mp = module_list; mp != NULL; mp = mp->next) {
if (mp->ex_table_start == NULL || !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING)))
list_for_each(i, &extables) {
struct exception_table *ex =
list_entry(i, struct exception_table, list);
if (ex->num_entries == 0)
continue;
ret = search_one_table(mp->ex_table_start,
mp->ex_table_end-1, addr, g2);
ret = search_one_table(ex->entry,
ex->entry + ex->num_entries - 1,
addr, g2);
if (ret)
break;
}
......
......@@ -5265,7 +5265,7 @@ int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, u
{
int i;
if (!additional_ioctls) {
additional_ioctls = module_map(PAGE_SIZE);
additional_ioctls = vmalloc(PAGE_SIZE);
if (!additional_ioctls)
return -ENOMEM;
memset(additional_ioctls, 0, PAGE_SIZE);
......
......@@ -62,7 +62,7 @@ extern spinlock_t modlist_lock;
unsigned long
search_exception_table(unsigned long addr, unsigned long *g2)
{
unsigned long ret = 0, flags;
unsigned long ret = 0;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
......@@ -70,15 +70,19 @@ search_exception_table(unsigned long addr, unsigned long *g2)
__stop___ex_table-1, addr, g2);
return ret;
#else
/* The kernel is the last "module" -- no need to treat it special. */
struct module *mp;
unsigned long flags;
struct list_head *i;
/* The kernel is the last "module" -- no need to treat it special. */
spin_lock_irqsave(&modlist_lock, flags);
for (mp = module_list; mp != NULL; mp = mp->next) {
if (mp->ex_table_start == NULL || !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING)))
list_for_each(i, &extables) {
struct exception_table *ex =
list_entry(i, struct exception_table, list);
if (ex->num_entries == 0)
continue;
ret = search_one_table(mp->ex_table_start,
mp->ex_table_end-1, addr, g2);
ret = search_one_table(ex->entry,
ex->entry + ex->num_entries - 1,
addr, g2);
if (ret)
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment