All of lore.kernel.org
 help / color / mirror / Atom feed
* xen kernel headers: circular dependencies
@ 2011-03-28  9:56 Christoph Egger
  2011-03-28 12:46 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Egger @ 2011-03-28  9:56 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: xen kernel headers: circular dependencies
  2011-03-28  9:56 xen kernel headers: circular dependencies Christoph Egger
@ 2011-03-28 12:46 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2011-03-28 12:46 UTC (permalink / raw)
  To: Christoph Egger, xen-devel@lists.xensource.com

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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-28 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28  9:56 xen kernel headers: circular dependencies Christoph Egger
2011-03-28 12:46 ` Keir Fraser

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.