Stephen Tweedie
2005-Dec-05 18:20 UTC
[Xen-devel] Build problems: references to init_mm in pgtable*.h
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christian Limpach
2005-Dec-14 03:34 UTC
Re: [Xen-devel] Build problems: references to init_mm in pgtable*.h
On 12/5/05, Stephen Tweedie <sct@redhat.com> wrote:> 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.I''ve changed the set_pte_at and set_pte_at_sync inline functions to be macros. This way, init_mm only needs to be defined where these macros are used. Does this fix all the errors you''re seeing? christian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stephen C. Tweedie
2005-Dec-14 15:44 UTC
Re: [Xen-devel] Build problems: references to init_mm in pgtable*.h
Hi, On Tue, 2005-12-13 at 19:34 -0800, Christian Limpach wrote:> I''ve changed the set_pte_at and set_pte_at_sync inline functions to be > macros. This way, init_mm only needs to be defined where these macros > are used. > Does this fix all the errors you''re seeing?It''s still failing for kernel/power/main.c, which depends on CONFIG_PM. Now, which parts of CONFIG_PM are safe under Xen is another question --- the right answer here may well be to add a "depends !XEN" to CONFIG_PM. But with it enabled I still get CC kernel/power/main.o In file included from include/asm/suspend.h:6, from include/linux/suspend.h:5, from kernel/power/main.c:11: include/asm/mach-xen/asm/desc.h: In function ‘write_ldt_entry’: include/asm/mach-xen/asm/desc.h:103: error: ‘init_mm’ undeclared (first use in this function) include/asm/mach-xen/asm/desc.h:103: error: (Each undeclared identifier is reported only once include/asm/mach-xen/asm/desc.h:103: error: for each function it appears in.) with the macro fix. I''m using the PM config options: # Power management options (ACPI, APM) CONFIG_PM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_POWER=y for now --- I really want to be able to run a dom0 on my laptop, even if the cpufreq governer gets a little confused about time spent in a domU. It certainly builds and boots fine with the PM options enabled, as long as I include linux/sched.h in the pgtable*.h files. Cheers, Stephen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christian Limpach
2005-Dec-16 01:08 UTC
Re: [Xen-devel] Build problems: references to init_mm in pgtable*.h
On Wed, Dec 14, 2005 at 10:44:27AM -0500, Stephen C. Tweedie wrote:> Hi, > > On Tue, 2005-12-13 at 19:34 -0800, Christian Limpach wrote: > > > I''ve changed the set_pte_at and set_pte_at_sync inline functions to be > > macros. This way, init_mm only needs to be defined where these macros > > are used. > > Does this fix all the errors you''re seeing? > > It''s still failing for kernel/power/main.c, which depends on CONFIG_PM. > Now, which parts of CONFIG_PM are safe under Xen is another question --- > the right answer here may well be to add a "depends !XEN" to CONFIG_PM. > But with it enabled I still getI''ve fixed this one now by making write_ldt_entry a proper function instead of an inline function. This avoids having pgtable.h and sched.h included from desc.h. christian> > CC kernel/power/main.o > In file included from include/asm/suspend.h:6, > from include/linux/suspend.h:5, > from kernel/power/main.c:11: > include/asm/mach-xen/asm/desc.h: In function ???write_ldt_entry???: > include/asm/mach-xen/asm/desc.h:103: error: ???init_mm??? undeclared (first use in this function) > include/asm/mach-xen/asm/desc.h:103: error: (Each undeclared identifier is reported only once > include/asm/mach-xen/asm/desc.h:103: error: for each function it appears in.) > > with the macro fix. I''m using the PM config options: > > # Power management options (ACPI, APM) > CONFIG_PM=y > CONFIG_X86_PM_TIMER=y > CONFIG_ACPI_POWER=y > > for now --- I really want to be able to run a dom0 on my laptop, even if > the cpufreq governer gets a little confused about time spent in a domU. > It certainly builds and boots fine with the PM options enabled, as long > as I include linux/sched.h in the pgtable*.h files. > > Cheers, > Stephen > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stephen C. Tweedie
2005-Dec-20 20:47 UTC
Re: [Xen-devel] Build problems: references to init_mm in pgtable*.h
Hi, On Fri, 2005-12-16 at 01:08, Christian Limpach wrote:> > It''s still failing for kernel/power/main.c, which depends on CONFIG_PM. > > Now, which parts of CONFIG_PM are safe under Xen is another question --- > > the right answer here may well be to add a "depends !XEN" to CONFIG_PM. > > But with it enabled I still get > > I''ve fixed this one now by making write_ldt_entry a proper function > instead of an inline function. This avoids having pgtable.h and > sched.h included from desc.h.Thanks --- no more such errors on today''s linux-2.6-merge.hg. --Stephen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel