aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-msm/include/mach/uncompress.h1
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h2
-rw-r--r--arch/blackfin/include/asm/cmpxchg.h3
-rw-r--r--arch/frv/mb93090-mb00/pci-dma.c1
-rw-r--r--arch/parisc/include/asm/atomic.h107
-rw-r--r--arch/parisc/include/asm/cmpxchg.h116
-rw-r--r--include/asm-generic/cmpxchg.h1
-rw-r--r--include/linux/firewire.h3
-rw-r--r--include/linux/platform_data/atmel.h6
-rw-r--r--kernel/irq_work.c1
10 files changed, 128 insertions, 113 deletions
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index 169a84007456..c14011fe832d 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -16,6 +16,7 @@
16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H 16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
17#define __ASM_ARCH_MSM_UNCOMPRESS_H 17#define __ASM_ARCH_MSM_UNCOMPRESS_H
18 18
19#include <asm/barrier.h>
19#include <asm/processor.h> 20#include <asm/processor.h>
20#include <mach/msm_iomap.h> 21#include <mach/msm_iomap.h>
21 22
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index 71733866cb4f..70742ec997f8 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -7,7 +7,7 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/serial.h> 8#include <linux/serial.h>
9#include <linux/platform_data/macb.h> 9#include <linux/platform_data/macb.h>
10#include <linux/platform_data/atmel_nand.h> 10#include <linux/platform_data/atmel.h>
11 11
12#define GPIO_PIN_NONE (-1) 12#define GPIO_PIN_NONE (-1)
13 13
diff --git a/arch/blackfin/include/asm/cmpxchg.h b/arch/blackfin/include/asm/cmpxchg.h
index ba2484f4cb2a..c05868cc61c1 100644
--- a/arch/blackfin/include/asm/cmpxchg.h
+++ b/arch/blackfin/include/asm/cmpxchg.h
@@ -122,7 +122,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
122 (unsigned long)(n), sizeof(*(ptr)))) 122 (unsigned long)(n), sizeof(*(ptr))))
123#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 123#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
124 124
125#include <asm-generic/cmpxchg.h> 125#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
126#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))
126 127
127#endif /* !CONFIG_SMP */ 128#endif /* !CONFIG_SMP */
128 129
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c
index 41098a3803a2..4f8d8bcdc7de 100644
--- a/arch/frv/mb93090-mb00/pci-dma.c
+++ b/arch/frv/mb93090-mb00/pci-dma.c
@@ -13,6 +13,7 @@
13#include <linux/dma-mapping.h> 13#include <linux/dma-mapping.h>
14#include <linux/list.h> 14#include <linux/list.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <linux/export.h>
16#include <linux/highmem.h> 17#include <linux/highmem.h>
17#include <linux/scatterlist.h> 18#include <linux/scatterlist.h>
18#include <asm/io.h> 19#include <asm/io.h>
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
index 3ae56073cc3d..6c6defc24619 100644
--- a/arch/parisc/include/asm/atomic.h
+++ b/arch/parisc/include/asm/atomic.h
@@ -6,6 +6,7 @@
6#define _ASM_PARISC_ATOMIC_H_ 6#define _ASM_PARISC_ATOMIC_H_
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <asm/cmpxchg.h>
9 10
10/* 11/*
11 * Atomic operations that C can't guarantee us. Useful for 12 * Atomic operations that C can't guarantee us. Useful for
@@ -48,112 +49,6 @@ extern arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
48# define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0) 49# define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
49#endif 50#endif
50 51
51/* This should get optimized out since it's never called.
52** Or get a link error if xchg is used "wrong".
53*/
54extern void __xchg_called_with_bad_pointer(void);
55
56
57/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
58extern unsigned long __xchg8(char, char *);
59extern unsigned long __xchg32(int, int *);
60#ifdef CONFIG_64BIT
61extern unsigned long __xchg64(unsigned long, unsigned long *);
62#endif
63
64/* optimizer better get rid of switch since size is a constant */
65static __inline__ unsigned long
66__xchg(unsigned long x, __volatile__ void * ptr, int size)
67{
68 switch(size) {
69#ifdef CONFIG_64BIT
70 case 8: return __xchg64(x,(unsigned long *) ptr);
71#endif
72 case 4: return __xchg32((int) x, (int *) ptr);
73 case 1: return __xchg8((char) x, (char *) ptr);
74 }
75 __xchg_called_with_bad_pointer();
76 return x;
77}
78
79
80/*
81** REVISIT - Abandoned use of LDCW in xchg() for now:
82** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
83** o and while we are at it, could CONFIG_64BIT code use LDCD too?
84**
85** if (__builtin_constant_p(x) && (x == NULL))
86** if (((unsigned long)p & 0xf) == 0)
87** return __ldcw(p);
88*/
89#define xchg(ptr,x) \
90 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
91
92
93#define __HAVE_ARCH_CMPXCHG 1
94
95/* bug catcher for when unsupported size is used - won't link */
96extern void __cmpxchg_called_with_bad_pointer(void);
97
98/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
99extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old, unsigned int new_);
100extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new_);
101
102/* don't worry...optimizer will get rid of most of this */
103static __inline__ unsigned long
104__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
105{
106 switch(size) {
107#ifdef CONFIG_64BIT
108 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
109#endif
110 case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_);
111 }
112 __cmpxchg_called_with_bad_pointer();
113 return old;
114}
115
116#define cmpxchg(ptr,o,n) \
117 ({ \
118 __typeof__(*(ptr)) _o_ = (o); \
119 __typeof__(*(ptr)) _n_ = (n); \
120 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
121 (unsigned long)_n_, sizeof(*(ptr))); \
122 })
123
124#include <asm-generic/cmpxchg-local.h>
125
126static inline unsigned long __cmpxchg_local(volatile void *ptr,
127 unsigned long old,
128 unsigned long new_, int size)
129{
130 switch (size) {
131#ifdef CONFIG_64BIT
132 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
133#endif
134 case 4: return __cmpxchg_u32(ptr, old, new_);
135 default:
136 return __cmpxchg_local_generic(ptr, old, new_, size);
137 }
138}
139
140/*
141 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
142 * them available.
143 */
144#define cmpxchg_local(ptr, o, n) \
145 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
146 (unsigned long)(n), sizeof(*(ptr))))
147#ifdef CONFIG_64BIT
148#define cmpxchg64_local(ptr, o, n) \
149 ({ \
150 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
151 cmpxchg_local((ptr), (o), (n)); \
152 })
153#else
154#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
155#endif
156
157/* 52/*
158 * Note that we need not lock read accesses - aligned word writes/reads 53 * Note that we need not lock read accesses - aligned word writes/reads
159 * are atomic, so a reader never sees inconsistent values. 54 * are atomic, so a reader never sees inconsistent values.
diff --git a/arch/parisc/include/asm/cmpxchg.h b/arch/parisc/include/asm/cmpxchg.h
new file mode 100644
index 000000000000..dbd13354ec41
--- /dev/null
+++ b/arch/parisc/include/asm/cmpxchg.h
@@ -0,0 +1,116 @@
1/*
2 * forked from parisc asm/atomic.h which was:
3 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
4 * Copyright (C) 2006 Kyle McMartin <kyle@parisc-linux.org>
5 */
6
7#ifndef _ASM_PARISC_CMPXCHG_H_
8#define _ASM_PARISC_CMPXCHG_H_
9
10/* This should get optimized out since it's never called.
11** Or get a link error if xchg is used "wrong".
12*/
13extern void __xchg_called_with_bad_pointer(void);
14
15/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
16extern unsigned long __xchg8(char, char *);
17extern unsigned long __xchg32(int, int *);
18#ifdef CONFIG_64BIT
19extern unsigned long __xchg64(unsigned long, unsigned long *);
20#endif
21
22/* optimizer better get rid of switch since size is a constant */
23static inline unsigned long
24__xchg(unsigned long x, __volatile__ void *ptr, int size)
25{
26 switch (size) {
27#ifdef CONFIG_64BIT
28 case 8: return __xchg64(x, (unsigned long *) ptr);
29#endif
30 case 4: return __xchg32((int) x, (int *) ptr);
31 case 1: return __xchg8((char) x, (char *) ptr);
32 }
33 __xchg_called_with_bad_pointer();
34 return x;
35}
36
37/*
38** REVISIT - Abandoned use of LDCW in xchg() for now:
39** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
40** o and while we are at it, could CONFIG_64BIT code use LDCD too?
41**
42** if (__builtin_constant_p(x) && (x == NULL))
43** if (((unsigned long)p & 0xf) == 0)
44** return __ldcw(p);
45*/
46#define xchg(ptr, x) \
47 ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
48
49#define __HAVE_ARCH_CMPXCHG 1
50
51/* bug catcher for when unsupported size is used - won't link */
52extern void __cmpxchg_called_with_bad_pointer(void);
53
54/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
55extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old,
56 unsigned int new_);
57extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr,
58 unsigned long old, unsigned long new_);
59
60/* don't worry...optimizer will get rid of most of this */
61static inline unsigned long
62__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
63{
64 switch (size) {
65#ifdef CONFIG_64BIT
66 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
67#endif
68 case 4: return __cmpxchg_u32((unsigned int *)ptr,
69 (unsigned int)old, (unsigned int)new_);
70 }
71 __cmpxchg_called_with_bad_pointer();
72 return old;
73}
74
75#define cmpxchg(ptr, o, n) \
76({ \
77 __typeof__(*(ptr)) _o_ = (o); \
78 __typeof__(*(ptr)) _n_ = (n); \
79 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
80 (unsigned long)_n_, sizeof(*(ptr))); \
81})
82
83#include <asm-generic/cmpxchg-local.h>
84
85static inline unsigned long __cmpxchg_local(volatile void *ptr,
86 unsigned long old,
87 unsigned long new_, int size)
88{
89 switch (size) {
90#ifdef CONFIG_64BIT
91 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
92#endif
93 case 4: return __cmpxchg_u32(ptr, old, new_);
94 default:
95 return __cmpxchg_local_generic(ptr, old, new_, size);
96 }
97}
98
99/*
100 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
101 * them available.
102 */
103#define cmpxchg_local(ptr, o, n) \
104 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
105 (unsigned long)(n), sizeof(*(ptr))))
106#ifdef CONFIG_64BIT
107#define cmpxchg64_local(ptr, o, n) \
108({ \
109 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
110 cmpxchg_local((ptr), (o), (n)); \
111})
112#else
113#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
114#endif
115
116#endif /* _ASM_PARISC_CMPXCHG_H_ */
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h
index 8a361834dc25..14883026015d 100644
--- a/include/asm-generic/cmpxchg.h
+++ b/include/asm-generic/cmpxchg.h
@@ -10,6 +10,7 @@
10#error "Cannot use generic cmpxchg on SMP" 10#error "Cannot use generic cmpxchg on SMP"
11#endif 11#endif
12 12
13#include <linux/types.h>
13#include <linux/irqflags.h> 14#include <linux/irqflags.h>
14 15
15#ifndef xchg 16#ifndef xchg
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index 4db7b68f0582..cdc9b719e9c7 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -2,6 +2,7 @@
2#define _LINUX_FIREWIRE_H 2#define _LINUX_FIREWIRE_H
3 3
4#include <linux/completion.h> 4#include <linux/completion.h>
5#include <linux/device.h>
5#include <linux/dma-mapping.h> 6#include <linux/dma-mapping.h>
6#include <linux/kernel.h> 7#include <linux/kernel.h>
7#include <linux/kref.h> 8#include <linux/kref.h>
@@ -64,8 +65,6 @@
64#define CSR_MODEL 0x17 65#define CSR_MODEL 0x17
65#define CSR_DIRECTORY_ID 0x20 66#define CSR_DIRECTORY_ID 0x20
66 67
67struct device;
68
69struct fw_csr_iterator { 68struct fw_csr_iterator {
70 const u32 *p; 69 const u32 *p;
71 const u32 *end; 70 const u32 *end;
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
index d056263545b1..b0f2c56a8ea2 100644
--- a/include/linux/platform_data/atmel.h
+++ b/include/linux/platform_data/atmel.h
@@ -4,8 +4,8 @@
4 * GPL v2 Only 4 * GPL v2 Only
5 */ 5 */
6 6
7#ifndef __ATMEL_NAND_H__ 7#ifndef __ATMEL_H__
8#define __ATMEL_NAND_H__ 8#define __ATMEL_H__
9 9
10#include <linux/mtd/nand.h> 10#include <linux/mtd/nand.h>
11 11
@@ -24,4 +24,4 @@ struct atmel_nand_data {
24 unsigned int num_parts; 24 unsigned int num_parts;
25}; 25};
26 26
27#endif /* __ATMEL_NAND_H__ */ 27#endif /* __ATMEL_H__ */
diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index c3c46c72046e..0c56d44b9fd5 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -5,6 +5,7 @@
5 * context. The enqueueing is NMI-safe. 5 * context. The enqueueing is NMI-safe.
6 */ 6 */
7 7
8#include <linux/bug.h>
8#include <linux/kernel.h> 9#include <linux/kernel.h>
9#include <linux/export.h> 10#include <linux/export.h>
10#include <linux/irq_work.h> 11#include <linux/irq_work.h>