diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 12:09:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 12:09:41 -0400 |
commit | 26f0cf91813bdc8e61595f8ad6660251e2ee9cf6 (patch) | |
tree | db129d45fba03e3e59392410d0f35ba7d3e438e6 /arch/x86/include/asm | |
parent | d862b13bc8cbab9692fbe0ef44c40d0488b81af1 (diff) | |
parent | fe96eb404e33b59bb39f7050205f7c56c1c7d686 (diff) |
Merge branch 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
x86: Detect whether we should use Xen SWIOTLB.
pci-swiotlb-xen: Add glue code to setup dma_ops utilizing xen_swiotlb_* functions.
swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough.
xen/mmu: inhibit vmap aliases rather than trying to clear them out
vmap: add flag to allow lazy unmap to be disabled at runtime
xen: Add xen_create_contiguous_region
xen: Rename the balloon lock
xen: Allow unprivileged Xen domains to create iomap pages
xen: use _PAGE_IOMAP in ioremap to do machine mappings
Fix up trivial conflicts (adding both xen swiotlb and xen pci platform
driver setup close to each other) in drivers/xen/{Kconfig,Makefile} and
include/xen/xen-ops.h
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/xen/page.h | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/swiotlb-xen.h | 14 |
2 files changed, 16 insertions, 6 deletions
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 018a0a400799..bf5f7d32bd08 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -112,13 +112,9 @@ static inline xpaddr_t machine_to_phys(xmaddr_t machine) | |||
112 | */ | 112 | */ |
113 | static inline unsigned long mfn_to_local_pfn(unsigned long mfn) | 113 | static inline unsigned long mfn_to_local_pfn(unsigned long mfn) |
114 | { | 114 | { |
115 | extern unsigned long max_mapnr; | ||
116 | unsigned long pfn = mfn_to_pfn(mfn); | 115 | unsigned long pfn = mfn_to_pfn(mfn); |
117 | if ((pfn < max_mapnr) | 116 | if (get_phys_to_machine(pfn) != mfn) |
118 | && !xen_feature(XENFEAT_auto_translated_physmap) | 117 | return -1; /* force !pfn_valid() */ |
119 | && (get_phys_to_machine(pfn) != mfn)) | ||
120 | return max_mapnr; /* force !pfn_valid() */ | ||
121 | /* XXX fixme; not true with sparsemem */ | ||
122 | return pfn; | 118 | return pfn; |
123 | } | 119 | } |
124 | 120 | ||
diff --git a/arch/x86/include/asm/xen/swiotlb-xen.h b/arch/x86/include/asm/xen/swiotlb-xen.h new file mode 100644 index 000000000000..1be1ab7d6a41 --- /dev/null +++ b/arch/x86/include/asm/xen/swiotlb-xen.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _ASM_X86_SWIOTLB_XEN_H | ||
2 | #define _ASM_X86_SWIOTLB_XEN_H | ||
3 | |||
4 | #ifdef CONFIG_SWIOTLB_XEN | ||
5 | extern int xen_swiotlb; | ||
6 | extern int __init pci_xen_swiotlb_detect(void); | ||
7 | extern void __init pci_xen_swiotlb_init(void); | ||
8 | #else | ||
9 | #define xen_swiotlb (0) | ||
10 | static inline int __init pci_xen_swiotlb_detect(void) { return 0; } | ||
11 | static inline void __init pci_xen_swiotlb_init(void) { } | ||
12 | #endif | ||
13 | |||
14 | #endif /* _ASM_X86_SWIOTLB_XEN_H */ | ||