Commit d3ce48ea authored by Christoph Hellwig's avatar Christoph Hellwig

tile: replace ZONE_DMA with ZONE_DMA32

tile uses ZONE_DMA for allocations below 32-bits.  These days we
name the zone for that ZONE_DMA32, which will allow to use the
dma-direct and generic swiotlb code as-is, so rename it.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
parent 90f78162
...@@ -249,7 +249,7 @@ config HIGHMEM ...@@ -249,7 +249,7 @@ config HIGHMEM
If unsure, say "true". If unsure, say "true".
config ZONE_DMA config ZONE_DMA32
def_bool y def_bool y
config IOMMU_HELPER config IOMMU_HELPER
......
...@@ -54,7 +54,7 @@ static void *tile_dma_alloc_coherent(struct device *dev, size_t size, ...@@ -54,7 +54,7 @@ static void *tile_dma_alloc_coherent(struct device *dev, size_t size,
* which case we will return NULL. But such devices are uncommon. * which case we will return NULL. But such devices are uncommon.
*/ */
if (dma_mask <= DMA_BIT_MASK(32)) { if (dma_mask <= DMA_BIT_MASK(32)) {
gfp |= GFP_DMA; gfp |= GFP_DMA32;
node = 0; node = 0;
} }
...@@ -513,7 +513,7 @@ static void *tile_swiotlb_alloc_coherent(struct device *dev, size_t size, ...@@ -513,7 +513,7 @@ static void *tile_swiotlb_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp, dma_addr_t *dma_handle, gfp_t gfp,
unsigned long attrs) unsigned long attrs)
{ {
gfp |= GFP_DMA; gfp |= GFP_DMA32;
return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
} }
......
...@@ -814,11 +814,11 @@ static void __init zone_sizes_init(void) ...@@ -814,11 +814,11 @@ static void __init zone_sizes_init(void)
#endif #endif
if (start < dma_end) { if (start < dma_end) {
zones_size[ZONE_DMA] = min(zones_size[ZONE_NORMAL], zones_size[ZONE_DMA32] = min(zones_size[ZONE_NORMAL],
dma_end - start); dma_end - start);
zones_size[ZONE_NORMAL] -= zones_size[ZONE_DMA]; zones_size[ZONE_NORMAL] -= zones_size[ZONE_DMA32];
} else { } else {
zones_size[ZONE_DMA] = 0; zones_size[ZONE_DMA32] = 0;
} }
/* Take zone metadata from controller 0 if we're isolnode. */ /* Take zone metadata from controller 0 if we're isolnode. */
...@@ -830,7 +830,7 @@ static void __init zone_sizes_init(void) ...@@ -830,7 +830,7 @@ static void __init zone_sizes_init(void)
PFN_UP(node_percpu[i])); PFN_UP(node_percpu[i]));
/* Track the type of memory on each node */ /* Track the type of memory on each node */
if (zones_size[ZONE_NORMAL] || zones_size[ZONE_DMA]) if (zones_size[ZONE_NORMAL] || zones_size[ZONE_DMA32])
node_set_state(i, N_NORMAL_MEMORY); node_set_state(i, N_NORMAL_MEMORY);
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
if (end != start) if (end != start)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment