Commit 39f64e40 authored by Wei Yang's avatar Wei Yang Committed by Mike Rapoport (Microsoft)
Browse files

memblock test: fix implicit declaration of function 'virt_to_phys'



Commit 94ff46de ("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: default avatarWei Yang <richard.weiyang@gmail.com>
Link: https://lore.kernel.org/r/20240806010319.29194-1-richard.weiyang@gmail.com


Signed-off-by: default avatarMike Rapoport (Microsoft) <rppt@kernel.org>
parent e2ae9cf3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)