|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 07/10] xen/swiotlb: improve comment on gfp flags in x
To: |
Ingo Molnar <mingo@xxxxxxx> |
Subject: |
[Xen-devel] [PATCH 07/10] xen/swiotlb: improve comment on gfp flags in xen_alloc_coherent() |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Tue, 12 May 2009 14:50:48 -0700 |
Cc: |
Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Joerg Roedel <joerg.roedel@xxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxxxx> |
Delivery-date: |
Tue, 12 May 2009 16:23:17 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<1242165051-6636-1-git-send-email-jeremy@xxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<1242165051-6636-1-git-send-email-jeremy@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
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.
[ Impact: cleanup ]
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 bc64397..d09ff91 100644
--- a/drivers/pci/xen-iommu.c
+++ b/drivers/pci/xen-iommu.c
@@ -203,15 +203,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 < DMA_BIT_MASK(32)))
- 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] [GIT PULL] Xen dom0 swiotlb updates, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 07/10] xen/swiotlb: improve comment on gfp flags in xen_alloc_coherent(),
Jeremy Fitzhardinge <=
- [Xen-devel] [PATCH 08/10] xen/swiotlb: add sync functions, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 01/10] xen: make sure swiotlb allocation is physically contigious, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 02/10] xen swiotlb: fixup swiotlb is chunks smaller than MAX_CONTIG_ORDER, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 03/10] xen: add hooks for mapping phys<->bus addresses in swiotlb, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 04/10] xen/swiotlb: add hook for swiotlb_arch_range_needs_mapping, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 06/10] swiotlb: use swiotlb_alloc_boot to allocate emergency pool, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 10/10] xen/swiotlb: define xen_wants_swiotlb when PCI_XEN is not enabled, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 09/10] xen/swiotlb: make sure prototypes are in scope for swiotlb functions, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 05/10] xen: enable swiotlb for xen domain 0., Jeremy Fitzhardinge
|
|
|
|
|