diff options
Diffstat (limited to 'arch/frv/kernel')
-rw-r--r-- | arch/frv/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/frv/kernel/frv_ksyms.c | 25 | ||||
-rw-r--r-- | arch/frv/kernel/irq.c | 17 | ||||
-rw-r--r-- | arch/frv/kernel/module.c | 80 | ||||
-rw-r--r-- | arch/frv/kernel/pm.c | 2 | ||||
-rw-r--r-- | arch/frv/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/frv/kernel/time.c | 3 | ||||
-rw-r--r-- | arch/frv/kernel/traps.c | 3 | ||||
-rw-r--r-- | arch/frv/kernel/uaccess.c | 7 | ||||
-rw-r--r-- | arch/frv/kernel/vmlinux.lds.S | 1 |
10 files changed, 134 insertions, 7 deletions
diff --git a/arch/frv/kernel/Makefile b/arch/frv/kernel/Makefile index 422f30ede575..5a827b349b5e 100644 --- a/arch/frv/kernel/Makefile +++ b/arch/frv/kernel/Makefile | |||
@@ -21,3 +21,4 @@ obj-$(CONFIG_PM) += pm.o cmode.o | |||
21 | obj-$(CONFIG_MB93093_PDK) += pm-mb93093.o | 21 | obj-$(CONFIG_MB93093_PDK) += pm-mb93093.o |
22 | obj-$(CONFIG_SYSCTL) += sysctl.o | 22 | obj-$(CONFIG_SYSCTL) += sysctl.o |
23 | obj-$(CONFIG_FUTEX) += futex.o | 23 | obj-$(CONFIG_FUTEX) += futex.o |
24 | obj-$(CONFIG_MODULES) += module.o | ||
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 | ||
21 | extern void dump_thread(struct pt_regs *, struct user *); | 21 | extern void dump_thread(struct pt_regs *, struct user *); |
22 | extern long __memcpy_user(void *dst, const void *src, size_t count); | 22 | extern long __memcpy_user(void *dst, const void *src, size_t count); |
23 | extern 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); | |||
50 | EXPORT_SYMBOL(__res_bus_clock_speed_HZ); | 51 | EXPORT_SYMBOL(__res_bus_clock_speed_HZ); |
51 | EXPORT_SYMBOL(__page_offset); | 52 | EXPORT_SYMBOL(__page_offset); |
52 | EXPORT_SYMBOL(__memcpy_user); | 53 | EXPORT_SYMBOL(__memcpy_user); |
53 | EXPORT_SYMBOL(flush_dcache_page); | 54 | EXPORT_SYMBOL(__memset_user); |
55 | EXPORT_SYMBOL(frv_dcache_writeback); | ||
56 | EXPORT_SYMBOL(frv_cache_invalidate); | ||
57 | EXPORT_SYMBOL(frv_icache_invalidate); | ||
58 | EXPORT_SYMBOL(frv_cache_wback_inv); | ||
54 | 59 | ||
55 | #ifndef CONFIG_MMU | 60 | #ifndef CONFIG_MMU |
56 | EXPORT_SYMBOL(memory_start); | 61 | EXPORT_SYMBOL(memory_start); |
@@ -72,6 +77,9 @@ EXPORT_SYMBOL(memcmp); | |||
72 | EXPORT_SYMBOL(memscan); | 77 | EXPORT_SYMBOL(memscan); |
73 | EXPORT_SYMBOL(memmove); | 78 | EXPORT_SYMBOL(memmove); |
74 | 79 | ||
80 | EXPORT_SYMBOL(__outsl_ns); | ||
81 | EXPORT_SYMBOL(__insl_ns); | ||
82 | |||
75 | EXPORT_SYMBOL(get_wchan); | 83 | EXPORT_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); | |||
80 | EXPORT_SYMBOL(atomic_test_and_XOR_mask); | 88 | EXPORT_SYMBOL(atomic_test_and_XOR_mask); |
81 | EXPORT_SYMBOL(atomic_add_return); | 89 | EXPORT_SYMBOL(atomic_add_return); |
82 | EXPORT_SYMBOL(atomic_sub_return); | 90 | EXPORT_SYMBOL(atomic_sub_return); |
83 | EXPORT_SYMBOL(__xchg_8); | ||
84 | EXPORT_SYMBOL(__xchg_16); | ||
85 | EXPORT_SYMBOL(__xchg_32); | 91 | EXPORT_SYMBOL(__xchg_32); |
86 | EXPORT_SYMBOL(__cmpxchg_8); | ||
87 | EXPORT_SYMBOL(__cmpxchg_16); | ||
88 | EXPORT_SYMBOL(__cmpxchg_32); | 92 | EXPORT_SYMBOL(__cmpxchg_32); |
89 | #endif | 93 | #endif |
90 | 94 | ||
95 | EXPORT_SYMBOL(__debug_bug_printk); | ||
96 | EXPORT_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); | |||
101 | extern void __lshrdi3(void); | 108 | extern void __lshrdi3(void); |
102 | extern void __moddi3(void); | 109 | extern void __moddi3(void); |
103 | extern void __muldi3(void); | 110 | extern void __muldi3(void); |
111 | extern void __mulll(void); | ||
112 | extern void __umulll(void); | ||
104 | extern void __negdi2(void); | 113 | extern void __negdi2(void); |
105 | extern void __ucmpdi2(void); | 114 | extern void __ucmpdi2(void); |
106 | extern void __udivdi3(void); | 115 | extern void __udivdi3(void); |
@@ -116,8 +125,10 @@ EXPORT_SYMBOL(__ashrdi3); | |||
116 | EXPORT_SYMBOL(__lshrdi3); | 125 | EXPORT_SYMBOL(__lshrdi3); |
117 | //EXPORT_SYMBOL(__moddi3); | 126 | //EXPORT_SYMBOL(__moddi3); |
118 | EXPORT_SYMBOL(__muldi3); | 127 | EXPORT_SYMBOL(__muldi3); |
128 | EXPORT_SYMBOL(__mulll); | ||
129 | EXPORT_SYMBOL(__umulll); | ||
119 | EXPORT_SYMBOL(__negdi2); | 130 | EXPORT_SYMBOL(__negdi2); |
120 | //EXPORT_SYMBOL(__ucmpdi2); | 131 | EXPORT_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 | ||
182 | EXPORT_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 | ||
210 | EXPORT_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 | ||
276 | EXPORT_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 | ||
435 | EXPORT_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 | ||
508 | EXPORT_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 | ||
533 | EXPORT_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 | ||
558 | EXPORT_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 | ||
589 | EXPORT_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 */ |
575 | int setup_irq(unsigned int irq, struct irqaction *new) | 592 | int setup_irq(unsigned int irq, struct irqaction *new) |
576 | { | 593 | { |
diff --git a/arch/frv/kernel/module.c b/arch/frv/kernel/module.c new file mode 100644 index 000000000000..850d168f69fc --- /dev/null +++ b/arch/frv/kernel/module.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* module.c: FRV specific module loading bits | ||
2 | * | ||
3 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * - Derived from arch/i386/kernel/module.c, Copyright (C) 2001 Rusty Russell. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | #include <linux/moduleloader.h> | ||
13 | #include <linux/elf.h> | ||
14 | #include <linux/vmalloc.h> | ||
15 | #include <linux/fs.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/kernel.h> | ||
18 | |||
19 | #if 0 | ||
20 | #define DEBUGP printk | ||
21 | #else | ||
22 | #define DEBUGP(fmt...) | ||
23 | #endif | ||
24 | |||
25 | void *module_alloc(unsigned long size) | ||
26 | { | ||
27 | if (size == 0) | ||
28 | return NULL; | ||
29 | |||
30 | return vmalloc_exec(size); | ||
31 | } | ||
32 | |||
33 | |||
34 | /* Free memory returned from module_alloc */ | ||
35 | void module_free(struct module *mod, void *module_region) | ||
36 | { | ||
37 | vfree(module_region); | ||
38 | /* FIXME: If module_region == mod->init_region, trim exception | ||
39 | table entries. */ | ||
40 | } | ||
41 | |||
42 | /* We don't need anything special. */ | ||
43 | int module_frob_arch_sections(Elf_Ehdr *hdr, | ||
44 | Elf_Shdr *sechdrs, | ||
45 | char *secstrings, | ||
46 | struct module *mod) | ||
47 | { | ||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | int apply_relocate(Elf32_Shdr *sechdrs, | ||
52 | const char *strtab, | ||
53 | unsigned int symindex, | ||
54 | unsigned int relsec, | ||
55 | struct module *me) | ||
56 | { | ||
57 | printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", me->name); | ||
58 | return -ENOEXEC; | ||
59 | } | ||
60 | |||
61 | int apply_relocate_add(Elf32_Shdr *sechdrs, | ||
62 | const char *strtab, | ||
63 | unsigned int symindex, | ||
64 | unsigned int relsec, | ||
65 | struct module *me) | ||
66 | { | ||
67 | printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", me->name); | ||
68 | return -ENOEXEC; | ||
69 | } | ||
70 | |||
71 | int module_finalize(const Elf_Ehdr *hdr, | ||
72 | const Elf_Shdr *sechdrs, | ||
73 | struct module *me) | ||
74 | { | ||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | void module_arch_cleanup(struct module *mod) | ||
79 | { | ||
80 | } | ||
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 | ||
29 | void (*pm_power_off)(void); | 30 | void (*pm_power_off)(void); |
31 | EXPORT_SYMBOL(pm_power_off); | ||
30 | 32 | ||
31 | extern void frv_change_cmode(int); | 33 | extern void frv_change_cmode(int); |
32 | 34 | ||
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 767ebb55bd83..5908deae9607 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
@@ -787,6 +787,7 @@ void __init setup_arch(char **cmdline_p) | |||
787 | #endif | 787 | #endif |
788 | 788 | ||
789 | /* register those serial ports that are available */ | 789 | /* register those serial ports that are available */ |
790 | #ifdef CONFIG_FRV_ONCPU_SERIAL | ||
790 | #ifndef CONFIG_GDBSTUB_UART0 | 791 | #ifndef CONFIG_GDBSTUB_UART0 |
791 | __reg(UART0_BASE + UART_IER * 8) = 0; | 792 | __reg(UART0_BASE + UART_IER * 8) = 0; |
792 | early_serial_setup(&__frv_uart0); | 793 | early_serial_setup(&__frv_uart0); |
@@ -795,6 +796,7 @@ void __init setup_arch(char **cmdline_p) | |||
795 | __reg(UART1_BASE + UART_IER * 8) = 0; | 796 | __reg(UART1_BASE + UART_IER * 8) = 0; |
796 | early_serial_setup(&__frv_uart1); | 797 | early_serial_setup(&__frv_uart1); |
797 | #endif | 798 | #endif |
799 | #endif | ||
798 | 800 | ||
799 | #if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) | 801 | #if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) |
800 | /* we need to initialize the Flashrom device here since we might | 802 | /* we need to initialize the Flashrom device here since we might |
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 | ||
192 | EXPORT_SYMBOL(do_gettimeofday); | ||
193 | |||
192 | int do_settimeofday(struct timespec *tv) | 194 | int 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 | |||
221 | EXPORT_SYMBOL(do_settimeofday); | 224 | EXPORT_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 | ||
254 | EXPORT_SYMBOL(dump_stack); | ||
255 | |||
253 | void show_stack(struct task_struct *task, unsigned long *sp) | 256 | void 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 | ||
65 | EXPORT_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 | |||
102 | EXPORT_SYMBOL(strnlen_user); | ||
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S index fceafd2cc202..f474534ba78a 100644 --- a/arch/frv/kernel/vmlinux.lds.S +++ b/arch/frv/kernel/vmlinux.lds.S | |||
@@ -112,6 +112,7 @@ SECTIONS | |||
112 | #endif | 112 | #endif |
113 | ) | 113 | ) |
114 | SCHED_TEXT | 114 | SCHED_TEXT |
115 | LOCK_TEXT | ||
115 | *(.fixup) | 116 | *(.fixup) |
116 | *(.gnu.warning) | 117 | *(.gnu.warning) |
117 | *(.exitcall.exit) | 118 | *(.exitcall.exit) |