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@citrix.com>
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;