Commit 8b9d266a authored by Russell King's avatar Russell King

[ARM] Move bootmem_init() call into paging_init()

parent ffaa2a0d
...@@ -57,7 +57,6 @@ extern unsigned int mem_fclk_21285; ...@@ -57,7 +57,6 @@ extern unsigned int mem_fclk_21285;
extern void paging_init(struct meminfo *, struct machine_desc *desc); extern void paging_init(struct meminfo *, struct machine_desc *desc);
extern void convert_to_tag_list(struct tag *tags); extern void convert_to_tag_list(struct tag *tags);
extern void squash_mem_tags(struct tag *tag); extern void squash_mem_tags(struct tag *tag);
extern void bootmem_init(struct meminfo *);
extern void reboot_setup(char *str); extern void reboot_setup(char *str);
extern int root_mountflags; extern int root_mountflags;
extern int _stext, _text, _etext, _edata, _end; extern int _stext, _text, _etext, _edata, _end;
...@@ -720,7 +719,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -720,7 +719,6 @@ void __init setup_arch(char **cmdline_p)
memcpy(saved_command_line, from, COMMAND_LINE_SIZE); memcpy(saved_command_line, from, COMMAND_LINE_SIZE);
saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
parse_cmdline(cmdline_p, from); parse_cmdline(cmdline_p, from);
bootmem_init(&meminfo);
paging_init(&meminfo, mdesc); paging_init(&meminfo, mdesc);
request_standard_resources(&meminfo, mdesc); request_standard_resources(&meminfo, mdesc);
......
...@@ -344,7 +344,7 @@ static inline void free_bootmem_node_bank(int node, struct meminfo *mi) ...@@ -344,7 +344,7 @@ static inline void free_bootmem_node_bank(int node, struct meminfo *mi)
* Initialise the bootmem allocator for all nodes. This is called * Initialise the bootmem allocator for all nodes. This is called
* early during the architecture specific initialisation. * early during the architecture specific initialisation.
*/ */
void __init bootmem_init(struct meminfo *mi) static void __init bootmem_init(struct meminfo *mi)
{ {
struct node_info node_info[MAX_NUMNODES], *np = node_info; struct node_info node_info[MAX_NUMNODES], *np = node_info;
unsigned int bootmap_pages, bootmap_pfn, map_pg; unsigned int bootmap_pages, bootmap_pfn, map_pg;
...@@ -412,9 +412,7 @@ void __init bootmem_init(struct meminfo *mi) ...@@ -412,9 +412,7 @@ void __init bootmem_init(struct meminfo *mi)
} }
#endif #endif
if (map_pg != bootmap_pfn + bootmap_pages) BUG_ON(map_pg != bootmap_pfn + bootmap_pages);
BUG();
} }
/* /*
...@@ -426,6 +424,8 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) ...@@ -426,6 +424,8 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
void *zero_page; void *zero_page;
int node; int node;
bootmem_init(mi);
memcpy(&meminfo, mi, sizeof(meminfo)); memcpy(&meminfo, mi, sizeof(meminfo));
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment