aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv/mm')
-rw-r--r--arch/frv/mm/cache-page.c5
-rw-r--r--arch/frv/mm/extable.c34
-rw-r--r--arch/frv/mm/highmem.c8
3 files changed, 22 insertions, 25 deletions
diff --git a/arch/frv/mm/cache-page.c b/arch/frv/mm/cache-page.c
index 683b5e344318..0261cbe153b5 100644
--- a/arch/frv/mm/cache-page.c
+++ b/arch/frv/mm/cache-page.c
@@ -11,6 +11,7 @@
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/highmem.h> 13#include <linux/highmem.h>
14#include <linux/module.h>
14#include <asm/pgalloc.h> 15#include <asm/pgalloc.h>
15 16
16/*****************************************************************************/ 17/*****************************************************************************/
@@ -38,6 +39,8 @@ void flush_dcache_page(struct page *page)
38 39
39} /* end flush_dcache_page() */ 40} /* end flush_dcache_page() */
40 41
42EXPORT_SYMBOL(flush_dcache_page);
43
41/*****************************************************************************/ 44/*****************************************************************************/
42/* 45/*
43 * ICI takes a virtual address and the page may not currently have one 46 * ICI takes a virtual address and the page may not currently have one
@@ -64,3 +67,5 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
64 } 67 }
65 68
66} /* end flush_icache_user_range() */ 69} /* end flush_icache_user_range() */
70
71EXPORT_SYMBOL(flush_icache_user_range);
diff --git a/arch/frv/mm/extable.c b/arch/frv/mm/extable.c
index 41be1128dc64..caacf030ac75 100644
--- a/arch/frv/mm/extable.c
+++ b/arch/frv/mm/extable.c
@@ -43,7 +43,7 @@ static inline unsigned long search_one_table(const struct exception_table_entry
43 */ 43 */
44unsigned long search_exception_table(unsigned long pc) 44unsigned long search_exception_table(unsigned long pc)
45{ 45{
46 unsigned long ret = 0; 46 const struct exception_table_entry *extab;
47 47
48 /* determine if the fault lay during a memcpy_user or a memset_user */ 48 /* determine if the fault lay during a memcpy_user or a memset_user */
49 if (__frame->lr == (unsigned long) &__memset_user_error_lr && 49 if (__frame->lr == (unsigned long) &__memset_user_error_lr &&
@@ -55,9 +55,10 @@ unsigned long search_exception_table(unsigned long pc)
55 */ 55 */
56 return (unsigned long) &__memset_user_error_handler; 56 return (unsigned long) &__memset_user_error_handler;
57 } 57 }
58 else if (__frame->lr == (unsigned long) &__memcpy_user_error_lr && 58
59 (unsigned long) &memcpy <= pc && pc < (unsigned long) &__memcpy_end 59 if (__frame->lr == (unsigned long) &__memcpy_user_error_lr &&
60 ) { 60 (unsigned long) &memcpy <= pc && pc < (unsigned long) &__memcpy_end
61 ) {
61 /* the fault occurred in a protected memset 62 /* the fault occurred in a protected memset
62 * - we search for the return address (in LR) instead of the program counter 63 * - we search for the return address (in LR) instead of the program counter
63 * - it was probably during a copy_to/from_user() 64 * - it was probably during a copy_to/from_user()
@@ -65,27 +66,10 @@ unsigned long search_exception_table(unsigned long pc)
65 return (unsigned long) &__memcpy_user_error_handler; 66 return (unsigned long) &__memcpy_user_error_handler;
66 } 67 }
67 68
68#ifndef CONFIG_MODULES 69 extab = search_exception_tables(pc);
69 /* there is only the kernel to search. */ 70 if (extab)
70 ret = search_one_table(__start___ex_table, __stop___ex_table - 1, pc); 71 return extab->fixup;
71 return ret;
72
73#else
74 /* the kernel is the last "module" -- no need to treat it special */
75 unsigned long flags;
76 struct module *mp;
77 72
78 spin_lock_irqsave(&modlist_lock, flags); 73 return 0;
79
80 for (mp = module_list; mp != NULL; mp = mp->next) {
81 if (mp->ex_table_start == NULL || !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING)))
82 continue;
83 ret = search_one_table(mp->ex_table_start, mp->ex_table_end - 1, pc);
84 if (ret)
85 break;
86 }
87 74
88 spin_unlock_irqrestore(&modlist_lock, flags);
89 return ret;
90#endif
91} /* end search_exception_table() */ 75} /* end search_exception_table() */
diff --git a/arch/frv/mm/highmem.c b/arch/frv/mm/highmem.c
index 7dc8fbf3af97..7f77db7fabc7 100644
--- a/arch/frv/mm/highmem.c
+++ b/arch/frv/mm/highmem.c
@@ -9,6 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/highmem.h> 11#include <linux/highmem.h>
12#include <linux/module.h>
12 13
13void *kmap(struct page *page) 14void *kmap(struct page *page)
14{ 15{
@@ -18,6 +19,8 @@ void *kmap(struct page *page)
18 return kmap_high(page); 19 return kmap_high(page);
19} 20}
20 21
22EXPORT_SYMBOL(kmap);
23
21void kunmap(struct page *page) 24void kunmap(struct page *page)
22{ 25{
23 if (in_interrupt()) 26 if (in_interrupt())
@@ -27,7 +30,12 @@ void kunmap(struct page *page)
27 kunmap_high(page); 30 kunmap_high(page);
28} 31}
29 32
33EXPORT_SYMBOL(kunmap);
34
30struct page *kmap_atomic_to_page(void *ptr) 35struct page *kmap_atomic_to_page(void *ptr)
31{ 36{
32 return virt_to_page(ptr); 37 return virt_to_page(ptr);
33} 38}
39
40
41EXPORT_SYMBOL(kmap_atomic_to_page);