From a436ed9c5106b41606cbb55ab3b28389fe8ae04f Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Tue, 8 May 2007 00:35:02 -0700 Subject: x86: create asm/cmpxchg.h i386: Rearrange the cmpxchg code to allow atomic.h to get it without needing to include system.h. This kills warnings in the UML build from atomic.h about implicit declarations of cmpxchg symbols. The i386 build presumably isn't seeing this because a separate inclusion of system.h is covering it over. The cmpxchg stuff is moved to asm-i386/cmpxchg.h, with an include left in system.h for the benefit of generic code which expects cmpxchg there. Meanwhile, atomic.h includes cmpxchg.h. This causes no noticable damage to the i386 build. x86_64: Move cmpxchg into its own header. atomic.h already included system.h, so this is changed to include cmpxchg.h. This is purely cleanup - it's not fixing any warnings - so if the x86_64 system.h isn't considered as cleanup-worthy as i386, then this can be dropped. It causes no noticable damage to the x86_64 build. uml: The i386 and x86_64 cmpxchg patches require an asm-um/cmpxchg.h for the UML build. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/cmpxchg.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 include/asm-um/cmpxchg.h (limited to 'include/asm-um') diff --git a/include/asm-um/cmpxchg.h b/include/asm-um/cmpxchg.h new file mode 100644 index 00000000000..529376a9988 --- /dev/null +++ b/include/asm-um/cmpxchg.h @@ -0,0 +1,6 @@ +#ifndef __UM_CMPXCHG_H +#define __UM_CMPXCHG_H + +#include "asm/arch/cmpxchg.h" + +#endif -- cgit v1.2.3-70-g09d2