aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300/include')
-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
4 files changed, 3 insertions, 8 deletions
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h
index 984221abb66..f5a38c1f548 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 5c553927fc5..6f833a16f69 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 69e8a34eb6d..e834b601889 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 d866c0efba8..d09c440bdba 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 */