Re: [PATCH v6 3/8] kho: Include linux/mm.h in kho_block.c

From: Huacai Chen

Date: Fri Nov 20 2026 - 03:20:20 EST


I have applied this one as a preparation for others.

Huacai

On Fri, Oct 30, 2026 at 1:30 AM George Guo <dongtai.guo@xxxxxxxxx> wrote:
>
> 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
>