提交 fec51014 编写于 作者: L Laura Abbott 提交者: Russell King

ARM: 7993/1: 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.
Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NNicolas Pitre <nico@linaro.org>
Signed-off-by: NLaura Abbott <lauraa@codeaurora.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 a5134577
...@@ -252,6 +252,8 @@ static inline void memblock_dump_all(void) ...@@ -252,6 +252,8 @@ static inline void memblock_dump_all(void)
void memblock_set_current_limit(phys_addr_t limit); void memblock_set_current_limit(phys_addr_t limit);
phys_addr_t memblock_get_current_limit(void);
/* /*
* pfn conversion functions * pfn conversion functions
* *
......
...@@ -1407,6 +1407,11 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit) ...@@ -1407,6 +1407,11 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit)
memblock.current_limit = 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) static void __init_memblock memblock_dump(struct memblock_type *type, char *name)
{ {
unsigned long long base, size; unsigned long long base, size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册