On Mon, Feb 11, 2008 at 12:19:44PM +0100, Andrea Arcangeli wrote:
> + LINUXINCLUDE="-I`pwd`/include -Iinclude -Iinclude-compat \
woops, here the last version:
Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]>
diff -urN 1/kernel/include/asm-x86/cmpxchg.h 2/kernel/include/asm-x86/cmpxchg.h
--- 1/kernel/include/asm-x86/cmpxchg.h 2008-02-11 12:00:19.000000000 +0100
+++ 2/kernel/include/asm-x86/cmpxchg.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-/*
- * Empty file to satisfy #include <linux/cmpxchg.h> for older kernels.
- */
-
-
diff -urN 1/kernel/include/linux/anon_inodes.h
2/kernel/include/linux/anon_inodes.h
--- 1/kernel/include/linux/anon_inodes.h 2008-02-11 12:00:19.000000000
+0100
+++ 2/kernel/include/linux/anon_inodes.h 1970-01-01 01:00:00.000000000
+0100
@@ -1,16 +0,0 @@
-/*
- * include/linux/anon_inodes.h
- *
- * Copyright (C) 2007 Davide Libenzi <[EMAIL PROTECTED]>
- *
- */
-
-#ifndef _LINUX_ANON_INODES_H
-#define _LINUX_ANON_INODES_H
-
-int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile,
- const char *name, const struct file_operations *fops,
- void *priv);
-
-#endif /* _LINUX_ANON_INODES_H */
-
diff -urN 1/kernel/include/linux/magic.h 2/kernel/include/linux/magic.h
--- 1/kernel/include/linux/magic.h 2008-02-11 12:00:19.000000000 +0100
+++ 2/kernel/include/linux/magic.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-#ifndef __LINUX_MAGIC_H__
-#define __LINUX_MAGIC_H__
-
-#define ADFS_SUPER_MAGIC 0xadf5
-#define AFFS_SUPER_MAGIC 0xadff
-#define AFS_SUPER_MAGIC 0x5346414F
-#define AUTOFS_SUPER_MAGIC 0x0187
-#define CODA_SUPER_MAGIC 0x73757245
-#define EFS_SUPER_MAGIC 0x414A53
-#define EXT2_SUPER_MAGIC 0xEF53
-#define EXT3_SUPER_MAGIC 0xEF53
-#define EXT4_SUPER_MAGIC 0xEF53
-#define HPFS_SUPER_MAGIC 0xf995e849
-#define ISOFS_SUPER_MAGIC 0x9660
-#define JFFS2_SUPER_MAGIC 0x72b6
-#define KVMFS_SUPER_MAGIC 0x19700426
-
-#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
-#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
-#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
-#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
-#define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */
-
-#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
-#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c
is :-) */
-#define NFS_SUPER_MAGIC 0x6969
-#define OPENPROM_SUPER_MAGIC 0x9fa1
-#define PROC_SUPER_MAGIC 0x9fa0
-#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
-
-#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */
- /* used by file system utilities that
- look at the superblock, etc. */
-#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
-#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
-#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
-
-#define SMB_SUPER_MAGIC 0x517B
-#define USBDEVICE_SUPER_MAGIC 0x9fa2
-
-#endif /* __LINUX_MAGIC_H__ */
diff -urN 1/kernel/include/linux/mutex.h 2/kernel/include/linux/mutex.h
--- 1/kernel/include/linux/mutex.h 2008-02-11 12:00:19.000000000 +0100
+++ 2/kernel/include/linux/mutex.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-/*
- * Empty file to satisfy #include <linux/mutex.h> for older kernels.
- */
-
-
diff -urN 1/kernel/include-compat/asm-x86/cmpxchg.h
2/kernel/include-compat/asm-x86/cmpxchg.h
--- 1/kernel/include-compat/asm-x86/cmpxchg.h 1970-01-01 01:00:00.000000000
+0100
+++ 2/kernel/include-compat/asm-x86/cmpxchg.h 2008-02-11 12:00:19.000000000
+0100
@@ -0,0 +1,5 @@
+/*
+ * Empty file to satisfy #include <linux/cmpxchg.h> for older kernels.
+ */
+
+
diff -urN 1/kernel/include-compat/linux/anon_inodes.h
2/kernel/include-compat/linux/anon_inodes.h
--- 1/kernel/include-compat/linux/anon_inodes.h 1970-01-01 01:00:00.000000000
+0100
+++ 2/kernel/include-compat/linux/anon_inodes.h 2008-02-11 12:00:19.000000000
+0100
@@ -0,0 +1,16 @@
+/*
+ * include/linux/anon_inodes.h
+ *
+ * Copyright (C) 2007 Davide Libenzi <[EMAIL PROTECTED]>
+ *
+ */
+
+#ifndef _LINUX_ANON_INODES_H
+#define _LINUX_ANON_INODES_H
+
+int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile,
+ const char *name, const struct file_operations *fops,
+ void *priv);
+
+#endif /* _LINUX_ANON_INODES_H */
+
diff -urN 1/kernel/include-compat/linux/magic.h
2/kernel/include-compat/linux/magic.h
--- 1/kernel/include-compat/linux/magic.h 1970-01-01 01:00:00.000000000
+0100
+++ 2/kernel/include-compat/linux/magic.h 2008-02-11 12:00:19.000000000
+0100
@@ -0,0 +1,41 @@
+#ifndef __LINUX_MAGIC_H__
+#define __LINUX_MAGIC_H__
+
+#define ADFS_SUPER_MAGIC 0xadf5
+#define AFFS_SUPER_MAGIC 0xadff
+#define AFS_SUPER_MAGIC 0x5346414F
+#define AUTOFS_SUPER_MAGIC 0x0187
+#define CODA_SUPER_MAGIC 0x73757245
+#define EFS_SUPER_MAGIC 0x414A53
+#define EXT2_SUPER_MAGIC 0xEF53
+#define EXT3_SUPER_MAGIC 0xEF53
+#define EXT4_SUPER_MAGIC 0xEF53
+#define HPFS_SUPER_MAGIC 0xf995e849
+#define ISOFS_SUPER_MAGIC 0x9660
+#define JFFS2_SUPER_MAGIC 0x72b6
+#define KVMFS_SUPER_MAGIC 0x19700426
+
+#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
+#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
+#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
+#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
+#define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */
+
+#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
+#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c
is :-) */
+#define NFS_SUPER_MAGIC 0x6969
+#define OPENPROM_SUPER_MAGIC 0x9fa1
+#define PROC_SUPER_MAGIC 0x9fa0
+#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
+
+#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */
+ /* used by file system utilities that
+ look at the superblock, etc. */
+#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
+#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
+#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
+
+#define SMB_SUPER_MAGIC 0x517B
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+
+#endif /* __LINUX_MAGIC_H__ */
diff -urN 1/kernel/include-compat/linux/mutex.h
2/kernel/include-compat/linux/mutex.h
--- 1/kernel/include-compat/linux/mutex.h 1970-01-01 01:00:00.000000000
+0100
+++ 2/kernel/include-compat/linux/mutex.h 2008-02-11 12:00:19.000000000
+0100
@@ -0,0 +1,5 @@
+/*
+ * Empty file to satisfy #include <linux/mutex.h> for older kernels.
+ */
+
+
diff --git a/kernel/Makefile b/kernel/Makefile
index 7a435b5..9e72f56 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -25,17 +25,21 @@ hack = $(call _hack,tmp/$(strip $1))
unifdef = $(call _unifdef,tmp/$(strip $1))
all::
- $(MAKE) -C $(KERNELDIR) M=`pwd` "$$@"
+ # include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat
+ $(MAKE) -C $(KERNELDIR) M=`pwd` \
+ LINUXINCLUDE="-I`pwd`/include -Iinclude -I`pwd`/include-compat \
+ -include include/linux/autoconf.h" \
+ "$$@"
sync:
- rm -rf tmp
+ rm -rf tmp include
rsync --exclude='*.mod.c' -R \
"$(LINUX)"/arch/x86/kvm/./*.[ch] \
"$(LINUX)"/virt/kvm/./*.[ch] \
"$(LINUX)"/./include/linux/kvm*.h \
"$(LINUX)"/./include/asm-x86/kvm*.h \
tmp/
- rm -rf include/asm
+ mkdir -p include/linux include/asm-x86
ln -s asm-x86 include/asm
$(call unifdef, include/linux/kvm.h)
@@ -78,6 +82,7 @@ rpm: all
clean:
$(MAKE) -C $(KERNELDIR) M=`pwd` $@
+ rm -rf include
svnclean:
svn st | grep '^\?' | awk '{print $2}' | xargs rm -rf
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 052d561..fdd903c 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -10,8 +10,8 @@
#include <linux/compiler.h>
#include <linux/version.h>
#include <linux/string.h>
-#include "include/linux/kvm.h"
-#include "include/linux/kvm_para.h"
+#include <linux/kvm.h>
+#include <linux/kvm_para.h>
#include <linux/cpu.h>
#include <asm/processor.h>
#include <linux/hrtimer.h>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel