Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36ba7ff2 authored by Laura Abbott's avatar Laura Abbott
Browse files

mm/memblock: add memblock_get_current_limit



Apart from setting the limit of memblock, it's also useful to be able
to get the limit to avoid recalculating it every time. Add the function
to do so.

Change-Id: I4f28dc1e549fd4c7fabf4e0dbd97871dbaa318ab
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 225b87be
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -182,6 +182,8 @@ static inline void memblock_dump_all(void)
void memblock_set_current_limit(phys_addr_t limit);


phys_addr_t memblock_get_current_limit(void);

/*
 * pfn conversion functions
 *
+5 −0
Original line number Diff line number Diff line
@@ -988,6 +988,11 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit)
	memblock.current_limit = limit;
}

phys_addr_t __init_memblock memblock_get_current_limit(void)
{
	return memblock.current_limit;
}

static void __init_memblock memblock_dump(struct memblock_type *type, char *name)
{
	unsigned long long base, size;