|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 17/27] xen/swiotlb: improve comment on gfp flags in x
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Clarify why we don't care about the kernel's pseudo-phys restrictions,
so long as the underlying pages are in the right place.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
drivers/pci/xen-iommu.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/xen-iommu.c b/drivers/pci/xen-iommu.c
index 7b6fd3e..13cfe0c 100644
--- a/drivers/pci/xen-iommu.c
+++ b/drivers/pci/xen-iommu.c
@@ -202,15 +202,17 @@ static void *xen_alloc_coherent(struct device *dev,
size_t size,
unsigned long vstart;
u64 mask;
- /* ignore region specifiers */
+ /*
+ * Ignore region specifiers - the kernel's ideas of
+ * pseudo-phys memory layout has nothing to do with the
+ * machine physical layout. We can't allocate highmem
+ * because we can't return a pointer to it.
+ */
gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
if (dma_alloc_from_coherent(dev, size, dma_handle, &ret))
return ret;
- if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
- gfp |= GFP_DMA;
-
vstart = __get_free_pages(gfp, order);
ret = (void *)vstart;
--
1.6.0.6
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 09/27] xen/pci: clean up Kconfig a bit, (continued)
- [Xen-devel] [PATCH 12/27] xen: add hooks for mapping phys<->bus addresses in swiotlb, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 11/27] xen swiotlb: fixup swiotlb is chunks smaller than MAX_CONTIG_ORDER, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 16/27] swiotlb: use swiotlb_alloc_boot to allocate emergency pool, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 14/27] xen: enable swiotlb for xen domain 0., Jeremy Fitzhardinge
- [Xen-devel] [PATCH 17/27] xen/swiotlb: improve comment on gfp flags in xen_alloc_coherent(),
Jeremy Fitzhardinge <=
- [Xen-devel] [PATCH 07/27] Xen/x86/PCI: Add support for the Xen PCI subsytem, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 19/27] xen: set callout_map to make mtrr work, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 18/27] xen/swiotlb: add sync functions, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 15/27] xen/swiotlb: use dma_alloc_from_coherent to get device coherent memory, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 20/27] xen mtrr: Use specific cpu_has_foo macros instead of generic cpu_has(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH 24/27] xen mtrr: Kill some unneccessary includes, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 25/27] x86: define arch_vm_get_page_prot to set _PAGE_IOMAP on VM_IO vmas, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 26/27] agp: use more dma-ops-like operations for agp memory, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 21/27] xen mtrr: Use generic_validate_add_page(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH 22/27] xen mtrr: Implement xen_get_free_region(), Jeremy Fitzhardinge
|
|
|
|
|