summaryrefslogtreecommitdiff
path: root/arch/parisc/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-19 10:04:53 +0300
committerHelge Deller <deller@gmx.de>2018-08-13 10:30:13 +0300
commita34a9b9682a5a9de53386ed0872c7d38ca9d6b38 (patch)
treeb2aeaba7ec847ab4216569f1f44b0c4598ab4f0d /arch/parisc/mm
parent94710cac0ef4ee177a63b5227664b38c95bbf703 (diff)
downloadlinux-a34a9b9682a5a9de53386ed0872c7d38ca9d6b38.tar.xz
parisc: merge pcx_dma_ops and pcxl_dma_ops
The only difference is that pcxl supports dma coherent allocations, while pcx only supports non-consistent allocations and otherwise fails. But dma_alloc* is not in the fast path, and merging these two allows an easy migration path to the generic dma-noncoherent implementation, so do it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/mm')
-rw-r--r--arch/parisc/mm/init.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 2607d2d33405..74842d28a7a1 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -19,7 +19,6 @@
#include <linux/gfp.h>
#include <linux/delay.h>
#include <linux/init.h>
-#include <linux/pci.h> /* for hppa_dma_ops and pcxl_dma_ops */
#include <linux/initrd.h>
#include <linux/swap.h>
#include <linux/unistd.h>
@@ -616,17 +615,13 @@ void __init mem_init(void)
free_all_bootmem();
#ifdef CONFIG_PA11
- if (hppa_dma_ops == &pcxl_dma_ops) {
+ if (boot_cpu_data.cpu_type == pcxl2 || boot_cpu_data.cpu_type == pcxl) {
pcxl_dma_start = (unsigned long)SET_MAP_OFFSET(MAP_START);
parisc_vmalloc_start = SET_MAP_OFFSET(pcxl_dma_start
+ PCXL_DMA_MAP_SIZE);
- } else {
- pcxl_dma_start = 0;
- parisc_vmalloc_start = SET_MAP_OFFSET(MAP_START);
- }
-#else
- parisc_vmalloc_start = SET_MAP_OFFSET(MAP_START);
+ } else
#endif
+ parisc_vmalloc_start = SET_MAP_OFFSET(MAP_START);
mem_init_print_info(NULL);