low memory in ZONE_DMA. There is no real benefit from diverging from
native in this respect.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
unsigned int max_dma, low;
- /*
- * XEN: Our notion of "DMA memory" is fake when running over Xen.
- * We simply put all RAM in the DMA zone so that those drivers which
- * needlessly specify GFP_DMA do not get starved of RAM unnecessarily.
- * Those drivers that *do* require lowmem are screwed anyway when
- * running over Xen!
- */
- max_dma = max_low_pfn;
+ max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
low = max_low_pfn;
if (low < max_dma)
unsigned long start_pfn, unsigned long end_pfn)
{
int i;
-#ifndef CONFIG_XEN
unsigned long w;
-#endif
for (i = 0; i < MAX_NR_ZONES; i++)
z[i] = 0;
-#ifndef CONFIG_XEN
if (start_pfn < MAX_DMA_PFN)
z[ZONE_DMA] = MAX_DMA_PFN - start_pfn;
if (start_pfn < MAX_DMA32_PFN) {
h[ZONE_DMA] = z[ZONE_DMA];
}
}
-#else
- z[ZONE_DMA] = end_pfn;
- for (i = 0; i < MAX_NR_ZONES; i++)
- h[i] = 0;
-#endif
}
#ifndef CONFIG_NUMA