[PATCH v6 3/8] kho: Include linux/mm.h in kho_block.c
From: George Guo
Date: Thu Oct 29 2026 - 13:30:59 EST
From: George Guo <guodongtai@xxxxxxxxxx>
kho_block.c calls virt_to_phys() and phys_to_virt(). With CONFIG_KFENCE=y,
the LoongArch implementations use offset_in_page() and page_address(),
which are provided by <linux/mm.h>.
Include <linux/mm.h> explicitly to avoid implicit-declaration build
errors for these helpers.
Co-developed-by: Kexin Liu <liukexin@xxxxxxxxxx>
Signed-off-by: Kexin Liu <liukexin@xxxxxxxxxx>
Signed-off-by: George Guo <guodongtai@xxxxxxxxxx>
---
kernel/liveupdate/kho_block.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/liveupdate/kho_block.c b/kernel/liveupdate/kho_block.c
index 0d2a342ef422..0d56891b2f4c 100644
--- a/kernel/liveupdate/kho_block.c
+++ b/kernel/liveupdate/kho_block.c
@@ -25,6 +25,7 @@
#include <linux/kho/abi/block.h>
#include <linux/kho_block.h>
#include <linux/slab.h>
+#include <linux/mm.h>
/*
* Safeguard limit for the number of serialization blocks. This is used to
--
2.53.0