diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-27 23:38:53 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-27 23:38:53 -0400 |
commit | 4542437679de448de0f75bc901dab380d6a5bc5b (patch) | |
tree | 1a436c9b6f9459c3938e2bb1ab7ad2c888d0003c /include | |
parent | 2227718ca2f7d5fcc2741c1bbca4d0c2efd340ce (diff) | |
parent | 741b2252a5e14d6c60a913c77a6099abe73a854a (diff) |
Merge in v2.6.14 by hand
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/atomic.h | 14 | ||||
-rw-r--r-- | include/asm-alpha/barrier.h | 34 | ||||
-rw-r--r-- | include/asm-alpha/system.h | 31 | ||||
-rw-r--r-- | include/asm-arm/bitops.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/pci.h | 6 | ||||
-rw-r--r-- | include/linux/idr.h | 1 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/net/ax25.h | 2 | ||||
-rw-r--r-- | include/net/llc_pdu.h | 4 |
9 files changed, 55 insertions, 40 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h index 1b383e3cb68c..20ac3d95ecd9 100644 --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ALPHA_ATOMIC_H | 1 | #ifndef _ALPHA_ATOMIC_H |
2 | #define _ALPHA_ATOMIC_H | 2 | #define _ALPHA_ATOMIC_H |
3 | 3 | ||
4 | #include <asm/barrier.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * Atomic operations that C can't guarantee us. Useful for | 7 | * Atomic operations that C can't guarantee us. Useful for |
6 | * resource counting etc... | 8 | * resource counting etc... |
@@ -100,18 +102,19 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
100 | static __inline__ long atomic_add_return(int i, atomic_t * v) | 102 | static __inline__ long atomic_add_return(int i, atomic_t * v) |
101 | { | 103 | { |
102 | long temp, result; | 104 | long temp, result; |
105 | smp_mb(); | ||
103 | __asm__ __volatile__( | 106 | __asm__ __volatile__( |
104 | "1: ldl_l %0,%1\n" | 107 | "1: ldl_l %0,%1\n" |
105 | " addl %0,%3,%2\n" | 108 | " addl %0,%3,%2\n" |
106 | " addl %0,%3,%0\n" | 109 | " addl %0,%3,%0\n" |
107 | " stl_c %0,%1\n" | 110 | " stl_c %0,%1\n" |
108 | " beq %0,2f\n" | 111 | " beq %0,2f\n" |
109 | " mb\n" | ||
110 | ".subsection 2\n" | 112 | ".subsection 2\n" |
111 | "2: br 1b\n" | 113 | "2: br 1b\n" |
112 | ".previous" | 114 | ".previous" |
113 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 115 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
114 | :"Ir" (i), "m" (v->counter) : "memory"); | 116 | :"Ir" (i), "m" (v->counter) : "memory"); |
117 | smp_mb(); | ||
115 | return result; | 118 | return result; |
116 | } | 119 | } |
117 | 120 | ||
@@ -120,54 +123,57 @@ static __inline__ long atomic_add_return(int i, atomic_t * v) | |||
120 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) | 123 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) |
121 | { | 124 | { |
122 | long temp, result; | 125 | long temp, result; |
126 | smp_mb(); | ||
123 | __asm__ __volatile__( | 127 | __asm__ __volatile__( |
124 | "1: ldq_l %0,%1\n" | 128 | "1: ldq_l %0,%1\n" |
125 | " addq %0,%3,%2\n" | 129 | " addq %0,%3,%2\n" |
126 | " addq %0,%3,%0\n" | 130 | " addq %0,%3,%0\n" |
127 | " stq_c %0,%1\n" | 131 | " stq_c %0,%1\n" |
128 | " beq %0,2f\n" | 132 | " beq %0,2f\n" |
129 | " mb\n" | ||
130 | ".subsection 2\n" | 133 | ".subsection 2\n" |
131 | "2: br 1b\n" | 134 | "2: br 1b\n" |
132 | ".previous" | 135 | ".previous" |
133 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 136 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
134 | :"Ir" (i), "m" (v->counter) : "memory"); | 137 | :"Ir" (i), "m" (v->counter) : "memory"); |
138 | smp_mb(); | ||
135 | return result; | 139 | return result; |
136 | } | 140 | } |
137 | 141 | ||
138 | static __inline__ long atomic_sub_return(int i, atomic_t * v) | 142 | static __inline__ long atomic_sub_return(int i, atomic_t * v) |
139 | { | 143 | { |
140 | long temp, result; | 144 | long temp, result; |
145 | smp_mb(); | ||
141 | __asm__ __volatile__( | 146 | __asm__ __volatile__( |
142 | "1: ldl_l %0,%1\n" | 147 | "1: ldl_l %0,%1\n" |
143 | " subl %0,%3,%2\n" | 148 | " subl %0,%3,%2\n" |
144 | " subl %0,%3,%0\n" | 149 | " subl %0,%3,%0\n" |
145 | " stl_c %0,%1\n" | 150 | " stl_c %0,%1\n" |
146 | " beq %0,2f\n" | 151 | " beq %0,2f\n" |
147 | " mb\n" | ||
148 | ".subsection 2\n" | 152 | ".subsection 2\n" |
149 | "2: br 1b\n" | 153 | "2: br 1b\n" |
150 | ".previous" | 154 | ".previous" |
151 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 155 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
152 | :"Ir" (i), "m" (v->counter) : "memory"); | 156 | :"Ir" (i), "m" (v->counter) : "memory"); |
157 | smp_mb(); | ||
153 | return result; | 158 | return result; |
154 | } | 159 | } |
155 | 160 | ||
156 | static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | 161 | static __inline__ long atomic64_sub_return(long i, atomic64_t * v) |
157 | { | 162 | { |
158 | long temp, result; | 163 | long temp, result; |
164 | smp_mb(); | ||
159 | __asm__ __volatile__( | 165 | __asm__ __volatile__( |
160 | "1: ldq_l %0,%1\n" | 166 | "1: ldq_l %0,%1\n" |
161 | " subq %0,%3,%2\n" | 167 | " subq %0,%3,%2\n" |
162 | " subq %0,%3,%0\n" | 168 | " subq %0,%3,%0\n" |
163 | " stq_c %0,%1\n" | 169 | " stq_c %0,%1\n" |
164 | " beq %0,2f\n" | 170 | " beq %0,2f\n" |
165 | " mb\n" | ||
166 | ".subsection 2\n" | 171 | ".subsection 2\n" |
167 | "2: br 1b\n" | 172 | "2: br 1b\n" |
168 | ".previous" | 173 | ".previous" |
169 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 174 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
170 | :"Ir" (i), "m" (v->counter) : "memory"); | 175 | :"Ir" (i), "m" (v->counter) : "memory"); |
176 | smp_mb(); | ||
171 | return result; | 177 | return result; |
172 | } | 178 | } |
173 | 179 | ||
diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h new file mode 100644 index 000000000000..229c83fe77cb --- /dev/null +++ b/include/asm-alpha/barrier.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __BARRIER_H | ||
2 | #define __BARRIER_H | ||
3 | |||
4 | #define mb() \ | ||
5 | __asm__ __volatile__("mb": : :"memory") | ||
6 | |||
7 | #define rmb() \ | ||
8 | __asm__ __volatile__("mb": : :"memory") | ||
9 | |||
10 | #define wmb() \ | ||
11 | __asm__ __volatile__("wmb": : :"memory") | ||
12 | |||
13 | #define read_barrier_depends() \ | ||
14 | __asm__ __volatile__("mb": : :"memory") | ||
15 | |||
16 | #ifdef CONFIG_SMP | ||
17 | #define smp_mb() mb() | ||
18 | #define smp_rmb() rmb() | ||
19 | #define smp_wmb() wmb() | ||
20 | #define smp_read_barrier_depends() read_barrier_depends() | ||
21 | #else | ||
22 | #define smp_mb() barrier() | ||
23 | #define smp_rmb() barrier() | ||
24 | #define smp_wmb() barrier() | ||
25 | #define smp_read_barrier_depends() barrier() | ||
26 | #endif | ||
27 | |||
28 | #define set_mb(var, value) \ | ||
29 | do { var = value; mb(); } while (0) | ||
30 | |||
31 | #define set_wmb(var, value) \ | ||
32 | do { var = value; wmb(); } while (0) | ||
33 | |||
34 | #endif /* __BARRIER_H */ | ||
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index bdb4d66418f1..050e86d12891 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/pal.h> | 5 | #include <asm/pal.h> |
6 | #include <asm/page.h> | 6 | #include <asm/page.h> |
7 | #include <asm/barrier.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * System defines.. Note that this is included both from .c and .S | 10 | * System defines.. Note that this is included both from .c and .S |
@@ -139,36 +140,6 @@ extern void halt(void) __attribute__((noreturn)); | |||
139 | struct task_struct; | 140 | struct task_struct; |
140 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); | 141 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); |
141 | 142 | ||
142 | #define mb() \ | ||
143 | __asm__ __volatile__("mb": : :"memory") | ||
144 | |||
145 | #define rmb() \ | ||
146 | __asm__ __volatile__("mb": : :"memory") | ||
147 | |||
148 | #define wmb() \ | ||
149 | __asm__ __volatile__("wmb": : :"memory") | ||
150 | |||
151 | #define read_barrier_depends() \ | ||
152 | __asm__ __volatile__("mb": : :"memory") | ||
153 | |||
154 | #ifdef CONFIG_SMP | ||
155 | #define smp_mb() mb() | ||
156 | #define smp_rmb() rmb() | ||
157 | #define smp_wmb() wmb() | ||
158 | #define smp_read_barrier_depends() read_barrier_depends() | ||
159 | #else | ||
160 | #define smp_mb() barrier() | ||
161 | #define smp_rmb() barrier() | ||
162 | #define smp_wmb() barrier() | ||
163 | #define smp_read_barrier_depends() barrier() | ||
164 | #endif | ||
165 | |||
166 | #define set_mb(var, value) \ | ||
167 | do { var = value; mb(); } while (0) | ||
168 | |||
169 | #define set_wmb(var, value) \ | ||
170 | do { var = value; wmb(); } while (0) | ||
171 | |||
172 | #define imb() \ | 143 | #define imb() \ |
173 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") | 144 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") |
174 | 145 | ||
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h index aad7aad026b3..e007dd990da5 100644 --- a/include/asm-arm/bitops.h +++ b/include/asm-arm/bitops.h | |||
@@ -347,7 +347,6 @@ static inline unsigned long __ffs(unsigned long word) | |||
347 | * the clz instruction for much better code efficiency. | 347 | * the clz instruction for much better code efficiency. |
348 | */ | 348 | */ |
349 | 349 | ||
350 | static __inline__ int generic_fls(int x); | ||
351 | #define fls(x) \ | 350 | #define fls(x) \ |
352 | ( __builtin_constant_p(x) ? generic_fls(x) : \ | 351 | ( __builtin_constant_p(x) ? generic_fls(x) : \ |
353 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) | 352 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) |
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index 5a82a6762c21..eeb3088a1c9e 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -50,10 +50,10 @@ extern int iommu_setup(char *opt); | |||
50 | * address space. The networking and block device layers use | 50 | * address space. The networking and block device layers use |
51 | * this boolean for bounce buffer decisions | 51 | * this boolean for bounce buffer decisions |
52 | * | 52 | * |
53 | * On x86-64 it mostly equals, but we set it to zero to tell some subsystems | 53 | * On AMD64 it mostly equals, but we set it to zero to tell some subsystems |
54 | * that an hard or soft IOMMU is available. | 54 | * that an IOMMU is available. |
55 | */ | 55 | */ |
56 | #define PCI_DMA_BUS_IS_PHYS 0 | 56 | #define PCI_DMA_BUS_IS_PHYS (no_iommu ? 1 : 0) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * x86-64 always supports DAC, but sometimes it is useful to force | 59 | * x86-64 always supports DAC, but sometimes it is useful to force |
diff --git a/include/linux/idr.h b/include/linux/idr.h index ca3b7e462576..3d5de45f961b 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -75,4 +75,5 @@ int idr_pre_get(struct idr *idp, unsigned gfp_mask); | |||
75 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 75 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
76 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 76 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
77 | void idr_remove(struct idr *idp, int id); | 77 | void idr_remove(struct idr *idp, int id); |
78 | void idr_destroy(struct idr *idp); | ||
78 | void idr_init(struct idr *idp); | 79 | void idr_init(struct idr *idp); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f74ed9462475..71834f05504f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -723,6 +723,7 @@ | |||
723 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 | 723 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 |
724 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 | 724 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 |
725 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 | 725 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 |
726 | #define PCI_DEVICE_ID_HP_DIVA_HURRICANE 0x132a | ||
726 | #define PCI_DEVICE_ID_HP_CISS 0x3210 | 727 | #define PCI_DEVICE_ID_HP_CISS 0x3210 |
727 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 728 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
728 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 | 729 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 |
@@ -2696,6 +2697,7 @@ | |||
2696 | 2697 | ||
2697 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2698 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2698 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2699 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2700 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | ||
2699 | 2701 | ||
2700 | #define PCI_VENDOR_ID_TIGERJET 0xe159 | 2702 | #define PCI_VENDOR_ID_TIGERJET 0xe159 |
2701 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 | 2703 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 9dbcd9e51c00..30bb4a893237 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -171,7 +171,7 @@ typedef struct { | |||
171 | ax25_address calls[AX25_MAX_DIGIS]; | 171 | ax25_address calls[AX25_MAX_DIGIS]; |
172 | unsigned char repeated[AX25_MAX_DIGIS]; | 172 | unsigned char repeated[AX25_MAX_DIGIS]; |
173 | unsigned char ndigi; | 173 | unsigned char ndigi; |
174 | char lastrepeat; | 174 | signed char lastrepeat; |
175 | } ax25_digi; | 175 | } ax25_digi; |
176 | 176 | ||
177 | typedef struct ax25_route { | 177 | typedef struct ax25_route { |
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index f45c37d89cf7..c7a959428b4f 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -254,8 +254,10 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) | |||
254 | { | 254 | { |
255 | if (skb->protocol == ntohs(ETH_P_802_2)) | 255 | if (skb->protocol == ntohs(ETH_P_802_2)) |
256 | memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); | 256 | memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); |
257 | else if (skb->protocol == ntohs(ETH_P_TR_802_2)) | 257 | else if (skb->protocol == ntohs(ETH_P_TR_802_2)) { |
258 | memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); | 258 | memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); |
259 | *sa &= 0x7F; | ||
260 | } | ||
259 | } | 261 | } |
260 | 262 | ||
261 | /** | 263 | /** |