On LoongArch kmalloc() range is DMW-mapped rather than TLB-mapped, so KFENCE remap __kfence_pool to the TLB-mappd range. To make all drivers work, {virt, phys, page, pfn} translation functions are overriden (part of them already done, others done in this series): 1, virt_to_pfn()/pfn_to_virt(); 2, virt_to_page()/page_to_virt(); 3, virt_to_phys()/phys_to_virt(). Since LoongArch overrides page_to_virt() which use page_address() in the KFENCE case (by defining WANT_PAGE_VIRTUAL/HASHED_PAGE_VIRTUAL). So move lowmem_page_address() a little later to avoid such build errors: error: implicit declaration of function ‘page_address’. Huacai Chen(3): mm: Move lowmem_page_address() a little later. LoongArch: Make {virt, phys, page, pfn} translation work with KFENCE LoongArch: Make virt_addr_valid()/__virt_addr_valid() work with KFENCE Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx> --- 2.27.0