On Wed, 01 Nov 2006 21:30:43 +1100CONFIG_PARAVIRT is not being used to guard asm/paravirt.h from multiple inclusion. In places where it is being used to guard #include <asm/paravirt.h>, the idea is that asm/paravirt.h defines various inlines/macros which would otherwise be defined in the header. So, for example, asm/desc.h would normally define load_gdt() in the !CONFIG_PARAVIRT case, but asm/paravirt.h defines it when CONFIG_PARAVIRT is enabled.
Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
--- a/include/asm-i386/bugs.h
+++ b/include/asm-i386/bugs.h
@@ -21,6 +21,7 @@
#include <asm/processor.h>
#include <asm/i387.h>
#include <asm/msr.h>
+#include <asm/paravirt.h>
In many other places you have
#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
...
But not here.
Making <asm/paravirt.h> invulnerable would be the more typical approach.