diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2011-10-31 17:08:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 17:30:47 -0700 |
commit | 0a93ebef698b08ed04af0d7d913bab8aedfdc253 (patch) | |
tree | dcdb4bba9355647dd060d9150422537ad126442a /mm/memblock.c | |
parent | f5252e009d5b87071a919221e4f6624184005368 (diff) | |
download | linux-3.10-0a93ebef698b08ed04af0d7d913bab8aedfdc253.tar.gz linux-3.10-0a93ebef698b08ed04af0d7d913bab8aedfdc253.tar.bz2 linux-3.10-0a93ebef698b08ed04af0d7d913bab8aedfdc253.zip |
memblock: add memblock_start_of_DRAM()
SPARC32 require access to the start address. Add a new helper
memblock_start_of_DRAM() to give access to the address of the first
memblock - which contains the lowest address.
The awkward name was chosen to match the already present
memblock_end_of_DRAM().
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Yinghai Lu <yinghai@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index ccbf9733959..b7ed6363358 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -626,6 +626,12 @@ phys_addr_t __init memblock_phys_mem_size(void) return memblock.memory_size; } +/* lowest address */ +phys_addr_t __init_memblock memblock_start_of_DRAM(void) +{ + return memblock.memory.regions[0].base; +} + phys_addr_t __init_memblock memblock_end_of_DRAM(void) { int idx = memblock.memory.cnt - 1; |