diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-12-16 15:37:07 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-16 15:50:31 -0500 |
commit | ecbf29cdb3990c83d90d0c4187c89fb2ce423367 (patch) | |
tree | a1b795297152df380c9592ebbeb35804a23a2b29 | |
parent | f63c2f248959366cd11bfa476f866737047cf663 (diff) |
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>
-rw-r--r-- | arch/x86/include/asm/xen/hypercall.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/hypervisor.h | 39 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/page.h | 5 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 1 | ||||
-rw-r--r-- | drivers/xen/balloon.c | 4 | ||||
-rw-r--r-- | drivers/xen/features.c | 6 | ||||
-rw-r--r-- | drivers/xen/grant-table.c | 1 | ||||
-rw-r--r-- | include/xen/interface/event_channel.h | 2 |
8 files changed, 31 insertions, 33 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index 3f6000d95fe2..5e79ca694326 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h | |||
@@ -33,8 +33,14 @@ | |||
33 | #ifndef _ASM_X86_XEN_HYPERCALL_H | 33 | #ifndef _ASM_X86_XEN_HYPERCALL_H |
34 | #define _ASM_X86_XEN_HYPERCALL_H | 34 | #define _ASM_X86_XEN_HYPERCALL_H |
35 | 35 | ||
36 | #include <linux/kernel.h> | ||
37 | #include <linux/spinlock.h> | ||
36 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
37 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/types.h> | ||
41 | |||
42 | #include <asm/page.h> | ||
43 | #include <asm/pgtable.h> | ||
38 | 44 | ||
39 | #include <xen/interface/xen.h> | 45 | #include <xen/interface/xen.h> |
40 | #include <xen/interface/sched.h> | 46 | #include <xen/interface/sched.h> |
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index a38d25ac87d2..81fbd735aec4 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h | |||
@@ -33,39 +33,10 @@ | |||
33 | #ifndef _ASM_X86_XEN_HYPERVISOR_H | 33 | #ifndef _ASM_X86_XEN_HYPERVISOR_H |
34 | #define _ASM_X86_XEN_HYPERVISOR_H | 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 | /* arch/i386/kernel/setup.c */ | 36 | /* arch/i386/kernel/setup.c */ |
55 | extern struct shared_info *HYPERVISOR_shared_info; | 37 | extern struct shared_info *HYPERVISOR_shared_info; |
56 | extern struct start_info *xen_start_info; | 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 | enum xen_domain_type { | 40 | enum xen_domain_type { |
70 | XEN_NATIVE, | 41 | XEN_NATIVE, |
71 | XEN_PV_DOMAIN, | 42 | XEN_PV_DOMAIN, |
@@ -74,9 +45,15 @@ enum xen_domain_type { | |||
74 | 45 | ||
75 | extern enum xen_domain_type xen_domain_type; | 46 | extern enum xen_domain_type xen_domain_type; |
76 | 47 | ||
48 | #ifdef CONFIG_XEN | ||
77 | #define xen_domain() (xen_domain_type != XEN_NATIVE) | 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 | #define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) | 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 | #endif /* _ASM_X86_XEN_HYPERVISOR_H */ | 59 | #endif /* _ASM_X86_XEN_HYPERVISOR_H */ |
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index bc628998a1b9..7ef617ef1df3 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -1,11 +1,16 @@ | |||
1 | #ifndef _ASM_X86_XEN_PAGE_H | 1 | #ifndef _ASM_X86_XEN_PAGE_H |
2 | #define _ASM_X86_XEN_PAGE_H | 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 | #include <linux/pfn.h> | 7 | #include <linux/pfn.h> |
5 | 8 | ||
6 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
10 | #include <asm/page.h> | ||
7 | #include <asm/pgtable.h> | 11 | #include <asm/pgtable.h> |
8 | 12 | ||
13 | #include <xen/interface/xen.h> | ||
9 | #include <xen/features.h> | 14 | #include <xen/features.h> |
10 | 15 | ||
11 | /* Xen machine address */ | 16 | /* Xen machine address */ |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 86cd2f829683..bea215230b20 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | 29 | ||
30 | #include <xen/interface/xen.h> | 30 | #include <xen/interface/xen.h> |
31 | #include <xen/interface/version.h> | ||
31 | #include <xen/interface/physdev.h> | 32 | #include <xen/interface/physdev.h> |
32 | #include <xen/interface/vcpu.h> | 33 | #include <xen/interface/vcpu.h> |
33 | #include <xen/features.h> | 34 | #include <xen/features.h> |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 526c191e84ea..8dc7109d61b7 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -44,13 +44,15 @@ | |||
44 | #include <linux/list.h> | 44 | #include <linux/list.h> |
45 | #include <linux/sysdev.h> | 45 | #include <linux/sysdev.h> |
46 | 46 | ||
47 | #include <asm/xen/hypervisor.h> | ||
48 | #include <asm/page.h> | 47 | #include <asm/page.h> |
49 | #include <asm/pgalloc.h> | 48 | #include <asm/pgalloc.h> |
50 | #include <asm/pgtable.h> | 49 | #include <asm/pgtable.h> |
51 | #include <asm/uaccess.h> | 50 | #include <asm/uaccess.h> |
52 | #include <asm/tlb.h> | 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 | #include <xen/interface/memory.h> | 56 | #include <xen/interface/memory.h> |
55 | #include <xen/xenbus.h> | 57 | #include <xen/xenbus.h> |
56 | #include <xen/features.h> | 58 | #include <xen/features.h> |
diff --git a/drivers/xen/features.c b/drivers/xen/features.c index 0707714e40d6..99eda169c779 100644 --- a/drivers/xen/features.c +++ b/drivers/xen/features.c | |||
@@ -8,7 +8,11 @@ | |||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/cache.h> | 9 | #include <linux/cache.h> |
10 | #include <linux/module.h> | 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 | #include <xen/features.h> | 16 | #include <xen/features.h> |
13 | 17 | ||
14 | u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly; | 18 | u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly; |
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 06592b9da83c..7d8f531fb8e8 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <xen/interface/xen.h> | 40 | #include <xen/interface/xen.h> |
41 | #include <xen/page.h> | 41 | #include <xen/page.h> |
42 | #include <xen/grant_table.h> | 42 | #include <xen/grant_table.h> |
43 | #include <asm/xen/hypercall.h> | ||
43 | 44 | ||
44 | #include <asm/pgtable.h> | 45 | #include <asm/pgtable.h> |
45 | #include <asm/sync_bitops.h> | 46 | #include <asm/sync_bitops.h> |
diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h index 919b5bdcb2bd..2090881c3650 100644 --- a/include/xen/interface/event_channel.h +++ b/include/xen/interface/event_channel.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__ | 9 | #ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__ |
10 | #define __XEN_PUBLIC_EVENT_CHANNEL_H__ | 10 | #define __XEN_PUBLIC_EVENT_CHANNEL_H__ |
11 | 11 | ||
12 | #include <xen/interface/xen.h> | ||
13 | |||
12 | typedef uint32_t evtchn_port_t; | 14 | typedef uint32_t evtchn_port_t; |
13 | DEFINE_GUEST_HANDLE(evtchn_port_t); | 15 | DEFINE_GUEST_HANDLE(evtchn_port_t); |
14 | 16 | ||