Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7301
b: refs/heads/master
c: b2c0ab1
h: refs/heads/master
i:
  7299: 52a9051
v: v3
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Sep 6, 2005
1 parent b09c8ff commit ed4877d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4721e2214b5fd6eca48caea76afb1bad3148930f
refs/heads/master: b2c0ab17ba751abe13a28508b1ac7e9ca074cd87
19 changes: 8 additions & 11 deletions trunk/include/asm-ppc64/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static inline int __is_processor(unsigned long pv)
* is more like most of the other architectures.
*/
static __inline__ unsigned long
__xchg_u32(volatile int *m, unsigned long val)
__xchg_u32(volatile unsigned int *m, unsigned long val)
{
unsigned long dummy;

Expand Down Expand Up @@ -200,7 +200,7 @@ __xchg_u64(volatile long *m, unsigned long val)
extern void __xchg_called_with_bad_pointer(void);

static __inline__ unsigned long
__xchg(volatile void *ptr, unsigned long x, int size)
__xchg(volatile void *ptr, unsigned long x, unsigned int size)
{
switch (size) {
case 4:
Expand All @@ -223,7 +223,7 @@ __xchg(volatile void *ptr, unsigned long x, int size)
#define __HAVE_ARCH_CMPXCHG 1

static __inline__ unsigned long
__cmpxchg_u32(volatile int *p, int old, int new)
__cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
{
unsigned int prev;

Expand Down Expand Up @@ -271,7 +271,8 @@ __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new)
extern void __cmpxchg_called_with_bad_pointer(void);

static __inline__ unsigned long
__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new,
unsigned int size)
{
switch (size) {
case 4:
Expand All @@ -283,13 +284,9 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
return old;
}

#define cmpxchg(ptr,o,n) \
({ \
__typeof__(*(ptr)) _o_ = (o); \
__typeof__(*(ptr)) _n_ = (n); \
(__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
(unsigned long)_n_, sizeof(*(ptr))); \
})
#define cmpxchg(ptr,o,n)\
((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
(unsigned long)(n),sizeof(*(ptr))))

/*
* We handle most unaligned accesses in hardware. On the other hand
Expand Down

0 comments on commit ed4877d

Please sign in to comment.