From: Stephen Tweedie Subject: Build problems: references to init_mm in pgtable*.h Date: Mon, 05 Dec 2005 13:20:49 -0500 Message-ID: <1133806849.4201.31.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-HITYfUMZBX7IIfONgM1/" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --=-HITYfUMZBX7IIfONgM1/ Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi all, My normal xen .config will not build on recent linux-2.6-merge.hg trees. The problem is the include/asm-i386/mach-xen/asm/pgtable-2level.h and include/asm-i386/mach-xen/asm/pgtable-3level.h files, which reference "init_mm" without ever pulling in a definition of those files. Whether you see the problem or not depends on the .config; most files which include the pgtable*.h includes already pull in sched.h (which is where init_mm is declared), but not all do so. Trivial patch attached, but it's not necessarily the best solution as we don't want sched.h changes polluting mm .o's unnecessarily. --Stephen --=-HITYfUMZBX7IIfONgM1/ Content-Description: Content-Disposition: inline; filename=pgtable-fix.patch Content-Type: text/x-patch; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id jB5IMiBl002349 # HG changeset patch # User sct@sct.boston.redhat.com # Node ID c819204afd3829b65080f484e29bba4ef1130044 # Parent 9c37a7190588f04180851153bdcaaba9d566ed75 Builds are breaking with errors such as: In file included from include/asm/mach-xen/asm/pgtable.h:253, from include/asm/mach-xen/asm/desc.h:99, from include/asm/suspend.h:6, from include/linux/suspend.h:5, from kernel/power/main.c:11: include/asm/mach-xen/asm/pgtable-2level.h: In function =E2=80=98set_pte_a= t=E2=80=99: include/asm/mach-xen/asm/pgtable-2level.h:21: error: dereferencing pointe= r to incomplete type include/asm/mach-xen/asm/pgtable-2level.h:21: error: =E2=80=98init_mm=E2=80= =99 undeclared (first use in this function) due to include/asm-i386/mach-xen/asm/pgtable-*level.h referencing "init_m= m" without declaring it. We need to #include first to make this w= ork. diff -r 9c37a7190588 -r c819204afd38 include/asm-i386/mach-xen/asm/pgtabl= e-2level.h --- a/include/asm-i386/mach-xen/asm/pgtable-2level.h Tue Nov 29 14:34:01 = 2005 -0500 +++ b/include/asm-i386/mach-xen/asm/pgtable-2level.h Tue Nov 29 14:36:47 = 2005 -0500 @@ -2,6 +2,7 @@ #define _I386_PGTABLE_2LEVEL_H =20 #include +#include =20 #define pte_ERROR(e) \ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low) diff -r 9c37a7190588 -r c819204afd38 include/asm-i386/mach-xen/asm/pgtabl= e-3level.h --- a/include/asm-i386/mach-xen/asm/pgtable-3level.h Tue Nov 29 14:34:01 = 2005 -0500 +++ b/include/asm-i386/mach-xen/asm/pgtable-3level.h Tue Nov 29 14:36:47 = 2005 -0500 @@ -2,6 +2,7 @@ #define _I386_PGTABLE_3LEVEL_H =20 #include +#include =20 /* * Intel Physical Address Extension (PAE) Mode - three-level page --=-HITYfUMZBX7IIfONgM1/ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-HITYfUMZBX7IIfONgM1/--