diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-02 01:13:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-02 01:13:38 -0500 |
commit | ff9c38bba37937adb909cceb2a6521f2e92e17c6 (patch) | |
tree | 93bd6152d9fa28348be99ef1c788040cc7b7a94d /arch/mips/include/asm | |
parent | 65c0cfafce9575319fb6f70080fbe226e5617e3b (diff) | |
parent | b2722b1c3a893ec6021508da15b32282ec79f4da (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/ht.c
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/mman.h | 1 | ||||
-rw-r--r-- | arch/mips/include/asm/system.h | 15 |
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/asm/mman.h index a2250f390a2..c892bfb3e2c 100644 --- a/arch/mips/include/asm/mman.h +++ b/arch/mips/include/asm/mman.h | |||
@@ -75,6 +75,7 @@ | |||
75 | 75 | ||
76 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 76 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
78 | #define MADV_HWPOISON 100 /* poison a page for testing */ | ||
78 | 79 | ||
79 | /* compatibility flags */ | 80 | /* compatibility flags */ |
80 | #define MAP_FILE 0 | 81 | #define MAP_FILE 0 |
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h index fcf5f98d90c..83b5509e09e 100644 --- a/arch/mips/include/asm/system.h +++ b/arch/mips/include/asm/system.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _ASM_SYSTEM_H | 12 | #ifndef _ASM_SYSTEM_H |
13 | #define _ASM_SYSTEM_H | 13 | #define _ASM_SYSTEM_H |
14 | 14 | ||
15 | #include <linux/kernel.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/irqflags.h> | 17 | #include <linux/irqflags.h> |
17 | 18 | ||
@@ -193,10 +194,6 @@ extern __u64 __xchg_u64_unsupported_on_32bit_kernels(volatile __u64 * m, __u64 v | |||
193 | #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels | 194 | #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels |
194 | #endif | 195 | #endif |
195 | 196 | ||
196 | /* This function doesn't exist, so you'll get a linker error | ||
197 | if something tries to do an invalid xchg(). */ | ||
198 | extern void __xchg_called_with_bad_pointer(void); | ||
199 | |||
200 | static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) | 197 | static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) |
201 | { | 198 | { |
202 | switch (size) { | 199 | switch (size) { |
@@ -205,11 +202,17 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
205 | case 8: | 202 | case 8: |
206 | return __xchg_u64(ptr, x); | 203 | return __xchg_u64(ptr, x); |
207 | } | 204 | } |
208 | __xchg_called_with_bad_pointer(); | 205 | |
209 | return x; | 206 | return x; |
210 | } | 207 | } |
211 | 208 | ||
212 | #define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | 209 | #define xchg(ptr, x) \ |
210 | ({ \ | ||
211 | BUILD_BUG_ON(sizeof(*(ptr)) & ~0xc); \ | ||
212 | \ | ||
213 | ((__typeof__(*(ptr))) \ | ||
214 | __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \ | ||
215 | }) | ||
213 | 216 | ||
214 | extern void set_handler(unsigned long offset, void *addr, unsigned long len); | 217 | extern void set_handler(unsigned long offset, void *addr, unsigned long len); |
215 | extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len); | 218 | extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len); |