.. | .. |
---|
14 | 14 | extern void __xchg_called_with_bad_pointer(void); |
---|
15 | 15 | |
---|
16 | 16 | /* __xchg32/64 defined in arch/parisc/lib/bitops.c */ |
---|
17 | | -extern unsigned long __xchg8(char, char *); |
---|
18 | | -extern unsigned long __xchg32(int, int *); |
---|
| 17 | +extern unsigned long __xchg8(char, volatile char *); |
---|
| 18 | +extern unsigned long __xchg32(int, volatile int *); |
---|
19 | 19 | #ifdef CONFIG_64BIT |
---|
20 | | -extern unsigned long __xchg64(unsigned long, unsigned long *); |
---|
| 20 | +extern unsigned long __xchg64(unsigned long, volatile unsigned long *); |
---|
21 | 21 | #endif |
---|
22 | 22 | |
---|
23 | 23 | /* optimizer better get rid of switch since size is a constant */ |
---|
24 | 24 | static inline unsigned long |
---|
25 | | -__xchg(unsigned long x, __volatile__ void *ptr, int size) |
---|
| 25 | +__xchg(unsigned long x, volatile void *ptr, int size) |
---|
26 | 26 | { |
---|
27 | 27 | switch (size) { |
---|
28 | 28 | #ifdef CONFIG_64BIT |
---|
29 | | - case 8: return __xchg64(x, (unsigned long *) ptr); |
---|
| 29 | + case 8: return __xchg64(x, (volatile unsigned long *) ptr); |
---|
30 | 30 | #endif |
---|
31 | | - case 4: return __xchg32((int) x, (int *) ptr); |
---|
32 | | - case 1: return __xchg8((char) x, (char *) ptr); |
---|
| 31 | + case 4: return __xchg32((int) x, (volatile int *) ptr); |
---|
| 32 | + case 1: return __xchg8((char) x, (volatile char *) ptr); |
---|
33 | 33 | } |
---|
34 | 34 | __xchg_called_with_bad_pointer(); |
---|
35 | 35 | return x; |
---|