aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-01-08 04:01:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:13:36 -0500
commit402344012ebe696d9353bbf056889ddaaec83079 (patch)
tree4a4072bdfe80be4c565d01a9188ef5da3a31e19a /arch/frv
parent8369ce4cfe18decc3ea0afcf91e67c665479c78e (diff)
[PATCH] frv: implement and export various things required by modules
Export a number of features required to build all the modules. It also implements the following simple features: (*) csum_partial_copy_from_user() for MMU as well as no-MMU. (*) __ucmpdi2(). so that they can be exported too. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/kernel/frv_ksyms.c25
-rw-r--r--arch/frv/kernel/irq.c17
-rw-r--r--arch/frv/kernel/pm.c2
-rw-r--r--arch/frv/kernel/time.c3
-rw-r--r--arch/frv/kernel/traps.c3
-rw-r--r--arch/frv/kernel/uaccess.c7
-rw-r--r--arch/frv/lib/Makefile2
-rw-r--r--arch/frv/lib/__ucmpdi2.S45
-rw-r--r--arch/frv/lib/checksum.c31
-rw-r--r--arch/frv/mb93090-mb00/pci-dma-nommu.c8
-rw-r--r--arch/frv/mb93090-mb00/pci-dma.c10
-rw-r--r--arch/frv/mm/cache-page.c5
-rw-r--r--arch/frv/mm/highmem.c8
13 files changed, 152 insertions, 14 deletions
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c
index 1a76d5247190..5f118c89d091 100644
--- a/arch/frv/kernel/frv_ksyms.c
+++ b/arch/frv/kernel/frv_ksyms.c
@@ -16,10 +16,11 @@
16#include <asm/semaphore.h> 16#include <asm/semaphore.h>
17#include <asm/checksum.h> 17#include <asm/checksum.h>
18#include <asm/hardirq.h> 18#include <asm/hardirq.h>
19#include <asm/current.h> 19#include <asm/cacheflush.h>
20 20
21extern void dump_thread(struct pt_regs *, struct user *); 21extern void dump_thread(struct pt_regs *, struct user *);
22extern long __memcpy_user(void *dst, const void *src, size_t count); 22extern long __memcpy_user(void *dst, const void *src, size_t count);
23extern long __memset_user(void *dst, const void *src, size_t count);
23 24
24/* platform dependent support */ 25/* platform dependent support */
25 26
@@ -50,7 +51,11 @@ EXPORT_SYMBOL(disable_irq);
50EXPORT_SYMBOL(__res_bus_clock_speed_HZ); 51EXPORT_SYMBOL(__res_bus_clock_speed_HZ);
51EXPORT_SYMBOL(__page_offset); 52EXPORT_SYMBOL(__page_offset);
52EXPORT_SYMBOL(__memcpy_user); 53EXPORT_SYMBOL(__memcpy_user);
53EXPORT_SYMBOL(flush_dcache_page); 54EXPORT_SYMBOL(__memset_user);
55EXPORT_SYMBOL(frv_dcache_writeback);
56EXPORT_SYMBOL(frv_cache_invalidate);
57EXPORT_SYMBOL(frv_icache_invalidate);
58EXPORT_SYMBOL(frv_cache_wback_inv);
54 59
55#ifndef CONFIG_MMU 60#ifndef CONFIG_MMU
56EXPORT_SYMBOL(memory_start); 61EXPORT_SYMBOL(memory_start);
@@ -72,6 +77,9 @@ EXPORT_SYMBOL(memcmp);
72EXPORT_SYMBOL(memscan); 77EXPORT_SYMBOL(memscan);
73EXPORT_SYMBOL(memmove); 78EXPORT_SYMBOL(memmove);
74 79
80EXPORT_SYMBOL(__outsl_ns);
81EXPORT_SYMBOL(__insl_ns);
82
75EXPORT_SYMBOL(get_wchan); 83EXPORT_SYMBOL(get_wchan);
76 84
77#ifdef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS 85#ifdef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
@@ -80,14 +88,13 @@ EXPORT_SYMBOL(atomic_test_and_OR_mask);
80EXPORT_SYMBOL(atomic_test_and_XOR_mask); 88EXPORT_SYMBOL(atomic_test_and_XOR_mask);
81EXPORT_SYMBOL(atomic_add_return); 89EXPORT_SYMBOL(atomic_add_return);
82EXPORT_SYMBOL(atomic_sub_return); 90EXPORT_SYMBOL(atomic_sub_return);
83EXPORT_SYMBOL(__xchg_8);
84EXPORT_SYMBOL(__xchg_16);
85EXPORT_SYMBOL(__xchg_32); 91EXPORT_SYMBOL(__xchg_32);
86EXPORT_SYMBOL(__cmpxchg_8);
87EXPORT_SYMBOL(__cmpxchg_16);
88EXPORT_SYMBOL(__cmpxchg_32); 92EXPORT_SYMBOL(__cmpxchg_32);
89#endif 93#endif
90 94
95EXPORT_SYMBOL(__debug_bug_printk);
96EXPORT_SYMBOL(__delay_loops_MHz);
97
91/* 98/*
92 * libgcc functions - functions that are used internally by the 99 * libgcc functions - functions that are used internally by the
93 * compiler... (prototypes are not correct though, but that 100 * compiler... (prototypes are not correct though, but that
@@ -101,6 +108,8 @@ extern void __divdi3(void);
101extern void __lshrdi3(void); 108extern void __lshrdi3(void);
102extern void __moddi3(void); 109extern void __moddi3(void);
103extern void __muldi3(void); 110extern void __muldi3(void);
111extern void __mulll(void);
112extern void __umulll(void);
104extern void __negdi2(void); 113extern void __negdi2(void);
105extern void __ucmpdi2(void); 114extern void __ucmpdi2(void);
106extern void __udivdi3(void); 115extern void __udivdi3(void);
@@ -116,8 +125,10 @@ EXPORT_SYMBOL(__ashrdi3);
116EXPORT_SYMBOL(__lshrdi3); 125EXPORT_SYMBOL(__lshrdi3);
117//EXPORT_SYMBOL(__moddi3); 126//EXPORT_SYMBOL(__moddi3);
118EXPORT_SYMBOL(__muldi3); 127EXPORT_SYMBOL(__muldi3);
128EXPORT_SYMBOL(__mulll);
129EXPORT_SYMBOL(__umulll);
119EXPORT_SYMBOL(__negdi2); 130EXPORT_SYMBOL(__negdi2);
120//EXPORT_SYMBOL(__ucmpdi2); 131EXPORT_SYMBOL(__ucmpdi2);
121//EXPORT_SYMBOL(__udivdi3); 132//EXPORT_SYMBOL(__udivdi3);
122//EXPORT_SYMBOL(__udivmoddi4); 133//EXPORT_SYMBOL(__udivmoddi4);
123//EXPORT_SYMBOL(__umoddi3); 134//EXPORT_SYMBOL(__umoddi3);
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c
index 8c524cdd2717..59580c59c62c 100644
--- a/arch/frv/kernel/irq.c
+++ b/arch/frv/kernel/irq.c
@@ -32,6 +32,7 @@
32#include <linux/irq.h> 32#include <linux/irq.h>
33#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
34#include <linux/seq_file.h> 34#include <linux/seq_file.h>
35#include <linux/module.h>
35 36
36#include <asm/atomic.h> 37#include <asm/atomic.h>
37#include <asm/io.h> 38#include <asm/io.h>
@@ -178,6 +179,8 @@ void disable_irq_nosync(unsigned int irq)
178 spin_unlock_irqrestore(&level->lock, flags); 179 spin_unlock_irqrestore(&level->lock, flags);
179} 180}
180 181
182EXPORT_SYMBOL(disable_irq_nosync);
183
181/** 184/**
182 * disable_irq - disable an irq and wait for completion 185 * disable_irq - disable an irq and wait for completion
183 * @irq: Interrupt to disable 186 * @irq: Interrupt to disable
@@ -204,6 +207,8 @@ void disable_irq(unsigned int irq)
204#endif 207#endif
205} 208}
206 209
210EXPORT_SYMBOL(disable_irq);
211
207/** 212/**
208 * enable_irq - enable handling of an irq 213 * enable_irq - enable handling of an irq
209 * @irq: Interrupt to enable 214 * @irq: Interrupt to enable
@@ -268,6 +273,8 @@ void enable_irq(unsigned int irq)
268 spin_unlock_irqrestore(&level->lock, flags); 273 spin_unlock_irqrestore(&level->lock, flags);
269} 274}
270 275
276EXPORT_SYMBOL(enable_irq);
277
271/*****************************************************************************/ 278/*****************************************************************************/
272/* 279/*
273 * handles all normal device IRQ's 280 * handles all normal device IRQ's
@@ -425,6 +432,8 @@ int request_irq(unsigned int irq,
425 return retval; 432 return retval;
426} 433}
427 434
435EXPORT_SYMBOL(request_irq);
436
428/** 437/**
429 * free_irq - free an interrupt 438 * free_irq - free an interrupt
430 * @irq: Interrupt line to free 439 * @irq: Interrupt line to free
@@ -496,6 +505,8 @@ void free_irq(unsigned int irq, void *dev_id)
496 } 505 }
497} 506}
498 507
508EXPORT_SYMBOL(free_irq);
509
499/* 510/*
500 * IRQ autodetection code.. 511 * IRQ autodetection code..
501 * 512 *
@@ -519,6 +530,8 @@ unsigned long probe_irq_on(void)
519 return 0; 530 return 0;
520} 531}
521 532
533EXPORT_SYMBOL(probe_irq_on);
534
522/* 535/*
523 * Return a mask of triggered interrupts (this 536 * Return a mask of triggered interrupts (this
524 * can handle only legacy ISA interrupts). 537 * can handle only legacy ISA interrupts).
@@ -542,6 +555,8 @@ unsigned int probe_irq_mask(unsigned long xmask)
542 return 0; 555 return 0;
543} 556}
544 557
558EXPORT_SYMBOL(probe_irq_mask);
559
545/* 560/*
546 * Return the one interrupt that triggered (this can 561 * Return the one interrupt that triggered (this can
547 * handle any interrupt source). 562 * handle any interrupt source).
@@ -571,6 +586,8 @@ int probe_irq_off(unsigned long xmask)
571 return -1; 586 return -1;
572} 587}
573 588
589EXPORT_SYMBOL(probe_irq_off);
590
574/* this was setup_x86_irq but it seems pretty generic */ 591/* this was setup_x86_irq but it seems pretty generic */
575int setup_irq(unsigned int irq, struct irqaction *new) 592int setup_irq(unsigned int irq, struct irqaction *new)
576{ 593{
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 712c3c24c954..f0b8fff3e733 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/config.h> 14#include <linux/config.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/module.h>
16#include <linux/pm.h> 17#include <linux/pm.h>
17#include <linux/pm_legacy.h> 18#include <linux/pm_legacy.h>
18#include <linux/sched.h> 19#include <linux/sched.h>
@@ -27,6 +28,7 @@
27#include "local.h" 28#include "local.h"
28 29
29void (*pm_power_off)(void); 30void (*pm_power_off)(void);
31EXPORT_SYMBOL(pm_power_off);
30 32
31extern void frv_change_cmode(int); 33extern void frv_change_cmode(int);
32 34
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index 2e9741227b73..24cf85f89e40 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -189,6 +189,8 @@ void do_gettimeofday(struct timeval *tv)
189 tv->tv_usec = usec; 189 tv->tv_usec = usec;
190} 190}
191 191
192EXPORT_SYMBOL(do_gettimeofday);
193
192int do_settimeofday(struct timespec *tv) 194int do_settimeofday(struct timespec *tv)
193{ 195{
194 time_t wtm_sec, sec = tv->tv_sec; 196 time_t wtm_sec, sec = tv->tv_sec;
@@ -218,6 +220,7 @@ int do_settimeofday(struct timespec *tv)
218 clock_was_set(); 220 clock_was_set();
219 return 0; 221 return 0;
220} 222}
223
221EXPORT_SYMBOL(do_settimeofday); 224EXPORT_SYMBOL(do_settimeofday);
222 225
223/* 226/*
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c
index 89073cae4b5d..9eb84b2e6abc 100644
--- a/arch/frv/kernel/traps.c
+++ b/arch/frv/kernel/traps.c
@@ -19,6 +19,7 @@
19#include <linux/string.h> 19#include <linux/string.h>
20#include <linux/linkage.h> 20#include <linux/linkage.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/module.h>
22 23
23#include <asm/setup.h> 24#include <asm/setup.h>
24#include <asm/fpu.h> 25#include <asm/fpu.h>
@@ -250,6 +251,8 @@ void dump_stack(void)
250 show_stack(NULL, NULL); 251 show_stack(NULL, NULL);
251} 252}
252 253
254EXPORT_SYMBOL(dump_stack);
255
253void show_stack(struct task_struct *task, unsigned long *sp) 256void show_stack(struct task_struct *task, unsigned long *sp)
254{ 257{
255} 258}
diff --git a/arch/frv/kernel/uaccess.c b/arch/frv/kernel/uaccess.c
index f3fd58a5bc4a..9b751c0f0e84 100644
--- a/arch/frv/kernel/uaccess.c
+++ b/arch/frv/kernel/uaccess.c
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/module.h>
13#include <asm/uaccess.h> 14#include <asm/uaccess.h>
14 15
15/*****************************************************************************/ 16/*****************************************************************************/
@@ -58,8 +59,11 @@ long strncpy_from_user(char *dst, const char *src, long count)
58 memset(p, 0, count); /* clear remainder of buffer [security] */ 59 memset(p, 0, count); /* clear remainder of buffer [security] */
59 60
60 return err; 61 return err;
62
61} /* end strncpy_from_user() */ 63} /* end strncpy_from_user() */
62 64
65EXPORT_SYMBOL(strncpy_from_user);
66
63/*****************************************************************************/ 67/*****************************************************************************/
64/* 68/*
65 * Return the size of a string (including the ending 0) 69 * Return the size of a string (including the ending 0)
@@ -92,4 +96,7 @@ long strnlen_user(const char *src, long count)
92 } 96 }
93 97
94 return p - src + 1; /* return length including NUL */ 98 return p - src + 1; /* return length including NUL */
99
95} /* end strnlen_user() */ 100} /* end strnlen_user() */
101
102EXPORT_SYMBOL(strnlen_user);
diff --git a/arch/frv/lib/Makefile b/arch/frv/lib/Makefile
index 19be2626d5e6..08be305c9f44 100644
--- a/arch/frv/lib/Makefile
+++ b/arch/frv/lib/Makefile
@@ -3,6 +3,6 @@
3# 3#
4 4
5lib-y := \ 5lib-y := \
6 __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o \ 6 __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o __ucmpdi2.o \
7 checksum.o memcpy.o memset.o atomic-ops.o \ 7 checksum.o memcpy.o memset.o atomic-ops.o \
8 outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o 8 outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o
diff --git a/arch/frv/lib/__ucmpdi2.S b/arch/frv/lib/__ucmpdi2.S
new file mode 100644
index 000000000000..d892f16ffaa9
--- /dev/null
+++ b/arch/frv/lib/__ucmpdi2.S
@@ -0,0 +1,45 @@
1/* __ucmpdi2.S: 64-bit unsigned compare
2 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12
13 .text
14 .p2align 4
15
16###############################################################################
17#
18# int __ucmpdi2(unsigned long long a [GR8:GR9],
19# unsigned long long b [GR10:GR11])
20#
21# - returns 0, 1, or 2 as a <, =, > b respectively.
22#
23###############################################################################
24 .globl __ucmpdi2
25 .type __ucmpdi2,@function
26__ucmpdi2:
27 or.p gr8,gr0,gr4
28 subcc gr8,gr10,gr0,icc0
29 setlos.p #0,gr8
30 bclr icc0,#2 ; a.msw < b.msw
31
32 setlos.p #2,gr8
33 bhilr icc0,#0 ; a.msw > b.msw
34
35 subcc.p gr9,gr11,gr0,icc1
36 setlos #0,gr8
37 setlos.p #2,gr9
38 setlos #1,gr7
39 cknc icc1,cc6
40 cor.p gr9,gr0,gr8, cc6,#1
41 cckls icc1,cc4, cc6,#1
42 andcr cc6,cc4,cc4
43 cor gr7,gr0,gr8, cc4,#1
44 bralr
45 .size __ucmpdi2, .-__ucmpdi2
diff --git a/arch/frv/lib/checksum.c b/arch/frv/lib/checksum.c
index 7bf5bd6cac8a..20e7dfc474ef 100644
--- a/arch/frv/lib/checksum.c
+++ b/arch/frv/lib/checksum.c
@@ -33,6 +33,7 @@
33 33
34#include <net/checksum.h> 34#include <net/checksum.h>
35#include <asm/checksum.h> 35#include <asm/checksum.h>
36#include <linux/module.h>
36 37
37static inline unsigned short from32to16(unsigned long x) 38static inline unsigned short from32to16(unsigned long x)
38{ 39{
@@ -115,34 +116,52 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
115 return result; 116 return result;
116} 117}
117 118
119EXPORT_SYMBOL(csum_partial);
120
118/* 121/*
119 * this routine is used for miscellaneous IP-like checksums, mainly 122 * this routine is used for miscellaneous IP-like checksums, mainly
120 * in icmp.c 123 * in icmp.c
121 */ 124 */
122unsigned short ip_compute_csum(const unsigned char * buff, int len) 125unsigned short ip_compute_csum(const unsigned char * buff, int len)
123{ 126{
124 return ~do_csum(buff,len); 127 return ~do_csum(buff, len);
125} 128}
126 129
130EXPORT_SYMBOL(ip_compute_csum);
131
127/* 132/*
128 * copy from fs while checksumming, otherwise like csum_partial 133 * copy from fs while checksumming, otherwise like csum_partial
129 */ 134 */
130
131unsigned int 135unsigned int
132csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *csum_err) 136csum_partial_copy_from_user(const char __user *src, char *dst,
137 int len, int sum, int *csum_err)
133{ 138{
134 if (csum_err) *csum_err = 0; 139 int rem;
135 memcpy(dst, src, len); 140
141 if (csum_err)
142 *csum_err = 0;
143
144 rem = copy_from_user(dst, src, len);
145 if (rem != 0) {
146 if (csum_err)
147 *csum_err = -EFAULT;
148 memset(dst + len - rem, 0, rem);
149 len = rem;
150 }
151
136 return csum_partial(dst, len, sum); 152 return csum_partial(dst, len, sum);
137} 153}
138 154
155EXPORT_SYMBOL(csum_partial_copy_from_user);
156
139/* 157/*
140 * copy from ds while checksumming, otherwise like csum_partial 158 * copy from ds while checksumming, otherwise like csum_partial
141 */ 159 */
142
143unsigned int 160unsigned int
144csum_partial_copy(const char *src, char *dst, int len, int sum) 161csum_partial_copy(const char *src, char *dst, int len, int sum)
145{ 162{
146 memcpy(dst, src, len); 163 memcpy(dst, src, len);
147 return csum_partial(dst, len, sum); 164 return csum_partial(dst, len, sum);
148} 165}
166
167EXPORT_SYMBOL(csum_partial_copy);
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c
index 2082a9647f4f..4985466b1a7c 100644
--- a/arch/frv/mb93090-mb00/pci-dma-nommu.c
+++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c
@@ -83,6 +83,8 @@ void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_hand
83 return NULL; 83 return NULL;
84} 84}
85 85
86EXPORT_SYMBOL(dma_alloc_coherent);
87
86void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) 88void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
87{ 89{
88 struct dma_alloc_record *rec; 90 struct dma_alloc_record *rec;
@@ -102,6 +104,8 @@ void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_
102 BUG(); 104 BUG();
103} 105}
104 106
107EXPORT_SYMBOL(dma_free_coherent);
108
105/* 109/*
106 * Map a single buffer of the indicated size for DMA in streaming mode. 110 * Map a single buffer of the indicated size for DMA in streaming mode.
107 * The 32-bit bus address to use is returned. 111 * The 32-bit bus address to use is returned.
@@ -120,6 +124,8 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
120 return virt_to_bus(ptr); 124 return virt_to_bus(ptr);
121} 125}
122 126
127EXPORT_SYMBOL(dma_map_single);
128
123/* 129/*
124 * Map a set of buffers described by scatterlist in streaming 130 * Map a set of buffers described by scatterlist in streaming
125 * mode for DMA. This is the scather-gather version of the 131 * mode for DMA. This is the scather-gather version of the
@@ -150,3 +156,5 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
150 156
151 return nents; 157 return nents;
152} 158}
159
160EXPORT_SYMBOL(dma_map_sg);
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c
index 86fbdadc51b6..671ce1e8434f 100644
--- a/arch/frv/mb93090-mb00/pci-dma.c
+++ b/arch/frv/mb93090-mb00/pci-dma.c
@@ -28,11 +28,15 @@ void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_hand
28 return ret; 28 return ret;
29} 29}
30 30
31EXPORT_SYMBOL(dma_alloc_coherent);
32
31void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) 33void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
32{ 34{
33 consistent_free(vaddr); 35 consistent_free(vaddr);
34} 36}
35 37
38EXPORT_SYMBOL(dma_free_coherent);
39
36/* 40/*
37 * Map a single buffer of the indicated size for DMA in streaming mode. 41 * Map a single buffer of the indicated size for DMA in streaming mode.
38 * The 32-bit bus address to use is returned. 42 * The 32-bit bus address to use is returned.
@@ -51,6 +55,8 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
51 return virt_to_bus(ptr); 55 return virt_to_bus(ptr);
52} 56}
53 57
58EXPORT_SYMBOL(dma_map_single);
59
54/* 60/*
55 * Map a set of buffers described by scatterlist in streaming 61 * Map a set of buffers described by scatterlist in streaming
56 * mode for DMA. This is the scather-gather version of the 62 * mode for DMA. This is the scather-gather version of the
@@ -96,6 +102,8 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
96 return nents; 102 return nents;
97} 103}
98 104
105EXPORT_SYMBOL(dma_map_sg);
106
99dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, 107dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset,
100 size_t size, enum dma_data_direction direction) 108 size_t size, enum dma_data_direction direction)
101{ 109{
@@ -103,3 +111,5 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long off
103 flush_dcache_page(page); 111 flush_dcache_page(page);
104 return (dma_addr_t) page_to_phys(page) + offset; 112 return (dma_addr_t) page_to_phys(page) + offset;
105} 113}
114
115EXPORT_SYMBOL(dma_map_page);
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/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);