Christoph Egger
2011-Mar-28 09:56 UTC
[Xen-devel] xen kernel headers: circular dependencies
Hi, I just uncovered a circular header dependency starting from _PAGE_NX. _PAGE_NX is defined in asm-x86/x86_{64,32}/page.h and uses cpu_has_nx cpu_has_nx is defined in asm-x86/cpufeature.h. So make asm-x86/x86_{64,32}/page.h include <asm/cpufeature.h> cpufeature.h uses boot_cpu_data which is declared in asm-x86/processor.h So make cpufeature.h include <asm/processor.h> processor.h uses NCAPINTS which is defined in cpufeature.h processor.h already includes cpufeature.h gcc fails to build with complaining about implicit declaration of function ''get_cpu_info'' then. Any suggestions on how to fix this? Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-Mar-28 12:46 UTC
Re: [Xen-devel] xen kernel headers: circular dependencies
On 28/03/2011 10:56, "Christoph Egger" <Christoph.Egger@amd.com> wrote:> > Hi, > > I just uncovered a circular header dependency starting from > _PAGE_NX. > > Any suggestions on how to fix this?Well the circular definition itself was okay because _PAGE_NX is a macro which doesn''t require immediate inclusion of cpufeature.h. However _PAGE_NX is itself a bit gross, and most users can just have at _PAGE_NX_BIT directly. So as a cleanup I''ve now got rid of _PAGE_NX in c/s 23107. -- Keir> Christoph >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel