All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@qumranet.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, Chris Lalancette <clalance@redhat.com>
Subject: Re: Broken external module build on 2.6.23
Date: Mon, 11 Feb 2008 12:26:08 +0100	[thread overview]
Message-ID: <20080211112608.GH7051@v2.random> (raw)
In-Reply-To: <20080211111944.GG7051@v2.random>

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 <andrea@qumranet.com>

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 <davidel@xmailserver.org>
- *
- */
-
-#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 <davidel@xmailserver.org>
+ *
+ */
+
+#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/

  reply	other threads:[~2008-02-11 11:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 21:01 Broken external module build on 2.6.23 Chris Lalancette
     [not found] ` <47A77D2B.90902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-02-05 23:15   ` Andrea Arcangeli
2008-02-11  8:14     ` Avi Kivity
2008-02-11 11:19       ` Andrea Arcangeli
2008-02-11 11:26         ` Andrea Arcangeli [this message]
2008-02-11 12:24         ` Avi Kivity
2008-02-11 12:24           ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080211112608.GH7051@v2.random \
    --to=andrea@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=clalance@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.