public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* UML - Compilation problem on 2.6.22-rc4
@ 2007-06-15  6:23 Arun Raghavan
  2007-06-15 14:57 ` Jeff Dike
  0 siblings, 1 reply; 2+ messages in thread
From: Arun Raghavan @ 2007-06-15  6:23 UTC (permalink / raw)
  To: jdike; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

Hello,
I ran into some compilations problems with UML on the 2.6.22-rc4 kernel.
The problem turns up because "paravirt.h" is included in a couple of
headers in asm-i386 without being protected by a "#ifdef CONFIG_PARAVIRT".

I've attached a patch to fix this (i.e. UML compiles and runs fine for
me with these changes). I don't know if this is sufficient for all cases
though (most other uses of the #ifdef include a lengthy #else).

Please keep me in CC as I'm not on the mailing list.

-- Arun

[-- Attachment #2: uml-paravirt-compile-fix.patch --]
[-- Type: text/x-patch, Size: 1248 bytes --]

diff -uprN -X /usr/src/linux-2.6.22-rc4/Documentation/dontdiff /usr/src/linux-2.6.22-rc4/include/asm-i386/highmem.h linux-2.6.22-rc4-uml-fix/include/asm-i386/highmem.h
--- /usr/src/linux-2.6.22-rc4/include/asm-i386/highmem.h	2007-06-14 12:12:58.000000000 +0530
+++ linux-2.6.22-rc4-uml-fix/include/asm-i386/highmem.h	2007-06-15 11:34:10.000000000 +0530
@@ -24,7 +24,9 @@
 #include <linux/threads.h>
 #include <asm/kmap_types.h>
 #include <asm/tlbflush.h>
+#ifdef CONFIG_PARAVIRT
 #include <asm/paravirt.h>
+#endif
 
 /* declarations for highmem.c */
 extern unsigned long highstart_pfn, highend_pfn;
diff -uprN -X /usr/src/linux-2.6.22-rc4/Documentation/dontdiff /usr/src/linux-2.6.22-rc4/include/asm-i386/mmu_context.h linux-2.6.22-rc4-uml-fix/include/asm-i386/mmu_context.h
--- /usr/src/linux-2.6.22-rc4/include/asm-i386/mmu_context.h	2007-06-14 12:12:58.000000000 +0530
+++ linux-2.6.22-rc4-uml-fix/include/asm-i386/mmu_context.h	2007-06-15 11:34:24.000000000 +0530
@@ -5,8 +5,9 @@
 #include <asm/atomic.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
+#ifdef CONFIG_PARAVIRT
 #include <asm/paravirt.h>
-#ifndef CONFIG_PARAVIRT
+#else
 #include <asm-generic/mm_hooks.h>
 
 static inline void paravirt_activate_mm(struct mm_struct *prev,

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

* Re: UML - Compilation problem on 2.6.22-rc4
  2007-06-15  6:23 UML - Compilation problem on 2.6.22-rc4 Arun Raghavan
@ 2007-06-15 14:57 ` Jeff Dike
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-06-15 14:57 UTC (permalink / raw)
  To: Arun Raghavan; +Cc: linux-kernel

On Fri, Jun 15, 2007 at 11:53:55AM +0530, Arun Raghavan wrote:
> Hello,
> I ran into some compilations problems with UML on the 2.6.22-rc4 kernel.
> The problem turns up because "paravirt.h" is included in a couple of
> headers in asm-i386 without being protected by a "#ifdef CONFIG_PARAVIRT".
> 
> I've attached a patch to fix this (i.e. UML compiles and runs fine for
> me with these changes). I don't know if this is sufficient for all cases
> though (most other uses of the #ifdef include a lengthy #else).

Thanks, I have this fixed by making an asm-um/paravirt.h instead.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

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

end of thread, other threads:[~2007-06-15 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-15  6:23 UML - Compilation problem on 2.6.22-rc4 Arun Raghavan
2007-06-15 14:57 ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox