Message ID | 1454045043-25545-2-git-send-email-david@gibson.dropbear.id.au (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 01/29/2016 10:53 AM, David Gibson wrote: > At the moment memblock_phys_mem_size() is marked as __init, and so is > discarded after boot. This is different from most of the memblock > functions which are marked __init_memblock, and are only discarded after > boot if memory hotplug is not configured. > > To allow for upcoming code which will need memblock_phys_mem_size() in the > hotplug path, change it from __init to __init_memblock. > > Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
On Fri, Jan 29, 2016 at 04:23:55PM +1100, David Gibson wrote: > At the moment memblock_phys_mem_size() is marked as __init, and so is > discarded after boot. This is different from most of the memblock > functions which are marked __init_memblock, and are only discarded after > boot if memory hotplug is not configured. > > To allow for upcoming code which will need memblock_phys_mem_size() in the > hotplug path, change it from __init to __init_memblock. > > Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Paul Mackerras <paulus@samba.org>
diff --git a/mm/memblock.c b/mm/memblock.c index d2ed81e..dd79899 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1448,7 +1448,7 @@ void __init __memblock_free_late(phys_addr_t base, phys_addr_t size) * Remaining API functions */ -phys_addr_t __init memblock_phys_mem_size(void) +phys_addr_t __init_memblock memblock_phys_mem_size(void) { return memblock.memory.total_size; }
At the moment memblock_phys_mem_size() is marked as __init, and so is discarded after boot. This is different from most of the memblock functions which are marked __init_memblock, and are only discarded after boot if memory hotplug is not configured. To allow for upcoming code which will need memblock_phys_mem_size() in the hotplug path, change it from __init to __init_memblock. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> --- mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)