Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310858
b: refs/heads/master
c: eab3094
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Boyd authored and Ingo Molnar committed Jun 8, 2012
1 parent d4caf7e commit 3b42358
Show file tree
Hide file tree
Showing 2 changed files with 21 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: 8a173b1476d126674104c7c5c6cef0bcd824b001
refs/heads/master: eab309494ae2b9e15f85520f00de3893162c2e43
20 changes: 20 additions & 0 deletions trunk/mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,16 @@ int __init_memblock memblock_is_memory(phys_addr_t addr)
return memblock_search(&memblock.memory, addr) != -1;
}

/**
* memblock_is_region_memory - check if a region is a subset of memory
* @base: base of region to check
* @size: size of region to check
*
* Check if the region [@base, @base+@size) is a subset of a memory block.
*
* RETURNS:
* 0 if false, non-zero if true
*/
int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
{
int idx = memblock_search(&memblock.memory, base);
Expand All @@ -879,6 +889,16 @@ int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size
memblock.memory.regions[idx].size) >= end;
}

/**
* memblock_is_region_reserved - check if a region intersects reserved memory
* @base: base of region to check
* @size: size of region to check
*
* Check if the region [@base, @base+@size) intersects a reserved memory block.
*
* RETURNS:
* 0 if false, non-zero if true
*/
int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t size)
{
memblock_cap_size(base, &size);
Expand Down

0 comments on commit 3b42358

Please sign in to comment.