Commit ecbf29cdb3990c83d90d0c4187c89fb2ce423367
Committed by
Ingo Molnar
1 parent
f63c2f2489
Exists in
master
and in
7 other branches
xen: clean up asm/xen/hypervisor.h
Impact: cleanup hypervisor.h had accumulated a lot of crud, including lots of spurious #includes. Clean it all up, and go around fixing up everything else accordingly. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 8 changed files with 31 additions and 33 deletions Side-by-side Diff
arch/x86/include/asm/xen/hypercall.h
... | ... | @@ -33,8 +33,14 @@ |
33 | 33 | #ifndef _ASM_X86_XEN_HYPERCALL_H |
34 | 34 | #define _ASM_X86_XEN_HYPERCALL_H |
35 | 35 | |
36 | +#include <linux/kernel.h> | |
37 | +#include <linux/spinlock.h> | |
36 | 38 | #include <linux/errno.h> |
37 | 39 | #include <linux/string.h> |
40 | +#include <linux/types.h> | |
41 | + | |
42 | +#include <asm/page.h> | |
43 | +#include <asm/pgtable.h> | |
38 | 44 | |
39 | 45 | #include <xen/interface/xen.h> |
40 | 46 | #include <xen/interface/sched.h> |
arch/x86/include/asm/xen/hypervisor.h
... | ... | @@ -33,39 +33,10 @@ |
33 | 33 | #ifndef _ASM_X86_XEN_HYPERVISOR_H |
34 | 34 | #define _ASM_X86_XEN_HYPERVISOR_H |
35 | 35 | |
36 | -#include <linux/types.h> | |
37 | -#include <linux/kernel.h> | |
38 | - | |
39 | -#include <xen/interface/xen.h> | |
40 | -#include <xen/interface/version.h> | |
41 | - | |
42 | -#include <asm/ptrace.h> | |
43 | -#include <asm/page.h> | |
44 | -#include <asm/desc.h> | |
45 | -#if defined(__i386__) | |
46 | -# ifdef CONFIG_X86_PAE | |
47 | -# include <asm-generic/pgtable-nopud.h> | |
48 | -# else | |
49 | -# include <asm-generic/pgtable-nopmd.h> | |
50 | -# endif | |
51 | -#endif | |
52 | -#include <asm/xen/hypercall.h> | |
53 | - | |
54 | 36 | /* arch/i386/kernel/setup.c */ |
55 | 37 | extern struct shared_info *HYPERVISOR_shared_info; |
56 | 38 | extern struct start_info *xen_start_info; |
57 | 39 | |
58 | -/* arch/i386/mach-xen/evtchn.c */ | |
59 | -/* Force a proper event-channel callback from Xen. */ | |
60 | -extern void force_evtchn_callback(void); | |
61 | - | |
62 | -/* Turn jiffies into Xen system time. */ | |
63 | -u64 jiffies_to_st(unsigned long jiffies); | |
64 | - | |
65 | - | |
66 | -#define MULTI_UVMFLAGS_INDEX 3 | |
67 | -#define MULTI_UVMDOMID_INDEX 4 | |
68 | - | |
69 | 40 | enum xen_domain_type { |
70 | 41 | XEN_NATIVE, |
71 | 42 | XEN_PV_DOMAIN, |
72 | 43 | |
73 | 44 | |
... | ... | @@ -74,10 +45,16 @@ |
74 | 45 | |
75 | 46 | extern enum xen_domain_type xen_domain_type; |
76 | 47 | |
48 | +#ifdef CONFIG_XEN | |
77 | 49 | #define xen_domain() (xen_domain_type != XEN_NATIVE) |
78 | -#define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN) | |
50 | +#else | |
51 | +#define xen_domain() (0) | |
52 | +#endif | |
53 | + | |
54 | +#define xen_pv_domain() (xen_domain() && xen_domain_type == XEN_PV_DOMAIN) | |
55 | +#define xen_hvm_domain() (xen_domain() && xen_domain_type == XEN_HVM_DOMAIN) | |
56 | + | |
79 | 57 | #define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) |
80 | -#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) | |
81 | 58 | |
82 | 59 | #endif /* _ASM_X86_XEN_HYPERVISOR_H */ |
arch/x86/include/asm/xen/page.h
1 | 1 | #ifndef _ASM_X86_XEN_PAGE_H |
2 | 2 | #define _ASM_X86_XEN_PAGE_H |
3 | 3 | |
4 | +#include <linux/kernel.h> | |
5 | +#include <linux/types.h> | |
6 | +#include <linux/spinlock.h> | |
4 | 7 | #include <linux/pfn.h> |
5 | 8 | |
6 | 9 | #include <asm/uaccess.h> |
10 | +#include <asm/page.h> | |
7 | 11 | #include <asm/pgtable.h> |
8 | 12 | |
13 | +#include <xen/interface/xen.h> | |
9 | 14 | #include <xen/features.h> |
10 | 15 | |
11 | 16 | /* Xen machine address */ |
arch/x86/xen/enlighten.c
drivers/xen/balloon.c
... | ... | @@ -44,13 +44,15 @@ |
44 | 44 | #include <linux/list.h> |
45 | 45 | #include <linux/sysdev.h> |
46 | 46 | |
47 | -#include <asm/xen/hypervisor.h> | |
48 | 47 | #include <asm/page.h> |
49 | 48 | #include <asm/pgalloc.h> |
50 | 49 | #include <asm/pgtable.h> |
51 | 50 | #include <asm/uaccess.h> |
52 | 51 | #include <asm/tlb.h> |
53 | 52 | |
53 | +#include <asm/xen/hypervisor.h> | |
54 | +#include <asm/xen/hypercall.h> | |
55 | +#include <xen/interface/xen.h> | |
54 | 56 | #include <xen/interface/memory.h> |
55 | 57 | #include <xen/xenbus.h> |
56 | 58 | #include <xen/features.h> |
drivers/xen/features.c
... | ... | @@ -8,7 +8,11 @@ |
8 | 8 | #include <linux/types.h> |
9 | 9 | #include <linux/cache.h> |
10 | 10 | #include <linux/module.h> |
11 | -#include <asm/xen/hypervisor.h> | |
11 | + | |
12 | +#include <asm/xen/hypercall.h> | |
13 | + | |
14 | +#include <xen/interface/xen.h> | |
15 | +#include <xen/interface/version.h> | |
12 | 16 | #include <xen/features.h> |
13 | 17 | |
14 | 18 | u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly; |
drivers/xen/grant-table.c
include/xen/interface/event_channel.h