aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300')
-rw-r--r--arch/h8300/Kconfig.cpu4
-rw-r--r--arch/h8300/include/asm/atomic.h6
-rw-r--r--arch/h8300/include/asm/posix_types.h2
-rw-r--r--arch/h8300/include/asm/processor.h2
-rw-r--r--arch/h8300/include/asm/ptrace.h1
-rw-r--r--arch/h8300/kernel/module.c45
-rw-r--r--arch/h8300/kernel/setup.c2
7 files changed, 5 insertions, 57 deletions
diff --git a/arch/h8300/Kconfig.cpu b/arch/h8300/Kconfig.cpu
index d236ab4232ca..15c22286ae79 100644
--- a/arch/h8300/Kconfig.cpu
+++ b/arch/h8300/Kconfig.cpu
@@ -162,9 +162,7 @@ config H8300_TPU_CH
162 int "TPU channel" 162 int "TPU channel"
163 depends on H8300_TPU 163 depends on H8300_TPU
164 164
165config PREEMPT 165source "kernel/Kconfig.preempt"
166 bool "Preemptible Kernel"
167 default n
168 166
169source "mm/Kconfig" 167source "mm/Kconfig"
170 168
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h
index 984221abb66d..f5a38c1f5489 100644
--- a/arch/h8300/include/asm/atomic.h
+++ b/arch/h8300/include/asm/atomic.h
@@ -104,7 +104,7 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
104 104
105#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 105#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
106 106
107static inline int atomic_add_unless(atomic_t *v, int a, int u) 107static inline int __atomic_add_unless(atomic_t *v, int a, int u)
108{ 108{
109 int ret; 109 int ret;
110 unsigned long flags; 110 unsigned long flags;
@@ -114,9 +114,8 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
114 if (ret != u) 114 if (ret != u)
115 v->counter += a; 115 v->counter += a;
116 local_irq_restore(flags); 116 local_irq_restore(flags);
117 return ret != u; 117 return ret;
118} 118}
119#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
120 119
121static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v) 120static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v)
122{ 121{
@@ -146,5 +145,4 @@ static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v)
146#define smp_mb__before_atomic_inc() barrier() 145#define smp_mb__before_atomic_inc() barrier()
147#define smp_mb__after_atomic_inc() barrier() 146#define smp_mb__after_atomic_inc() barrier()
148 147
149#include <asm-generic/atomic-long.h>
150#endif /* __ARCH_H8300_ATOMIC __ */ 148#endif /* __ARCH_H8300_ATOMIC __ */
diff --git a/arch/h8300/include/asm/posix_types.h b/arch/h8300/include/asm/posix_types.h
index 5c553927fc53..6f833a16f694 100644
--- a/arch/h8300/include/asm/posix_types.h
+++ b/arch/h8300/include/asm/posix_types.h
@@ -50,7 +50,7 @@ typedef struct {
50#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) 50#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
51 51
52#undef __FD_ISSET 52#undef __FD_ISSET
53#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) 53#define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d)))
54 54
55#undef __FD_ZERO 55#undef __FD_ZERO
56#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) 56#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff --git a/arch/h8300/include/asm/processor.h b/arch/h8300/include/asm/processor.h
index 69e8a34eb6d5..e834b6018897 100644
--- a/arch/h8300/include/asm/processor.h
+++ b/arch/h8300/include/asm/processor.h
@@ -81,7 +81,6 @@ struct thread_struct {
81#if defined(__H8300H__) 81#if defined(__H8300H__)
82#define start_thread(_regs, _pc, _usp) \ 82#define start_thread(_regs, _pc, _usp) \
83do { \ 83do { \
84 set_fs(USER_DS); /* reads from user space */ \
85 (_regs)->pc = (_pc); \ 84 (_regs)->pc = (_pc); \
86 (_regs)->ccr = 0x00; /* clear all flags */ \ 85 (_regs)->ccr = 0x00; /* clear all flags */ \
87 (_regs)->er5 = current->mm->start_data; /* GOT base */ \ 86 (_regs)->er5 = current->mm->start_data; /* GOT base */ \
@@ -91,7 +90,6 @@ do { \
91#if defined(__H8300S__) 90#if defined(__H8300S__)
92#define start_thread(_regs, _pc, _usp) \ 91#define start_thread(_regs, _pc, _usp) \
93do { \ 92do { \
94 set_fs(USER_DS); /* reads from user space */ \
95 (_regs)->pc = (_pc); \ 93 (_regs)->pc = (_pc); \
96 (_regs)->ccr = 0x00; /* clear kernel flag */ \ 94 (_regs)->ccr = 0x00; /* clear kernel flag */ \
97 (_regs)->exr = 0x78; /* enable all interrupts */ \ 95 (_regs)->exr = 0x78; /* enable all interrupts */ \
diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h
index d866c0efba87..d09c440bdba7 100644
--- a/arch/h8300/include/asm/ptrace.h
+++ b/arch/h8300/include/asm/ptrace.h
@@ -60,7 +60,6 @@ struct pt_regs {
60#define user_mode(regs) (!((regs)->ccr & PS_S)) 60#define user_mode(regs) (!((regs)->ccr & PS_S))
61#define instruction_pointer(regs) ((regs)->pc) 61#define instruction_pointer(regs) ((regs)->pc)
62#define profile_pc(regs) instruction_pointer(regs) 62#define profile_pc(regs) instruction_pointer(regs)
63extern void show_regs(struct pt_regs *);
64#endif /* __KERNEL__ */ 63#endif /* __KERNEL__ */
65#endif /* __ASSEMBLY__ */ 64#endif /* __ASSEMBLY__ */
66#endif /* _H8300_PTRACE_H */ 65#endif /* _H8300_PTRACE_H */
diff --git a/arch/h8300/kernel/module.c b/arch/h8300/kernel/module.c
index db4953dc4e1b..1d526e05db19 100644
--- a/arch/h8300/kernel/module.c
+++ b/arch/h8300/kernel/module.c
@@ -11,40 +11,6 @@
11#define DEBUGP(fmt...) 11#define DEBUGP(fmt...)
12#endif 12#endif
13 13
14void *module_alloc(unsigned long size)
15{
16 if (size == 0)
17 return NULL;
18 return vmalloc(size);
19}
20
21
22/* Free memory returned from module_alloc */
23void module_free(struct module *mod, void *module_region)
24{
25 vfree(module_region);
26}
27
28/* We don't need anything special. */
29int module_frob_arch_sections(Elf_Ehdr *hdr,
30 Elf_Shdr *sechdrs,
31 char *secstrings,
32 struct module *mod)
33{
34 return 0;
35}
36
37int apply_relocate(Elf32_Shdr *sechdrs,
38 const char *strtab,
39 unsigned int symindex,
40 unsigned int relsec,
41 struct module *me)
42{
43 printk(KERN_ERR "module %s: RELOCATION unsupported\n",
44 me->name);
45 return -ENOEXEC;
46}
47
48int apply_relocate_add(Elf32_Shdr *sechdrs, 14int apply_relocate_add(Elf32_Shdr *sechdrs,
49 const char *strtab, 15 const char *strtab,
50 unsigned int symindex, 16 unsigned int symindex,
@@ -107,14 +73,3 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
107 me->name, rela[i].r_offset); 73 me->name, rela[i].r_offset);
108 return -ENOEXEC; 74 return -ENOEXEC;
109} 75}
110
111int module_finalize(const Elf_Ehdr *hdr,
112 const Elf_Shdr *sechdrs,
113 struct module *me)
114{
115 return 0;
116}
117
118void module_arch_cleanup(struct module *mod)
119{
120}
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index 7fda657110eb..68d651081bd3 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -46,7 +46,7 @@
46#include <asm/regs267x.h> 46#include <asm/regs267x.h>
47#endif 47#endif
48 48
49#define STUBSIZE 0xc000; 49#define STUBSIZE 0xc000
50 50
51unsigned long rom_length; 51unsigned long rom_length;
52unsigned long memory_start; 52unsigned long memory_start;