Skip to content

Commit d3ce48e

Browse files
author
Christoph Hellwig
committed
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: Christoph Hellwig <[email protected]> Acked-by: Christian König <[email protected]>
1 parent 90f7816 commit d3ce48e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arch/tile/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ config HIGHMEM
249249

250250
If unsure, say "true".
251251

252-
config ZONE_DMA
252+
config ZONE_DMA32
253253
def_bool y
254254

255255
config IOMMU_HELPER

arch/tile/kernel/pci-dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void *tile_dma_alloc_coherent(struct device *dev, size_t size,
5454
* which case we will return NULL. But such devices are uncommon.
5555
*/
5656
if (dma_mask <= DMA_BIT_MASK(32)) {
57-
gfp |= GFP_DMA;
57+
gfp |= GFP_DMA32;
5858
node = 0;
5959
}
6060

@@ -513,7 +513,7 @@ static void *tile_swiotlb_alloc_coherent(struct device *dev, size_t size,
513513
dma_addr_t *dma_handle, gfp_t gfp,
514514
unsigned long attrs)
515515
{
516-
gfp |= GFP_DMA;
516+
gfp |= GFP_DMA32;
517517
return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
518518
}
519519

arch/tile/kernel/setup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,11 +814,11 @@ static void __init zone_sizes_init(void)
814814
#endif
815815

816816
if (start < dma_end) {
817-
zones_size[ZONE_DMA] = min(zones_size[ZONE_NORMAL],
817+
zones_size[ZONE_DMA32] = min(zones_size[ZONE_NORMAL],
818818
dma_end - start);
819-
zones_size[ZONE_NORMAL] -= zones_size[ZONE_DMA];
819+
zones_size[ZONE_NORMAL] -= zones_size[ZONE_DMA32];
820820
} else {
821-
zones_size[ZONE_DMA] = 0;
821+
zones_size[ZONE_DMA32] = 0;
822822
}
823823

824824
/* Take zone metadata from controller 0 if we're isolnode. */
@@ -830,7 +830,7 @@ static void __init zone_sizes_init(void)
830830
PFN_UP(node_percpu[i]));
831831

832832
/* Track the type of memory on each node */
833-
if (zones_size[ZONE_NORMAL] || zones_size[ZONE_DMA])
833+
if (zones_size[ZONE_NORMAL] || zones_size[ZONE_DMA32])
834834
node_set_state(i, N_NORMAL_MEMORY);
835835
#ifdef CONFIG_HIGHMEM
836836
if (end != start)

0 commit comments

Comments
 (0)