[PATCH v4 3/4] liveupdate: luo_session: include linux/mm.h for virt/phys translation
Huacai Chen
chenhuacai at kernel.org
Mon Aug 10 07:37:25 PDT 2026
Hi, George,
This should be the 2nd patch.
Huacai
On Fri, Aug 7, 2026 at 6:39 PM George Guo <dongtai.guo at linux.dev> wrote:
>
> From: George Guo <guodongtai at kylinos.cn>
>
> luo_session.c calls virt_to_phys() and phys_to_virt(). On LoongArch with
> CONFIG_KFENCE=y, these macros (in arch/loongarch/include/asm/io.h) expand
> to offset_in_page() and page_address(), both declared in <linux/mm.h>.
>
> Since luo_session.c only includes <linux/io.h>, the translation unit fails
> to build with CONFIG_KFENCE=y:
>
> asm/io.h: error: implicit declaration of function 'offset_in_page'
> asm/io.h: error: implicit declaration of function 'page_address'
>
> Add the missing include to fix these build errors.
>
> Co-developed-by: Kexin Liu <liukexin at kylinos.cn>
> Signed-off-by: Kexin Liu <liukexin at kylinos.cn>
> Signed-off-by: George Guo <guodongtai at kylinos.cn>
> Acked-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
> ---
> kernel/liveupdate/luo_session.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c
> index f38b5b18f3f8..31490ac7b63d 100644
> --- a/kernel/liveupdate/luo_session.c
> +++ b/kernel/liveupdate/luo_session.c
> @@ -94,6 +94,7 @@
> #include <linux/kho/abi/luo.h>
> #include <linux/list.h>
> #include <linux/liveupdate.h>
> +#include <linux/mm.h>
> #include <linux/mutex.h>
> #include <linux/rwsem.h>
> #include <linux/slab.h>
> --
> 2.53.0
>
>
More information about the kexec
mailing list