aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/include/asm/atomic.h6
-rw-r--r--arch/frv/include/asm/bitops.h3
-rw-r--r--arch/frv/include/asm/hardirq.h2
-rw-r--r--arch/frv/include/asm/processor.h1
-rw-r--r--arch/frv/include/asm/ptrace.h1
-rw-r--r--arch/frv/kernel/irq.c2
-rw-r--r--arch/frv/kernel/module.c57
-rw-r--r--arch/frv/kernel/process.c5
-rw-r--r--arch/frv/mm/pgalloc.c8
9 files changed, 10 insertions, 75 deletions
diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h
index fae32c7fdcb6..0d8a7d661740 100644
--- a/arch/frv/include/asm/atomic.h
+++ b/arch/frv/include/asm/atomic.h
@@ -241,7 +241,7 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v);
241#define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter)) 241#define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter))
242#define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter)) 242#define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter))
243 243
244static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) 244static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
245{ 245{
246 int c, old; 246 int c, old;
247 c = atomic_read(v); 247 c = atomic_read(v);
@@ -253,10 +253,8 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
253 break; 253 break;
254 c = old; 254 c = old;
255 } 255 }
256 return c != (u); 256 return c;
257} 257}
258 258
259#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
260 259
261#include <asm-generic/atomic-long.h>
262#endif /* _ASM_ATOMIC_H */ 260#endif /* _ASM_ATOMIC_H */
diff --git a/arch/frv/include/asm/bitops.h b/arch/frv/include/asm/bitops.h
index a1d00b0c6ed7..57bf85db893f 100644
--- a/arch/frv/include/asm/bitops.h
+++ b/arch/frv/include/asm/bitops.h
@@ -403,8 +403,7 @@ int __ilog2_u64(u64 n)
403 403
404#include <asm-generic/bitops/le.h> 404#include <asm-generic/bitops/le.h>
405 405
406#define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit ((nr) ^ 0x18, (addr)) 406#include <asm-generic/bitops/ext2-atomic-setbit.h>
407#define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr) ^ 0x18, (addr))
408 407
409#endif /* __KERNEL__ */ 408#endif /* __KERNEL__ */
410 409
diff --git a/arch/frv/include/asm/hardirq.h b/arch/frv/include/asm/hardirq.h
index 5fc8b6f5bc55..c62833d6ebbb 100644
--- a/arch/frv/include/asm/hardirq.h
+++ b/arch/frv/include/asm/hardirq.h
@@ -12,7 +12,7 @@
12#ifndef __ASM_HARDIRQ_H 12#ifndef __ASM_HARDIRQ_H
13#define __ASM_HARDIRQ_H 13#define __ASM_HARDIRQ_H
14 14
15#include <asm/atomic.h> 15#include <linux/atomic.h>
16 16
17extern atomic_t irq_err_count; 17extern atomic_t irq_err_count;
18static inline void ack_bad_irq(int irq) 18static inline void ack_bad_irq(int irq)
diff --git a/arch/frv/include/asm/processor.h b/arch/frv/include/asm/processor.h
index 4b789ab182b0..81c2e271d620 100644
--- a/arch/frv/include/asm/processor.h
+++ b/arch/frv/include/asm/processor.h
@@ -97,7 +97,6 @@ extern struct task_struct *__kernel_current_task;
97 */ 97 */
98#define start_thread(_regs, _pc, _usp) \ 98#define start_thread(_regs, _pc, _usp) \
99do { \ 99do { \
100 set_fs(USER_DS); /* reads from user space */ \
101 __frame = __kernel_frame0_ptr; \ 100 __frame = __kernel_frame0_ptr; \
102 __frame->pc = (_pc); \ 101 __frame->pc = (_pc); \
103 __frame->psr &= ~PSR_S; \ 102 __frame->psr &= ~PSR_S; \
diff --git a/arch/frv/include/asm/ptrace.h b/arch/frv/include/asm/ptrace.h
index 6bfad4cf1907..ef6635ca4ecb 100644
--- a/arch/frv/include/asm/ptrace.h
+++ b/arch/frv/include/asm/ptrace.h
@@ -78,7 +78,6 @@ register struct pt_regs *__frame asm("gr28");
78#define user_stack_pointer(regs) ((regs)->sp) 78#define user_stack_pointer(regs) ((regs)->sp)
79 79
80extern unsigned long user_stack(const struct pt_regs *); 80extern unsigned long user_stack(const struct pt_regs *);
81extern void show_regs(struct pt_regs *);
82#define profile_pc(regs) ((regs)->pc) 81#define profile_pc(regs) ((regs)->pc)
83 82
84#define task_pt_regs(task) ((task)->thread.frame0) 83#define task_pt_regs(task) ((task)->thread.frame0)
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c
index a5f624a9f559..3facbc28cbbc 100644
--- a/arch/frv/kernel/irq.c
+++ b/arch/frv/kernel/irq.c
@@ -25,7 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/bitops.h> 26#include <linux/bitops.h>
27 27
28#include <asm/atomic.h> 28#include <linux/atomic.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/smp.h> 30#include <asm/smp.h>
31#include <asm/system.h> 31#include <asm/system.h>
diff --git a/arch/frv/kernel/module.c b/arch/frv/kernel/module.c
index 711763c8a6f3..9d9835f1fe2b 100644
--- a/arch/frv/kernel/module.c
+++ b/arch/frv/kernel/module.c
@@ -22,57 +22,6 @@
22#define DEBUGP(fmt...) 22#define DEBUGP(fmt...)
23#endif 23#endif
24 24
25void *module_alloc(unsigned long size) 25/* TODO: At least one of apply_relocate or apply_relocate_add must be
26{ 26 * implemented in order to get working module support.
27 if (size == 0) 27 */
28 return NULL;
29
30 return vmalloc_exec(size);
31}
32
33
34/* Free memory returned from module_alloc */
35void module_free(struct module *mod, void *module_region)
36{
37 vfree(module_region);
38}
39
40/* We don't need anything special. */
41int module_frob_arch_sections(Elf_Ehdr *hdr,
42 Elf_Shdr *sechdrs,
43 char *secstrings,
44 struct module *mod)
45{
46 return 0;
47}
48
49int apply_relocate(Elf32_Shdr *sechdrs,
50 const char *strtab,
51 unsigned int symindex,
52 unsigned int relsec,
53 struct module *me)
54{
55 printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", me->name);
56 return -ENOEXEC;
57}
58
59int apply_relocate_add(Elf32_Shdr *sechdrs,
60 const char *strtab,
61 unsigned int symindex,
62 unsigned int relsec,
63 struct module *me)
64{
65 printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", me->name);
66 return -ENOEXEC;
67}
68
69int module_finalize(const Elf_Ehdr *hdr,
70 const Elf_Shdr *sechdrs,
71 struct module *me)
72{
73 return 0;
74}
75
76void module_arch_cleanup(struct module *mod)
77{
78}
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 9d3597526467..3901df1213c0 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -143,10 +143,7 @@ void machine_power_off(void)
143 143
144void flush_thread(void) 144void flush_thread(void)
145{ 145{
146#if 0 //ndef NO_FPU 146 /* nothing */
147 unsigned long zero = 0;
148#endif
149 set_fs(USER_DS);
150} 147}
151 148
152inline unsigned long user_stack(const struct pt_regs *regs) 149inline unsigned long user_stack(const struct pt_regs *regs)
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c
index c42c83d507bc..4fb63a36bd52 100644
--- a/arch/frv/mm/pgalloc.c
+++ b/arch/frv/mm/pgalloc.c
@@ -133,13 +133,7 @@ void pgd_dtor(void *pgd)
133 133
134pgd_t *pgd_alloc(struct mm_struct *mm) 134pgd_t *pgd_alloc(struct mm_struct *mm)
135{ 135{
136 pgd_t *pgd; 136 return quicklist_alloc(0, GFP_KERNEL, pgd_ctor);
137
138 pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor);
139 if (!pgd)
140 return pgd;
141
142 return pgd;
143} 137}
144 138
145void pgd_free(struct mm_struct *mm, pgd_t *pgd) 139void pgd_free(struct mm_struct *mm, pgd_t *pgd)