[PATCH 1/1] powerpc/io: enable dma-contiguous API
Luming Yu
luming.yu at shingroup.cn
Mon Dec 18 14:14:19 AEDT 2023
enable HAVE_DMA_CONTIGUOUS for general use of
CMA on powerpc.
Signed-off-by: Luming Yu <luming.yu at shingroup.cn>
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/kernel/setup-common.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index b968068cc04a..e21f72bcb61f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -231,6 +231,7 @@ config PPC
select HAVE_C_RECORDMCOUNT
select HAVE_DEBUG_KMEMLEAK
select HAVE_DEBUG_STACKOVERFLOW
+ select HAVE_DMA_CONTIGUOUS
select HAVE_DYNAMIC_FTRACE
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 9b142b9d5187..50d09363352d 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -35,6 +35,7 @@
#include <linux/of_irq.h>
#include <linux/hugetlb.h>
#include <linux/pgtable.h>
+#include <linux/dma-map-ops.h>
#include <asm/io.h>
#include <asm/paca.h>
#include <asm/processor.h>
@@ -975,6 +976,7 @@ void __init setup_arch(char **cmdline_p)
*/
kvm_cma_reserve();
gigantic_hugetlb_cma_reserve();
+ dma_contiguous_reserve(0);
early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
--
2.42.0.windows.2
More information about the Linuxppc-dev
mailing list