diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/x86/include/asm/xen | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/x86/include/asm/xen')
-rw-r--r-- | arch/x86/include/asm/xen/events.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/hypercall.h | 37 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/hypervisor.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/interface.h | 19 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/page.h | 10 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/swiotlb-xen.h | 2 |
6 files changed, 24 insertions, 46 deletions
diff --git a/arch/x86/include/asm/xen/events.h b/arch/x86/include/asm/xen/events.h index cc146d51449..1df35417c41 100644 --- a/arch/x86/include/asm/xen/events.h +++ b/arch/x86/include/asm/xen/events.h | |||
@@ -6,7 +6,6 @@ enum ipi_vector { | |||
6 | XEN_CALL_FUNCTION_VECTOR, | 6 | XEN_CALL_FUNCTION_VECTOR, |
7 | XEN_CALL_FUNCTION_SINGLE_VECTOR, | 7 | XEN_CALL_FUNCTION_SINGLE_VECTOR, |
8 | XEN_SPIN_UNLOCK_VECTOR, | 8 | XEN_SPIN_UNLOCK_VECTOR, |
9 | XEN_IRQ_WORK_VECTOR, | ||
10 | 9 | ||
11 | XEN_NR_IPIS, | 10 | XEN_NR_IPIS, |
12 | }; | 11 | }; |
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index c20d1ce62dc..417777de5a4 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h | |||
@@ -47,8 +47,6 @@ | |||
47 | #include <xen/interface/xen.h> | 47 | #include <xen/interface/xen.h> |
48 | #include <xen/interface/sched.h> | 48 | #include <xen/interface/sched.h> |
49 | #include <xen/interface/physdev.h> | 49 | #include <xen/interface/physdev.h> |
50 | #include <xen/interface/platform.h> | ||
51 | #include <xen/interface/xen-mca.h> | ||
52 | 50 | ||
53 | /* | 51 | /* |
54 | * The hypercall asms have to meet several constraints: | 52 | * The hypercall asms have to meet several constraints: |
@@ -303,20 +301,6 @@ HYPERVISOR_set_timer_op(u64 timeout) | |||
303 | } | 301 | } |
304 | 302 | ||
305 | static inline int | 303 | static inline int |
306 | HYPERVISOR_mca(struct xen_mc *mc_op) | ||
307 | { | ||
308 | mc_op->interface_version = XEN_MCA_INTERFACE_VERSION; | ||
309 | return _hypercall1(int, mca, mc_op); | ||
310 | } | ||
311 | |||
312 | static inline int | ||
313 | HYPERVISOR_dom0_op(struct xen_platform_op *platform_op) | ||
314 | { | ||
315 | platform_op->interface_version = XENPF_INTERFACE_VERSION; | ||
316 | return _hypercall1(int, dom0_op, platform_op); | ||
317 | } | ||
318 | |||
319 | static inline int | ||
320 | HYPERVISOR_set_debugreg(int reg, unsigned long value) | 304 | HYPERVISOR_set_debugreg(int reg, unsigned long value) |
321 | { | 305 | { |
322 | return _hypercall2(int, set_debugreg, reg, value); | 306 | return _hypercall2(int, set_debugreg, reg, value); |
@@ -359,14 +343,18 @@ HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val, | |||
359 | return _hypercall4(int, update_va_mapping, va, | 343 | return _hypercall4(int, update_va_mapping, va, |
360 | new_val.pte, new_val.pte >> 32, flags); | 344 | new_val.pte, new_val.pte >> 32, flags); |
361 | } | 345 | } |
362 | extern int __must_check xen_event_channel_op_compat(int, void *); | ||
363 | 346 | ||
364 | static inline int | 347 | static inline int |
365 | HYPERVISOR_event_channel_op(int cmd, void *arg) | 348 | HYPERVISOR_event_channel_op(int cmd, void *arg) |
366 | { | 349 | { |
367 | int rc = _hypercall2(int, event_channel_op, cmd, arg); | 350 | int rc = _hypercall2(int, event_channel_op, cmd, arg); |
368 | if (unlikely(rc == -ENOSYS)) | 351 | if (unlikely(rc == -ENOSYS)) { |
369 | rc = xen_event_channel_op_compat(cmd, arg); | 352 | struct evtchn_op op; |
353 | op.cmd = cmd; | ||
354 | memcpy(&op.u, arg, sizeof(op.u)); | ||
355 | rc = _hypercall1(int, event_channel_op_compat, &op); | ||
356 | memcpy(arg, &op.u, sizeof(op.u)); | ||
357 | } | ||
370 | return rc; | 358 | return rc; |
371 | } | 359 | } |
372 | 360 | ||
@@ -382,14 +370,17 @@ HYPERVISOR_console_io(int cmd, int count, char *str) | |||
382 | return _hypercall3(int, console_io, cmd, count, str); | 370 | return _hypercall3(int, console_io, cmd, count, str); |
383 | } | 371 | } |
384 | 372 | ||
385 | extern int __must_check HYPERVISOR_physdev_op_compat(int, void *); | ||
386 | |||
387 | static inline int | 373 | static inline int |
388 | HYPERVISOR_physdev_op(int cmd, void *arg) | 374 | HYPERVISOR_physdev_op(int cmd, void *arg) |
389 | { | 375 | { |
390 | int rc = _hypercall2(int, physdev_op, cmd, arg); | 376 | int rc = _hypercall2(int, physdev_op, cmd, arg); |
391 | if (unlikely(rc == -ENOSYS)) | 377 | if (unlikely(rc == -ENOSYS)) { |
392 | rc = HYPERVISOR_physdev_op_compat(cmd, arg); | 378 | struct physdev_op op; |
379 | op.cmd = cmd; | ||
380 | memcpy(&op.u, arg, sizeof(op.u)); | ||
381 | rc = _hypercall1(int, physdev_op_compat, &op); | ||
382 | memcpy(arg, &op.u, sizeof(op.u)); | ||
383 | } | ||
393 | return rc; | 384 | return rc; |
394 | } | 385 | } |
395 | 386 | ||
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index 125f344f06a..66d0fff1ee8 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h | |||
@@ -33,6 +33,7 @@ | |||
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 | /* arch/i386/kernel/setup.c */ | ||
36 | extern struct shared_info *HYPERVISOR_shared_info; | 37 | extern struct shared_info *HYPERVISOR_shared_info; |
37 | extern struct start_info *xen_start_info; | 38 | extern struct start_info *xen_start_info; |
38 | 39 | ||
diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h index fd9cb7695b5..5d4922ad4b9 100644 --- a/arch/x86/include/asm/xen/interface.h +++ b/arch/x86/include/asm/xen/interface.h | |||
@@ -47,23 +47,14 @@ | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifndef __ASSEMBLY__ | 49 | #ifndef __ASSEMBLY__ |
50 | /* Explicitly size integers that represent pfns in the public interface | ||
51 | * with Xen so that on ARM we can have one ABI that works for 32 and 64 | ||
52 | * bit guests. */ | ||
53 | typedef unsigned long xen_pfn_t; | ||
54 | #define PRI_xen_pfn "lx" | ||
55 | typedef unsigned long xen_ulong_t; | ||
56 | #define PRI_xen_ulong "lx" | ||
57 | /* Guest handles for primitive C types. */ | 50 | /* Guest handles for primitive C types. */ |
58 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 51 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
59 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 52 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
53 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
60 | DEFINE_GUEST_HANDLE(char); | 54 | DEFINE_GUEST_HANDLE(char); |
61 | DEFINE_GUEST_HANDLE(int); | 55 | DEFINE_GUEST_HANDLE(int); |
56 | DEFINE_GUEST_HANDLE(long); | ||
62 | DEFINE_GUEST_HANDLE(void); | 57 | DEFINE_GUEST_HANDLE(void); |
63 | DEFINE_GUEST_HANDLE(uint64_t); | ||
64 | DEFINE_GUEST_HANDLE(uint32_t); | ||
65 | DEFINE_GUEST_HANDLE(xen_pfn_t); | ||
66 | DEFINE_GUEST_HANDLE(xen_ulong_t); | ||
67 | #endif | 58 | #endif |
68 | 59 | ||
69 | #ifndef HYPERVISOR_VIRT_START | 60 | #ifndef HYPERVISOR_VIRT_START |
@@ -123,13 +114,11 @@ struct arch_shared_info { | |||
123 | #endif /* !__ASSEMBLY__ */ | 114 | #endif /* !__ASSEMBLY__ */ |
124 | 115 | ||
125 | #ifdef CONFIG_X86_32 | 116 | #ifdef CONFIG_X86_32 |
126 | #include <asm/xen/interface_32.h> | 117 | #include "interface_32.h" |
127 | #else | 118 | #else |
128 | #include <asm/xen/interface_64.h> | 119 | #include "interface_64.h" |
129 | #endif | 120 | #endif |
130 | 121 | ||
131 | #include <asm/pvclock-abi.h> | ||
132 | |||
133 | #ifndef __ASSEMBLY__ | 122 | #ifndef __ASSEMBLY__ |
134 | /* | 123 | /* |
135 | * The following is all CPU context. Note that the fpu_ctxt block is filled | 124 | * The following is all CPU context. Note that the fpu_ctxt block is filled |
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 472b9b78301..7ff4669580c 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/pgtable.h> | 12 | #include <asm/pgtable.h> |
13 | 13 | ||
14 | #include <xen/interface/xen.h> | 14 | #include <xen/interface/xen.h> |
15 | #include <xen/grant_table.h> | ||
16 | #include <xen/features.h> | 15 | #include <xen/features.h> |
17 | 16 | ||
18 | /* Xen machine address */ | 17 | /* Xen machine address */ |
@@ -44,18 +43,19 @@ extern unsigned long machine_to_phys_nr; | |||
44 | 43 | ||
45 | extern unsigned long get_phys_to_machine(unsigned long pfn); | 44 | extern unsigned long get_phys_to_machine(unsigned long pfn); |
46 | extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn); | 45 | extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn); |
47 | extern bool __init early_set_phys_to_machine(unsigned long pfn, unsigned long mfn); | ||
48 | extern bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn); | 46 | extern bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn); |
49 | extern unsigned long set_phys_range_identity(unsigned long pfn_s, | 47 | extern unsigned long set_phys_range_identity(unsigned long pfn_s, |
50 | unsigned long pfn_e); | 48 | unsigned long pfn_e); |
51 | 49 | ||
52 | extern int m2p_add_override(unsigned long mfn, struct page *page, | 50 | extern int m2p_add_override(unsigned long mfn, struct page *page, |
53 | struct gnttab_map_grant_ref *kmap_op); | 51 | bool clear_pte); |
54 | extern int m2p_remove_override(struct page *page, | 52 | extern int m2p_remove_override(struct page *page, bool clear_pte); |
55 | struct gnttab_map_grant_ref *kmap_op); | ||
56 | extern struct page *m2p_find_override(unsigned long mfn); | 53 | extern struct page *m2p_find_override(unsigned long mfn); |
57 | extern unsigned long m2p_find_override_pfn(unsigned long mfn, unsigned long pfn); | 54 | extern unsigned long m2p_find_override_pfn(unsigned long mfn, unsigned long pfn); |
58 | 55 | ||
56 | #ifdef CONFIG_XEN_DEBUG_FS | ||
57 | extern int p2m_dump_show(struct seq_file *m, void *v); | ||
58 | #endif | ||
59 | static inline unsigned long pfn_to_mfn(unsigned long pfn) | 59 | static inline unsigned long pfn_to_mfn(unsigned long pfn) |
60 | { | 60 | { |
61 | unsigned long mfn; | 61 | unsigned long mfn; |
diff --git a/arch/x86/include/asm/xen/swiotlb-xen.h b/arch/x86/include/asm/xen/swiotlb-xen.h index ee52fcac6f7..1be1ab7d6a4 100644 --- a/arch/x86/include/asm/xen/swiotlb-xen.h +++ b/arch/x86/include/asm/xen/swiotlb-xen.h | |||
@@ -5,12 +5,10 @@ | |||
5 | extern int xen_swiotlb; | 5 | extern int xen_swiotlb; |
6 | extern int __init pci_xen_swiotlb_detect(void); | 6 | extern int __init pci_xen_swiotlb_detect(void); |
7 | extern void __init pci_xen_swiotlb_init(void); | 7 | extern void __init pci_xen_swiotlb_init(void); |
8 | extern int pci_xen_swiotlb_init_late(void); | ||
9 | #else | 8 | #else |
10 | #define xen_swiotlb (0) | 9 | #define xen_swiotlb (0) |
11 | static inline int __init pci_xen_swiotlb_detect(void) { return 0; } | 10 | static inline int __init pci_xen_swiotlb_detect(void) { return 0; } |
12 | static inline void __init pci_xen_swiotlb_init(void) { } | 11 | static inline void __init pci_xen_swiotlb_init(void) { } |
13 | static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; } | ||
14 | #endif | 12 | #endif |
15 | 13 | ||
16 | #endif /* _ASM_X86_SWIOTLB_XEN_H */ | 14 | #endif /* _ASM_X86_SWIOTLB_XEN_H */ |