aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-24 07:20:52 -0500
committerChristoph Hellwig <hch@lst.de>2018-01-15 03:35:51 -0500
commitd5c23ebf1b52526e8e76b18de6a623984585a76a (patch)
tree2adf5c95a4101e4e2e1237cd947100d33cb70eae
parent4bd89ed39b2ab8dc4ac4b6c59b07d420b0213bec (diff)
ia64: replace ZONE_DMA with ZONE_DMA32
ia64 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/ia64/Kconfig2
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c2
-rw-r--r--arch/ia64/mm/contig.c4
-rw-r--r--arch/ia64/mm/discontig.c8
4 files changed, 8 insertions, 8 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 4d18fca885ee..888acdb163cb 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -66,7 +66,7 @@ config 64BIT
66 select ATA_NONSTANDARD if ATA 66 select ATA_NONSTANDARD if ATA
67 default y 67 default y
68 68
69config ZONE_DMA 69config ZONE_DMA32
70 def_bool y 70 def_bool y
71 depends on !IA64_SGI_SN2 71 depends on !IA64_SGI_SN2
72 72
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index f1ae873a8c35..4a9a6e58ad6a 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -20,7 +20,7 @@ static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
20 unsigned long attrs) 20 unsigned long attrs)
21{ 21{
22 if (dev->coherent_dma_mask != DMA_BIT_MASK(64)) 22 if (dev->coherent_dma_mask != DMA_BIT_MASK(64))
23 gfp |= GFP_DMA; 23 gfp |= GFP_DMA32;
24 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); 24 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
25} 25}
26 26
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 52715a71aede..7d64b30913d1 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -237,9 +237,9 @@ paging_init (void)
237 unsigned long max_zone_pfns[MAX_NR_ZONES]; 237 unsigned long max_zone_pfns[MAX_NR_ZONES];
238 238
239 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 239 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
240#ifdef CONFIG_ZONE_DMA 240#ifdef CONFIG_ZONE_DMA32
241 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; 241 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
242 max_zone_pfns[ZONE_DMA] = max_dma; 242 max_zone_pfns[ZONE_DMA32] = max_dma;
243#endif 243#endif
244 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 244 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
245 245
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 9b2d994cddf6..ac46f0d60b66 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -38,7 +38,7 @@ struct early_node_data {
38 struct ia64_node_data *node_data; 38 struct ia64_node_data *node_data;
39 unsigned long pernode_addr; 39 unsigned long pernode_addr;
40 unsigned long pernode_size; 40 unsigned long pernode_size;
41#ifdef CONFIG_ZONE_DMA 41#ifdef CONFIG_ZONE_DMA32
42 unsigned long num_dma_physpages; 42 unsigned long num_dma_physpages;
43#endif 43#endif
44 unsigned long min_pfn; 44 unsigned long min_pfn;
@@ -669,7 +669,7 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n
669{ 669{
670 unsigned long end = start + len; 670 unsigned long end = start + len;
671 671
672#ifdef CONFIG_ZONE_DMA 672#ifdef CONFIG_ZONE_DMA32
673 if (start <= __pa(MAX_DMA_ADDRESS)) 673 if (start <= __pa(MAX_DMA_ADDRESS))
674 mem_data[node].num_dma_physpages += 674 mem_data[node].num_dma_physpages +=
675 (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; 675 (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
@@ -724,8 +724,8 @@ void __init paging_init(void)
724 } 724 }
725 725
726 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 726 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
727#ifdef CONFIG_ZONE_DMA 727#ifdef CONFIG_ZONE_DMA32
728 max_zone_pfns[ZONE_DMA] = max_dma; 728 max_zone_pfns[ZONE_DMA32] = max_dma;
729#endif 729#endif
730 max_zone_pfns[ZONE_NORMAL] = max_pfn; 730 max_zone_pfns[ZONE_NORMAL] = max_pfn;
731 free_area_init_nodes(max_zone_pfns); 731 free_area_init_nodes(max_zone_pfns);