Skip to contentSkip to conversation

xen: x86: make asm/xen/events.h include xen/xen.h

PATCH In review Nicolai Stange 2 participants 3 messages Sep 23, 2018 – Sep 24, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: x86: make asm/xen/events.h include xen/xen.h

arch/x86/include/asm/xen/events.h references xen_hvm_domain() from the inlined xen_support_evtchn_rebind().

xen_hvm_domain() gets #defined in include/xen/xen.h and arch/x86/include/asm/xen/events.h doesn't include that.

On current Linus' tree, everything works fine though, because of the following inclusion chain

include/xen/events.h
arch/x86/include/asm/xen/hypercall.h

    arch/x86/include/asm/pgtable.h
     arch/x86/include/asm/fixmap.h
      arch/x86/include/asm/acpi.h
       arch/x86/include/asm/realmode.h
        arch/x86/include/asm/io.h
         include/xen/xen.h

asm/xen/events.h

which has been established in commit f991376e444a ("x86/mm: Correct fixmap header usage on adaptable MODULES_END") resp. commit ef37bc361442 ("x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h").

Stable 4.9 lacks both of these and backporting them wouldn't really make sense.

In consequence, the backport of commit 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h") to stable 4.9 broke compilation with errors like

In file included from include/xen/events.h:11:0,

                   from arch/x86/xen/irq.c:9:
  arch/x86/include/asm/xen/events.h: In function
    ‘xen_support_evtchn_rebind’:
  arch/x86/include/asm/xen/events.h:31:2: error: implicit declaration of
    function ‘xen_hvm_domain’ [-Werror=implicit-function-declaration]
    return (!xen_hvm_domain() || xen_have_vector_callback);
    ^

Facilitate backporting to the stable trees by making arch/x86/include/asm/xen/events.h include xen/xen.h.

Fixes 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h")
Cc <[email protected]> # 4.9.x
---
 arch/x86/include/asm/xen/events.h | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/xen/events.h +2 -0
index d383140e1dc8..068d9b067c83 100644
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_XEN_EVENTS_H
 #define _ASM_X86_XEN_EVENTS_H
 
+#include <xen/xen.h>
+
 enum ipi_vector {
 	XEN_RESCHEDULE_VECTOR,
 	XEN_CALL_FUNCTION_VECTOR,
Signature · 1 line
2.13.7
#1 lore raw
Quoted 39 lines · Nicolai Stange

arch/x86/include/asm/xen/events.h references xen_hvm_domain() from the inlined xen_support_evtchn_rebind().

xen_hvm_domain() gets #defined in include/xen/xen.h and arch/x86/include/asm/xen/events.h doesn't include that.

On current Linus' tree, everything works fine though, because of the following inclusion chain

include/xen/events.h
arch/x86/include/asm/xen/hypercall.h

    arch/x86/include/asm/pgtable.h
     arch/x86/include/asm/fixmap.h
      arch/x86/include/asm/acpi.h
       arch/x86/include/asm/realmode.h
        arch/x86/include/asm/io.h
         include/xen/xen.h

asm/xen/events.h

which has been established in commit f991376e444a ("x86/mm: Correct fixmap header usage on adaptable MODULES_END") resp. commit ef37bc361442 ("x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h").

Stable 4.9 lacks both of these and backporting them wouldn't really make sense.

In consequence, the backport of commit 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h") to stable 4.9 broke compilation with errors like

In file included from include/xen/events.h:11:0,

                   from arch/x86/xen/irq.c:9:
  arch/x86/include/asm/xen/events.h: In function
    ‘xen_support_evtchn_rebind’:
  arch/x86/include/asm/xen/events.h:31:2: error: implicit declaration of
    function ‘xen_hvm_domain’ [-Werror=implicit-function-declaration]
    return (!xen_hvm_domain() || xen_have_vector_callback);
    ^
Quoted 6 lines

Facilitate backporting to the stable trees by making arch/x86/include/asm/xen/events.h include xen/xen.h.

Fixes 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h")
Cc <[email protected]> # 4.9.x

This is being done (for somewhat unrelated reasons) by
https://marc.info/?l=linux-block&m=153608849202181

-boris

Quoted 9 lines
---
 arch/x86/include/asm/xen/events.h | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/xen/events.h +0 -0
index d383140e1dc8..068d9b067c83 100644

arch/x86/include/asm/xen/events.h line 9

Quoted 8 lines
arch/x86/include/asm/xen/events.h +2 -0
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_XEN_EVENTS_H
 #define _ASM_X86_XEN_EVENTS_H
 
+#include <xen/xen.h>
+
 enum ipi_vector {
 	XEN_RESCHEDULE_VECTOR,
 	XEN_CALL_FUNCTION_VECTOR,

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
In reply to Nicolai Stange
Quoted 39 lines · Nicolai Stange

arch/x86/include/asm/xen/events.h references xen_hvm_domain() from the inlined xen_support_evtchn_rebind().

xen_hvm_domain() gets #defined in include/xen/xen.h and arch/x86/include/asm/xen/events.h doesn't include that.

On current Linus' tree, everything works fine though, because of the following inclusion chain

include/xen/events.h
arch/x86/include/asm/xen/hypercall.h

    arch/x86/include/asm/pgtable.h
     arch/x86/include/asm/fixmap.h
      arch/x86/include/asm/acpi.h
       arch/x86/include/asm/realmode.h
        arch/x86/include/asm/io.h
         include/xen/xen.h

asm/xen/events.h

which has been established in commit f991376e444a ("x86/mm: Correct fixmap header usage on adaptable MODULES_END") resp. commit ef37bc361442 ("x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h").

Stable 4.9 lacks both of these and backporting them wouldn't really make sense.

In consequence, the backport of commit 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h") to stable 4.9 broke compilation with errors like

In file included from include/xen/events.h:11:0,

                   from arch/x86/xen/irq.c:9:
  arch/x86/include/asm/xen/events.h: In function
    ‘xen_support_evtchn_rebind’:
  arch/x86/include/asm/xen/events.h:31:2: error: implicit declaration of
    function ‘xen_hvm_domain’ [-Werror=implicit-function-declaration]
    return (!xen_hvm_domain() || xen_have_vector_callback);
    ^
Quoted 6 lines

Facilitate backporting to the stable trees by making arch/x86/include/asm/xen/events.h include xen/xen.h.

Fixes 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h")
Cc <[email protected]> # 4.9.x

This is being done (for somewhat unrelated reasons) by
https://marc.info/?l=linux-block&m=153608849202181

-boris

Quoted 17 lines
---
 arch/x86/include/asm/xen/events.h | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/xen/events.h +2 -0
index d383140e1dc8..068d9b067c83 100644
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_XEN_EVENTS_H
 #define _ASM_X86_XEN_EVENTS_H
 
+#include <xen/xen.h>
+
 enum ipi_vector {
 	XEN_RESCHEDULE_VECTOR,
 	XEN_CALL_FUNCTION_VECTOR,