mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] for_each_online_pgdat: for_each_bootmem
Add a list_head to bootmem_data_t and make bootmems use it. bootmem list is sorted by node_boot_start. Only nodes against which init_bootmem() is called are linked to the list. (i386 allocates bootmem only from one node(0) not from all online nodes.) A summary: 1. for_each_online_pgdat() traverses all *online* nodes. 2. alloc_bootmem() allocates memory only from initialized-for-bootmem nodes. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8357f8695d
commit
679bc9fbb5
2 changed files with 30 additions and 10 deletions
|
@ -38,6 +38,7 @@ typedef struct bootmem_data {
|
|||
unsigned long last_pos;
|
||||
unsigned long last_success; /* Previous allocation point. To speed
|
||||
* up searching */
|
||||
struct list_head list;
|
||||
} bootmem_data_t;
|
||||
|
||||
extern unsigned long __init bootmem_bootmap_pages (unsigned long);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue