diff options
author | Christoph Hellwig <hch@lst.de> | 2017-12-24 07:29:10 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-01-15 03:35:57 -0500 |
commit | d3ce48eafc643efcac1db9d4ec1f3479e0b41065 (patch) | |
tree | 3b31e9a7073e558277084b3a012b6c45af212ab9 | |
parent | 90f7816206a3cace98a19021bb867855f5753feb (diff) |
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 <hch@lst.de>
Acked-by: Christian König <christian.koenig@amd.com>
-rw-r--r-- | arch/tile/Kconfig | 2 | ||||
-rw-r--r-- | arch/tile/kernel/pci-dma.c | 4 | ||||
-rw-r--r-- | arch/tile/kernel/setup.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 02f269cfa538..30c586686f29 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
@@ -249,7 +249,7 @@ config HIGHMEM | |||
249 | 249 | ||
250 | If unsure, say "true". | 250 | If unsure, say "true". |
251 | 251 | ||
252 | config ZONE_DMA | 252 | config ZONE_DMA32 |
253 | def_bool y | 253 | def_bool y |
254 | 254 | ||
255 | config IOMMU_HELPER | 255 | config IOMMU_HELPER |
diff --git a/arch/tile/kernel/pci-dma.c b/arch/tile/kernel/pci-dma.c index f2abedc8a080..a267fa740048 100644 --- a/arch/tile/kernel/pci-dma.c +++ b/arch/tile/kernel/pci-dma.c | |||
@@ -54,7 +54,7 @@ static void *tile_dma_alloc_coherent(struct device *dev, size_t size, | |||
54 | * which case we will return NULL. But such devices are uncommon. | 54 | * which case we will return NULL. But such devices are uncommon. |
55 | */ | 55 | */ |
56 | if (dma_mask <= DMA_BIT_MASK(32)) { | 56 | if (dma_mask <= DMA_BIT_MASK(32)) { |
57 | gfp |= GFP_DMA; | 57 | gfp |= GFP_DMA32; |
58 | node = 0; | 58 | node = 0; |
59 | } | 59 | } |
60 | 60 | ||
@@ -513,7 +513,7 @@ static void *tile_swiotlb_alloc_coherent(struct device *dev, size_t size, | |||
513 | dma_addr_t *dma_handle, gfp_t gfp, | 513 | dma_addr_t *dma_handle, gfp_t gfp, |
514 | unsigned long attrs) | 514 | unsigned long attrs) |
515 | { | 515 | { |
516 | gfp |= GFP_DMA; | 516 | gfp |= GFP_DMA32; |
517 | return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); | 517 | return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); |
518 | } | 518 | } |
519 | 519 | ||
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c index ad83c1e66dbd..eb4e198f6f93 100644 --- a/arch/tile/kernel/setup.c +++ b/arch/tile/kernel/setup.c | |||
@@ -814,11 +814,11 @@ static void __init zone_sizes_init(void) | |||
814 | #endif | 814 | #endif |
815 | 815 | ||
816 | if (start < dma_end) { | 816 | if (start < dma_end) { |
817 | zones_size[ZONE_DMA] = min(zones_size[ZONE_NORMAL], | 817 | zones_size[ZONE_DMA32] = min(zones_size[ZONE_NORMAL], |
818 | dma_end - start); | 818 | dma_end - start); |
819 | zones_size[ZONE_NORMAL] -= zones_size[ZONE_DMA]; | 819 | zones_size[ZONE_NORMAL] -= zones_size[ZONE_DMA32]; |
820 | } else { | 820 | } else { |
821 | zones_size[ZONE_DMA] = 0; | 821 | zones_size[ZONE_DMA32] = 0; |
822 | } | 822 | } |
823 | 823 | ||
824 | /* Take zone metadata from controller 0 if we're isolnode. */ | 824 | /* Take zone metadata from controller 0 if we're isolnode. */ |
@@ -830,7 +830,7 @@ static void __init zone_sizes_init(void) | |||
830 | PFN_UP(node_percpu[i])); | 830 | PFN_UP(node_percpu[i])); |
831 | 831 | ||
832 | /* Track the type of memory on each node */ | 832 | /* 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]) |
834 | node_set_state(i, N_NORMAL_MEMORY); | 834 | node_set_state(i, N_NORMAL_MEMORY); |
835 | #ifdef CONFIG_HIGHMEM | 835 | #ifdef CONFIG_HIGHMEM |
836 | if (end != start) | 836 | if (end != start) |