Skip to content

Commit

Permalink
ARM: 7993/1: mm/memblock: add memblock_get_current_limit
Browse files Browse the repository at this point in the history
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.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Laura Abbott authored and Russell King committed Mar 12, 2014
1 parent a513457 commit fec5101
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/memblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,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
*
Expand Down
5 changes: 5 additions & 0 deletions mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,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;
Expand Down

0 comments on commit fec5101

Please sign in to comment.