aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/include/asm/atomic.h10
-rw-r--r--arch/xtensa/include/asm/bitops.h14
-rw-r--r--arch/xtensa/include/asm/posix_types.h2
-rw-r--r--arch/xtensa/include/asm/ptrace.h1
-rw-r--r--arch/xtensa/include/asm/unistd.h2
-rw-r--r--arch/xtensa/kernel/process.c2
6 files changed, 8 insertions, 23 deletions
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h
index a96a0619d0b7..23592eff67ad 100644
--- a/arch/xtensa/include/asm/atomic.h
+++ b/arch/xtensa/include/asm/atomic.h
@@ -225,15 +225,15 @@ static inline int atomic_sub_return(int i, atomic_t * v)
225#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 225#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
226 226
227/** 227/**
228 * atomic_add_unless - add unless the number is a given value 228 * __atomic_add_unless - add unless the number is a given value
229 * @v: pointer of type atomic_t 229 * @v: pointer of type atomic_t
230 * @a: the amount to add to v... 230 * @a: the amount to add to v...
231 * @u: ...unless v is equal to u. 231 * @u: ...unless v is equal to u.
232 * 232 *
233 * Atomically adds @a to @v, so long as it was not @u. 233 * Atomically adds @a to @v, so long as it was not @u.
234 * Returns non-zero if @v was not @u, and zero otherwise. 234 * Returns the old value of @v.
235 */ 235 */
236static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) 236static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
237{ 237{
238 int c, old; 238 int c, old;
239 c = atomic_read(v); 239 c = atomic_read(v);
@@ -245,10 +245,9 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
245 break; 245 break;
246 c = old; 246 c = old;
247 } 247 }
248 return c != (u); 248 return c;
249} 249}
250 250
251#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
252 251
253static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) 252static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
254{ 253{
@@ -292,7 +291,6 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
292#define smp_mb__before_atomic_inc() barrier() 291#define smp_mb__before_atomic_inc() barrier()
293#define smp_mb__after_atomic_inc() barrier() 292#define smp_mb__after_atomic_inc() barrier()
294 293
295#include <asm-generic/atomic-long.h>
296#endif /* __KERNEL__ */ 294#endif /* __KERNEL__ */
297 295
298#endif /* _XTENSA_ATOMIC_H */ 296#endif /* _XTENSA_ATOMIC_H */
diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/bitops.h
index c8fac8d8190d..40aa7fe77f66 100644
--- a/arch/xtensa/include/asm/bitops.h
+++ b/arch/xtensa/include/asm/bitops.h
@@ -108,19 +108,7 @@ static inline unsigned long __fls(unsigned long word)
108#include <asm-generic/bitops/find.h> 108#include <asm-generic/bitops/find.h>
109#include <asm-generic/bitops/le.h> 109#include <asm-generic/bitops/le.h>
110 110
111#ifdef __XTENSA_EL__ 111#include <asm-generic/bitops/ext2-atomic-setbit.h>
112# define ext2_set_bit_atomic(lock,nr,addr) \
113 test_and_set_bit((nr), (unsigned long*)(addr))
114# define ext2_clear_bit_atomic(lock,nr,addr) \
115 test_and_clear_bit((nr), (unsigned long*)(addr))
116#elif defined(__XTENSA_EB__)
117# define ext2_set_bit_atomic(lock,nr,addr) \
118 test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr))
119# define ext2_clear_bit_atomic(lock,nr,addr) \
120 test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr))
121#else
122# error processor byte order undefined!
123#endif
124 112
125#include <asm-generic/bitops/hweight.h> 113#include <asm-generic/bitops/hweight.h>
126#include <asm-generic/bitops/lock.h> 114#include <asm-generic/bitops/lock.h>
diff --git a/arch/xtensa/include/asm/posix_types.h b/arch/xtensa/include/asm/posix_types.h
index 43f9dd1126a4..6b2190c35882 100644
--- a/arch/xtensa/include/asm/posix_types.h
+++ b/arch/xtensa/include/asm/posix_types.h
@@ -58,7 +58,7 @@ typedef struct {
58 58
59#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) 59#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
60#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) 60#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
61#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) 61#define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d)))
62#define __FD_ZERO(set) \ 62#define __FD_ZERO(set) \
63 ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set))) 63 ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set)))
64 64
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h
index 0d42c934b66f..d85d38da8eec 100644
--- a/arch/xtensa/include/asm/ptrace.h
+++ b/arch/xtensa/include/asm/ptrace.h
@@ -120,7 +120,6 @@ struct pt_regs {
120 (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) 120 (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
121# define user_mode(regs) (((regs)->ps & 0x00000020)!=0) 121# define user_mode(regs) (((regs)->ps & 0x00000020)!=0)
122# define instruction_pointer(regs) ((regs)->pc) 122# define instruction_pointer(regs) ((regs)->pc)
123extern void show_regs(struct pt_regs *);
124 123
125# ifndef CONFIG_SMP 124# ifndef CONFIG_SMP
126# define profile_pc(regs) instruction_pointer(regs) 125# define profile_pc(regs) instruction_pointer(regs)
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
index a6f934f37f1a..798ee6d285a1 100644
--- a/arch/xtensa/include/asm/unistd.h
+++ b/arch/xtensa/include/asm/unistd.h
@@ -455,7 +455,7 @@ __SYSCALL(203, sys_reboot, 3)
455#define __NR_quotactl 204 455#define __NR_quotactl 204
456__SYSCALL(204, sys_quotactl, 4) 456__SYSCALL(204, sys_quotactl, 4)
457#define __NR_nfsservctl 205 457#define __NR_nfsservctl 205
458__SYSCALL(205, sys_nfsservctl, 3) 458__SYSCALL(205, sys_ni_syscall, 0)
459#define __NR__sysctl 206 459#define __NR__sysctl 206
460__SYSCALL(206, sys_sysctl, 1) 460__SYSCALL(206, sys_sysctl, 1)
461#define __NR_bdflush 207 461#define __NR_bdflush 207
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index e3558b9a58ba..47041e7c088c 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -40,7 +40,7 @@
40#include <asm/platform.h> 40#include <asm/platform.h>
41#include <asm/mmu.h> 41#include <asm/mmu.h>
42#include <asm/irq.h> 42#include <asm/irq.h>
43#include <asm/atomic.h> 43#include <linux/atomic.h>
44#include <asm/asm-offsets.h> 44#include <asm/asm-offsets.h>
45#include <asm/regs.h> 45#include <asm/regs.h>
46 46