memblock: Fix section mismatch warnings
Stephen found a bunch of section mismatch warnings with the new memblock changes. Use __init_memblock to replace __init in memblock.c and remove __init in memblock.h. We should not use __init in header files. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Yinghai Lu <Yinghai@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> LKML-Reference: <4C912709.2090201@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
823108a056
commit
3661ca66a4
|
@ -51,39 +51,39 @@ u64 memblock_find_in_range(u64 start, u64 end, u64 size, u64 align);
|
||||||
int memblock_free_reserved_regions(void);
|
int memblock_free_reserved_regions(void);
|
||||||
int memblock_reserve_reserved_regions(void);
|
int memblock_reserve_reserved_regions(void);
|
||||||
|
|
||||||
extern void __init memblock_init(void);
|
extern void memblock_init(void);
|
||||||
extern void __init memblock_analyze(void);
|
extern void memblock_analyze(void);
|
||||||
extern long memblock_add(phys_addr_t base, phys_addr_t size);
|
extern long memblock_add(phys_addr_t base, phys_addr_t size);
|
||||||
extern long memblock_remove(phys_addr_t base, phys_addr_t size);
|
extern long memblock_remove(phys_addr_t base, phys_addr_t size);
|
||||||
extern long __init memblock_free(phys_addr_t base, phys_addr_t size);
|
extern long memblock_free(phys_addr_t base, phys_addr_t size);
|
||||||
extern long __init memblock_reserve(phys_addr_t base, phys_addr_t size);
|
extern long memblock_reserve(phys_addr_t base, phys_addr_t size);
|
||||||
|
|
||||||
/* The numa aware allocator is only available if
|
/* The numa aware allocator is only available if
|
||||||
* CONFIG_ARCH_POPULATES_NODE_MAP is set
|
* CONFIG_ARCH_POPULATES_NODE_MAP is set
|
||||||
*/
|
*/
|
||||||
extern phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align,
|
extern phys_addr_t memblock_alloc_nid(phys_addr_t size, phys_addr_t align,
|
||||||
int nid);
|
int nid);
|
||||||
extern phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align,
|
extern phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align,
|
||||||
int nid);
|
int nid);
|
||||||
|
|
||||||
extern phys_addr_t __init memblock_alloc(phys_addr_t size, phys_addr_t align);
|
extern phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align);
|
||||||
|
|
||||||
/* Flags for memblock_alloc_base() amd __memblock_alloc_base() */
|
/* Flags for memblock_alloc_base() amd __memblock_alloc_base() */
|
||||||
#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0)
|
#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0)
|
||||||
#define MEMBLOCK_ALLOC_ACCESSIBLE 0
|
#define MEMBLOCK_ALLOC_ACCESSIBLE 0
|
||||||
|
|
||||||
extern phys_addr_t __init memblock_alloc_base(phys_addr_t size,
|
extern phys_addr_t memblock_alloc_base(phys_addr_t size,
|
||||||
phys_addr_t align,
|
phys_addr_t align,
|
||||||
phys_addr_t max_addr);
|
phys_addr_t max_addr);
|
||||||
extern phys_addr_t __init __memblock_alloc_base(phys_addr_t size,
|
extern phys_addr_t __memblock_alloc_base(phys_addr_t size,
|
||||||
phys_addr_t align,
|
phys_addr_t align,
|
||||||
phys_addr_t max_addr);
|
phys_addr_t max_addr);
|
||||||
extern phys_addr_t __init memblock_phys_mem_size(void);
|
extern phys_addr_t memblock_phys_mem_size(void);
|
||||||
extern phys_addr_t memblock_end_of_DRAM(void);
|
extern phys_addr_t memblock_end_of_DRAM(void);
|
||||||
extern void __init memblock_enforce_memory_limit(phys_addr_t memory_limit);
|
extern void memblock_enforce_memory_limit(phys_addr_t memory_limit);
|
||||||
extern int memblock_is_memory(phys_addr_t addr);
|
extern int memblock_is_memory(phys_addr_t addr);
|
||||||
extern int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
|
extern int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
|
||||||
extern int __init memblock_is_reserved(phys_addr_t addr);
|
extern int memblock_is_reserved(phys_addr_t addr);
|
||||||
extern int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size);
|
extern int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size);
|
||||||
|
|
||||||
extern void memblock_dump_all(void);
|
extern void memblock_dump_all(void);
|
||||||
|
|
|
@ -125,8 +125,8 @@ static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t en
|
||||||
return MEMBLOCK_ERROR;
|
return MEMBLOCK_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static phys_addr_t __init memblock_find_base(phys_addr_t size, phys_addr_t align,
|
static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size,
|
||||||
phys_addr_t start, phys_addr_t end)
|
phys_addr_t align, phys_addr_t start, phys_addr_t end)
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
|
@ -439,12 +439,12 @@ long __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size)
|
||||||
return __memblock_remove(&memblock.memory, base, size);
|
return __memblock_remove(&memblock.memory, base, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
long __init memblock_free(phys_addr_t base, phys_addr_t size)
|
long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
|
||||||
{
|
{
|
||||||
return __memblock_remove(&memblock.reserved, base, size);
|
return __memblock_remove(&memblock.reserved, base, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
long __init memblock_reserve(phys_addr_t base, phys_addr_t size)
|
long __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size)
|
||||||
{
|
{
|
||||||
struct memblock_type *_rgn = &memblock.reserved;
|
struct memblock_type *_rgn = &memblock.reserved;
|
||||||
|
|
||||||
|
@ -671,12 +671,12 @@ int __init memblock_is_reserved(phys_addr_t addr)
|
||||||
return memblock_search(&memblock.reserved, addr) != -1;
|
return memblock_search(&memblock.reserved, addr) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int memblock_is_memory(phys_addr_t addr)
|
int __init_memblock memblock_is_memory(phys_addr_t addr)
|
||||||
{
|
{
|
||||||
return memblock_search(&memblock.memory, addr) != -1;
|
return memblock_search(&memblock.memory, addr) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
|
int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
|
||||||
{
|
{
|
||||||
int idx = memblock_search(&memblock.reserved, base);
|
int idx = memblock_search(&memblock.reserved, base);
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t si
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void __init memblock_set_current_limit(phys_addr_t limit)
|
void __init_memblock memblock_set_current_limit(phys_addr_t limit)
|
||||||
{
|
{
|
||||||
memblock.current_limit = limit;
|
memblock.current_limit = limit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue