Quick and dirty patch for 2.6.5 + 2.6.4-um1 patch
This is just a hack to compile 2.6.5 kernel + 2.6.4-um1 patch. As Jeff Dike put it "you might post that to uml-devel for the impatient" ;), but it's not official fix...
Here it goes:
linux/include/asm-i386/system.h renamed from include/asm-i386/system.h +3 -0
@@ -243,6 +243,7 @@#define __HAVE_ARCH_CMPXCHG 1#endif +#ifndef __UM_SYSTEM_I386_Hstatic inline unsigned long __cmpxchg (volatile void *ptr,unsigned long old,unsigned long new,int size) {
@@ -270,6 +271,8 @@ return old; } +#endif +#define cmpxchg (ptr,o,n)\ ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ (unsigned long)(n),sizeof(*(ptr))))
linux/arch/um/Makefile-i386 renamed from arch/um/Makefile-i386 +1 -1
@@ -30,7 +30,7 @@ $(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread $(call filechk,$@) -$(SYS_UTIL_DIR)/mk_sc: scripts/fixdep include/config/MARKER FORCE ; +$(SYS_UTIL_DIR)/mk_sc: scripts/basic/fixdep include/config/MARKER FORCE ; $(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@ $(SYS_UTIL_DIR)/mk_thread: $(ARCH_SYMLINKS) $(GEN_HEADERS) sys_prepare
FORCE ;
linux/include/asm-i386/system.h renamed from include/asm-i386/system.h +3 -0
@@ -243,6 +243,7 @@#define __HAVE_ARCH_CMPXCHG 1#endif +#ifndef __UM_SYSTEM_I386_Hstatic inline unsigned long __cmpxchg (volatile void *ptr,unsigned long old,unsigned long new,int size) {
@@ -270,6 +271,8 @@ return old; } +#endif +#define cmpxchg (ptr,o,n)\ ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ (unsigned long)(n),sizeof(*(ptr))))
linux/arch/um/Makefile-i386 renamed from arch/um/Makefile-i386 +1 -1
@@ -30,7 +30,7 @@ $(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread $(call filechk,$@) -$(SYS_UTIL_DIR)/mk_sc: scripts/fixdep include/config/MARKER FORCE ; +$(SYS_UTIL_DIR)/mk_sc: scripts/basic/fixdep include/config/MARKER FORCE ; $(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@ $(SYS_UTIL_DIR)/mk_thread: $(ARCH_SYMLINKS) $(GEN_HEADERS) sys_prepare FORCE ;
Quoted 13 lines · Piotr Neuman
Here it goes:
diff -ruNlinux/include/asm-i386/system.huml/linux/include/asm-i386/system.hlinux/include/asm-i386/system.h renamed from include/asm-i386/system.h +1
-0@@ -243,6 +243,7 @@#define __HAVE_ARCH_CMPXCHG 1#endif +#ifndef __UM_SYSTEM_I386_Hstatic inline unsigned long __cmpxchg (volatile void *ptr,unsigned long old,unsigned long new,int size) {
linux/include/asm-i386/system.h line 278
Quoted 8 lines
linux/include/asm-i386/system.h renamed from include/asm-i386/system.h +2
-0@@ -270,6 +271,8 @@ return old; } +#endif +#define cmpxchg (ptr,o,n)\ ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ (unsigned long)(n),sizeof(*(ptr))))
For others impatient requiring 2.4: Same thing is needed for compiling 2.4.26-rc2...
Regards
Henrik
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel