memblock test: fix implicit declaration of function 'virt_to_phys'

Commit 94ff46de4a ("memblock: Move late alloc warning down to phys
alloc") introduce the usage of virt_to_phys(), which is not defined in
memblock tests.

Define it in mm.h to fix the build error.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Link: https://lore.kernel.org/r/20240806010319.29194-1-richard.weiyang@gmail.com
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
Wei Yang
2024-08-06 01:03:15 +00:00
committed by Mike Rapoport (Microsoft)
parent e2ae9cf39f
commit 39f64e402f
+6
View File
@@ -25,6 +25,12 @@ static inline void *phys_to_virt(unsigned long address)
return __va(address);
}
#define virt_to_phys virt_to_phys
static inline phys_addr_t virt_to_phys(volatile void *address)
{
return (phys_addr_t)address;
}
void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid);
static inline void totalram_pages_inc(void)