* [PATCH 1/1] xen: asm/io.h should not include xen.h if XEN is disabled
@ 2011-08-03 16:33 Dmitry Kasatkin
2011-08-04 1:04 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Kasatkin @ 2011-08-03 16:33 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
kernel-devel package with kernel headers have no <include/xen> directory
if XEN is disabled. Modules which inclide asm/io.h won't compile.
XEN related content is behind the CONFIG_XEN flag in the io.h.
And <xen/xen.h> should be also behind CONFIG_XEN flag.
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
---
arch/x86/include/asm/io.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 0722730..ef26712 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -41,7 +41,9 @@
#include <asm-generic/int-ll64.h>
#include <asm/page.h>
+#ifdef CONFIG_XEN
#include <xen/xen.h>
+#endif
#define build_mmio_read(name, size, type, reg, barrier) \
static inline type name(const volatile void __iomem *addr) \
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xen: asm/io.h should not include xen.h if XEN is disabled
2011-08-03 16:33 [PATCH 1/1] xen: asm/io.h should not include xen.h if XEN is disabled Dmitry Kasatkin
@ 2011-08-04 1:04 ` Linus Torvalds
2011-08-04 9:48 ` Dmitry Kasatkin
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2011-08-04 1:04 UTC (permalink / raw)
To: Dmitry Kasatkin; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Wed, Aug 3, 2011 at 6:33 AM, Dmitry Kasatkin
<dmitry.kasatkin@intel.com> wrote:
>
> XEN related content is behind the CONFIG_XEN flag in the io.h.
> And <xen/xen.h> should be also behind CONFIG_XEN flag.
Wouldn't it be much nicer to just move the '#include <xen/xen.h>' line down?
Does the attached patch work for you?
Linus
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 772 bytes --]
arch/x86/include/asm/io.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index d02804d650c4..d8e8eefbe24c 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -40,8 +40,6 @@
#include <linux/compiler.h>
#include <asm/page.h>
-#include <xen/xen.h>
-
#define build_mmio_read(name, size, type, reg, barrier) \
static inline type name(const volatile void __iomem *addr) \
{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \
@@ -334,6 +332,7 @@ extern void fixup_early_ioremap(void);
extern bool is_early_ioremap_ptep(pte_t *ptep);
#ifdef CONFIG_XEN
+#include <xen/xen.h>
struct bio_vec;
extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xen: asm/io.h should not include xen.h if XEN is disabled
2011-08-04 1:04 ` Linus Torvalds
@ 2011-08-04 9:48 ` Dmitry Kasatkin
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Kasatkin @ 2011-08-04 9:48 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
On 04/08/11 04:04, Linus Torvalds wrote:
> On Wed, Aug 3, 2011 at 6:33 AM, Dmitry Kasatkin
> <dmitry.kasatkin@intel.com> wrote:
>> XEN related content is behind the CONFIG_XEN flag in the io.h.
>> And <xen/xen.h> should be also behind CONFIG_XEN flag.
> Wouldn't it be much nicer to just move the '#include <xen/xen.h>' line down?
>
It is probably a mater of taste.. to keep includes on the top.
> Does the attached patch work for you?
>
Yes, it works...
I experienced a problem in building some modules because of that include.
In older kernel version (before .38 or so) everything was fine - it was
not <xen/xen.h> includes in io.h
> Linus
Thank you..
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-04 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 16:33 [PATCH 1/1] xen: asm/io.h should not include xen.h if XEN is disabled Dmitry Kasatkin
2011-08-04 1:04 ` Linus Torvalds
2011-08-04 9:48 ` Dmitry Kasatkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox