WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Build problems: references to init_mm in pgtable*.h

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Build problems: references to init_mm in pgtable*.h
From: Stephen Tweedie <sct@xxxxxxxxxx>
Date: Mon, 05 Dec 2005 13:20:49 -0500
Delivery-date: Mon, 05 Dec 2005 18:23:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

# HG changeset patch
# User sct@xxxxxxxxxxxxxxxxxxxxx
# 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 ‘set_pte_at’:
include/asm/mach-xen/asm/pgtable-2level.h:21: error: dereferencing pointer to 
incomplete type
include/asm/mach-xen/asm/pgtable-2level.h:21: error: ‘init_mm’ undeclared 
(first use in this function)

due to include/asm-i386/mach-xen/asm/pgtable-*level.h referencing "init_mm"
without declaring it.  We need to #include <sched.h> first to make this work.

diff -r 9c37a7190588 -r c819204afd38 
include/asm-i386/mach-xen/asm/pgtable-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
 
 #include <asm-generic/pgtable-nopmd.h>
+#include <linux/sched.h>
 
 #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/pgtable-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
 
 #include <asm-generic/pgtable-nopud.h>
+#include <linux/sched.h>
 
 /*
  * Intel Physical Address Extension (PAE) Mode - three-level page
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>