Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212727
b: refs/heads/master
c: 6bcc817
h: refs/heads/master
i:
  212725: 9e39f33
  212723: 4d2c850
  212719: f09aee9
v: v3
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Aug 27, 2010
1 parent 57fceb0 commit 8214561
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edbe7d23b4482e7f33179290bcff3b1feae1c5f3
refs/heads/master: 6bcc8176d07f108da3b1af17fb2c0e82c80e948e
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/memblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ int get_free_all_memory_range(struct range **rangep, int nodeid);
void memblock_x86_register_active_regions(int nid, unsigned long start_pfn,
unsigned long last_pfn);
u64 memblock_x86_hole_size(u64 start, u64 end);
u64 memblock_x86_find_in_range_node(int nid, u64 start, u64 end, u64 size, u64 align);

#endif
15 changes: 15 additions & 0 deletions trunk/arch/x86/mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,21 @@ void __init memblock_x86_free_range(u64 start, u64 end)
memblock_free(start, end - start);
}

/*
* Need to call this function after memblock_x86_register_active_regions,
* so early_node_map[] is filled already.
*/
u64 __init memblock_x86_find_in_range_node(int nid, u64 start, u64 end, u64 size, u64 align)
{
u64 addr;
addr = find_memory_core_early(nid, size, align, start, end);
if (addr != MEMBLOCK_ERROR)
return addr;

/* Fallback, should already have start end within node range */
return memblock_find_in_range(start, end, size, align);
}

/*
* Finds an active region in the address range from start_pfn to last_pfn and
* returns its range in ei_startpfn and ei_endpfn for the memblock entry.
Expand Down

0 comments on commit 8214561

Please sign in to comment.