lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <F73A5182F488C472+20231218031420.2112-1-luming.yu@shingroup.cn>
Date: Mon, 18 Dec 2023 11:14:19 +0800
From: Luming Yu <luming.yu@...ngroup.cn>
To: linuxppc-dev@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org,
	mpe@...erman.id.au,
	npiggin@...il.com,
	christophe.leroy@...roup.eu
Cc: luming.yu@...il.com,
	ke.zhao@...ngroup.cn,
	dawei.li@...ngroup.cn,
	shenghui.qu@...ngroup.cn,
	Luming Yu <luming.yu@...ngroup.cn>
Subject: [PATCH 1/1] powerpc/io: enable dma-contiguous API

enable HAVE_DMA_CONTIGUOUS for general use of
CMA on powerpc.

Signed-off-by: Luming Yu <luming.yu@...ngroup.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ